1. 24 4月, 2019 1 次提交
  2. 16 4月, 2019 2 次提交
  3. 11 4月, 2019 4 次提交
  4. 09 4月, 2019 1 次提交
    • I
      drm/i915: Get power refs in encoder->get_power_domains() · bef42cb2
      Imre Deak 提交于
      Push getting the reference for the encoders' power domains into the
      encoder get_power_domains() hook instead of doing this from the caller.
      This way the encoder can store away the corresponding wakerefs.
      
      This fixes the DSI encoder disabling, which didn't release these
      power references it acquired during HW state readout.
      
      Note that longtime ownership for the corresponding wakerefs can be thus
      acquired / released in two ways. Nevertheless there is always only one
      owner for them:
      
      After HW readout (booting/system resume):
      - encoder->get_power_domains() acquires
      - encoder->disable*() releases
      
      After a modeset (calling intel_atomic_commit()):
      - encoder->enable*() acquires
      - encoder->disable*() releases
      
      * can be any of the encoder enable/disable hooks.
      
      v2:
      - Check that the DSI io_wakerefs are unset both during encoder HW
        readout and enabling. (Chris)
      
      Fixes: 0e6e0be4 ("drm/i915: Markup paired operations on display power domains")
      Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190407124655.31536-1-imre.deak@intel.com
      (cherry picked from commit 3a52fb7e)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      bef42cb2
  5. 08 4月, 2019 3 次提交
    • V
      drm/i915: Fix pipe_bpp readout for BXT/GLK DSI · e1b7058e
      Ville Syrjälä 提交于
      The only bpc information in pipe registers for BXT/GLK DSI
      is the PIPEMISC dither bpc. Let's try to use that to read
      out pipe_bpp on these platforms. However, I'm not sure if
      this will be correctly populated by the GOP since bspec
      suggests it's only needed if dithering is actually enabled.
      If not I guess we'll have to go one step further and
      extract pipe_bpp from the DSI pixel format when dithering
      is disabled.
      
      Cc: Hans de Goede <hdegoede@redhat.com>
      Fixes: ca0b04db ("drm/i915/dsi: Fix pipe_bpp for handling for 6 bpc pixel-formats")
      References: https://bugs.freedesktop.org/show_bug.cgi?id=109516Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190405141349.11950-1-ville.syrjala@linux.intel.com
      (cherry picked from commit 49965350)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      e1b7058e
    • C
      drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt() · 968a85b1
      Chris Wilson 提交于
      ppgtt_free_all_spt() iterates the radixtree as it is deleting it,
      forgoing all protection against the leaves being freed in the process
      (leaving the iter pointing into the void).
      
      A minimal fix seems to be to use the available post_shadow_list to
      decompose the tree into a list prior to destroying the radixtree.
      
      Alerted by the sparse warnings:
      
      drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces)
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void **slot
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void [noderef] <asn:4> **
      drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces)
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void **slot
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void [noderef] <asn:4> **
      drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument 1 (different address spaces)
      drivers/gpu/drm/i915/gvt/gtt.c:758:45:    expected void [noderef] <asn:4> **slot
      drivers/gpu/drm/i915/gvt/gtt.c:758:45:    got void **slot
      drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 (different address spaces)
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void [noderef] <asn:4> **slot
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void **slot
      drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces)
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void **slot
      drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void [noderef] <asn:4> **
      
      This would also have been loudly warning if run through CI for the
      invalid RCU dereferences.
      
      Fixes: b6c126a3 ("drm/i915/gvt: Manage shadow pages with radix tree")
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Changbin Du <changbin.du@intel.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Zhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      968a85b1
    • C
      drm/i915/gvt: Annotate iomem usage · 196a6627
      Chris Wilson 提交于
      Fix the sparse warning for blithely using iomem with normal memcpy:
      
      drivers/gpu/drm/i915/gvt/kvmgt.c:916:21: warning: incorrect type in assignment (different address spaces)
      drivers/gpu/drm/i915/gvt/kvmgt.c:916:21:    expected void *aperture_va
      drivers/gpu/drm/i915/gvt/kvmgt.c:916:21:    got void [noderef] <asn:2> *
      drivers/gpu/drm/i915/gvt/kvmgt.c:927:26: warning: incorrect type in argument 1 (different address spaces)
      drivers/gpu/drm/i915/gvt/kvmgt.c:927:26:    expected void [noderef] <asn:2> *vaddr
      drivers/gpu/drm/i915/gvt/kvmgt.c:927:26:    got void *aperture_va
      
      Fixes: d480b28a ("drm/i915/gvt: Fix aperture read/write emulation when enable x-no-mmap=on")
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Changbin Du <changbin.du@intel.com>
      Cc: Zhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      196a6627
  6. 04 4月, 2019 2 次提交
  7. 02 4月, 2019 1 次提交
    • C
      drm/i915: Always backoff after a drm_modeset_lock() deadlock · a145b5b0
      Chris Wilson 提交于
      If drm_modeset_lock() reports a deadlock it sets the ctx->contexted
      field and insists that the caller calls drm_modeset_backoff() or else it
      generates a WARN on cleanup.
      
      <4> [1601.870376] WARNING: CPU: 3 PID: 8445 at drivers/gpu/drm/drm_modeset_lock.c:228 drm_modeset_drop_locks+0x35/0x40
      <4> [1601.870395] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal i915 coretemp crct10dif_pclmul
      <6> [1601.870403] Console: switching
      <4> [1601.870403]  snd_hda_intel
      <4> [1601.870406] to colour frame buffer device 320x90
      <4> [1601.870406]  crc32_pclmul snd_hda_codec snd_hwdep ghash_clmulni_intel e1000e snd_hda_core cdc_ether ptp usbnet mii pps_core snd_pcm i2c_i801 mei_me mei prime_numbers
      <4> [1601.870422] CPU: 3 PID: 8445 Comm: cat Tainted: G     U            5.0.0-rc7-CI-CI_DRM_5650+ #1
      <4> [1601.870424] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.2402.AD3.1810170014 10/17/2018
      <4> [1601.870427] RIP: 0010:drm_modeset_drop_locks+0x35/0x40
      <4> [1601.870430] Code: 29 48 8b 43 60 48 8d 6b 60 48 39 c5 74 19 48 8b 43 60 48 8d b8 70 ff ff ff e8 87 ff ff ff 48 8b 43 60 48 39 c5 75 e7 5b 5d c3 <0f> 0b eb d3 0f 1f 80 00 00 00 00 41 56 41 55 41 54 55 53 48 8b 6f
      <4> [1601.870432] RSP: 0018:ffffc90000d67ce8 EFLAGS: 00010282
      <4> [1601.870435] RAX: 00000000ffffffdd RBX: ffffc90000d67d00 RCX: 5dbbe23d00000000
      <4> [1601.870437] RDX: 0000000000000000 RSI: 0000000093e6194a RDI: ffffc90000d67d00
      <4> [1601.870439] RBP: ffff88849e62e678 R08: 0000000003b7329a R09: 0000000000000001
      <4> [1601.870441] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888492100410
      <4> [1601.870442] R13: ffff88849ea50958 R14: ffff8884a67eb028 R15: ffff8884a67eb028
      <4> [1601.870445] FS:  00007fa7a27745c0(0000) GS:ffff8884aff80000(0000) knlGS:0000000000000000
      <4> [1601.870447] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [1601.870449] CR2: 000055af07e66000 CR3: 00000004a8cc2006 CR4: 0000000000760ee0
      <4> [1601.870451] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      <4> [1601.870453] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      <4> [1601.870454] PKRU: 55555554
      <4> [1601.870456] Call Trace:
      <4> [1601.870505]  i915_dsc_fec_support_show+0x91/0x190 [i915]
      <4> [1601.870522]  seq_read+0xdb/0x3c0
      <4> [1601.870531]  full_proxy_read+0x51/0x80
      <4> [1601.870538]  __vfs_read+0x31/0x190
      <4> [1601.870546]  ? __se_sys_newfstat+0x3c/0x60
      <4> [1601.870552]  vfs_read+0x9e/0x150
      <4> [1601.870557]  ksys_read+0x50/0xc0
      <4> [1601.870564]  do_syscall_64+0x55/0x190
      <4> [1601.870569]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <4> [1601.870572] RIP: 0033:0x7fa7a226d081
      <4> [1601.870574] Code: fe ff ff 48 8d 3d 67 9c 0a 00 48 83 ec 08 e8 a6 4c 02 00 66 0f 1f 44 00 00 48 8d 05 81 08 2e 00 8b 00 85 c0 75 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 41 54 55 49 89 d4 53
      <4> [1601.870576] RSP: 002b:00007ffcc05140c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
      <4> [1601.870579] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007fa7a226d081
      <4> [1601.870581] RDX: 0000000000020000 RSI: 000055af07e63000 RDI: 0000000000000007
      <4> [1601.870583] RBP: 0000000000020000 R08: 000000000000007b R09: 0000000000000000
      <4> [1601.870585] R10: 000055af07e60010 R11: 0000000000000246 R12: 000055af07e63000
      <4> [1601.870587] R13: 0000000000000007 R14: 000055af07e634bf R15: 0000000000020000
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109745
      Fixes: e845f099 ("drm/i915/dsc: Add Per connector debugfs node for DSC support/enable")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NManasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190329165152.29259-1-chris@chris-wilson.co.uk
      (cherry picked from commit ee6df569)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      a145b5b0
  8. 29 3月, 2019 2 次提交
  9. 28 3月, 2019 1 次提交
  10. 27 3月, 2019 1 次提交
  11. 26 3月, 2019 1 次提交
  12. 22 3月, 2019 1 次提交
  13. 19 3月, 2019 3 次提交
  14. 09 3月, 2019 7 次提交
    • T
      drm/i915: Relax mmap VMA check · ca22f32a
      Tvrtko Ursulin 提交于
      Legacy behaviour was to allow non-page-aligned mmap requests, as does the
      linux mmap(2) implementation by virtue of automatically rounding up for
      the caller.
      
      To avoid breaking legacy userspace relax the newly introduced fix.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Fixes: 5c4604e7 ("drm/i915: Prevent a race during I915_GEM_MMAP ioctl with WC set")
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: Adam Zabrocki <adamza@microsoft.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.0+
      Cc: Akash Goel <akash.goel@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190305110409.28633-1-tvrtko.ursulin@linux.intel.com
      (cherry picked from commit a90e1948)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      ca22f32a
    • J
      drm/i915: Fix atomic state leak when resetting HDMI link · c8c16f59
      José Roberto de Souza 提交于
      Atomic state needs to be put even if the commit was successful.
      
      Fixes: dba14b27 ("drm/i915: Reinitialize sink scrambling/TMDS clock ratio on HPD")
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Lyude Paul <lyude@redhat.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190302003349.19189-1-jose.souza@intel.com
      (cherry picked from commit a551cd66)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      c8c16f59
    • C
      drm/i915: Acquire breadcrumb ref before cancelling · a89c0962
      Chris Wilson 提交于
      We may race the interrupt signaling with retirement, in which case the
      order in which we acquire the reference inside the interrupt is vital to
      provide the correct barrier against the request being freed in
      retirement, i.e. we need to acquire our reference before marking the
      breadcrumb as cancelled (as soon as the breadcrumb is cancelled
      retirement may drop its reference to the request without serialisation
      with the interrupt handler).
      
      <3>[  683.372226] BUG i915_request (Tainted: G     U           ): Object already free
      <3>[  683.372269] -----------------------------------------------------------------------------
      
      <4>[  683.372323] Disabling lock debugging due to kernel taint
      <3>[  683.372393] INFO: Allocated in i915_request_alloc+0x169/0x810 [i915] age=0 cpu=2 pid=1420
      <3>[  683.372412] 	kmem_cache_alloc+0x21c/0x280
      <3>[  683.372478] 	i915_request_alloc+0x169/0x810 [i915]
      <3>[  683.372540] 	i915_gem_do_execbuffer+0x84e/0x1ae0 [i915]
      <3>[  683.372603] 	i915_gem_execbuffer2_ioctl+0x11b/0x420 [i915]
      <3>[  683.372617] 	drm_ioctl_kernel+0x83/0xf0
      <3>[  683.372626] 	drm_ioctl+0x2f3/0x3b0
      <3>[  683.372636] 	do_vfs_ioctl+0xa0/0x6e0
      <3>[  683.372645] 	ksys_ioctl+0x35/0x60
      <3>[  683.372654] 	__x64_sys_ioctl+0x11/0x20
      <3>[  683.372664] 	do_syscall_64+0x55/0x190
      <3>[  683.372675] 	entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <3>[  683.372740] INFO: Freed in i915_request_retire_upto+0xfb/0x2e0 [i915] age=0 cpu=0 pid=1419
      <3>[  683.372807] 	i915_request_retire_upto+0xfb/0x2e0 [i915]
      <3>[  683.372870] 	i915_request_add+0x3bd/0x9d0 [i915]
      <3>[  683.372931] 	i915_gem_do_execbuffer+0x141c/0x1ae0 [i915]
      <3>[  683.372991] 	i915_gem_execbuffer2_ioctl+0x11b/0x420 [i915]
      <3>[  683.373001] 	drm_ioctl_kernel+0x83/0xf0
      <3>[  683.373008] 	drm_ioctl+0x2f3/0x3b0
      <3>[  683.373015] 	do_vfs_ioctl+0xa0/0x6e0
      <3>[  683.373023] 	ksys_ioctl+0x35/0x60
      <3>[  683.373030] 	__x64_sys_ioctl+0x11/0x20
      <3>[  683.373037] 	do_syscall_64+0x55/0x190
      <3>[  683.373045] 	entry_SYSCALL_64_after_hwframe+0x49/0xbe
      <3>[  683.373054] INFO: Slab 0x0000000079bcdd71 objects=30 used=2 fp=0x000000006d77b8af flags=0x8000000000010201
      <3>[  683.373069] INFO: Object 0x000000006d77b8af @offset=24000 fp=0x000000007b061eab
      
      <3>[  683.373083] Redzone 00000000ee47ef28: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
      <3>[  683.373097] Redzone 000000000cb91471: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
      <3>[  683.373111] Redzone 00000000cf2b86ee: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
      <3>[  683.373125] Redzone 00000000f1f5a2cd: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb  ................
      <3>[  683.373139] Object 000000006d77b8af: 00 00 00 00 5a 5a 5a 5a 00 3c 49 c0 ff ff ff ff  ....ZZZZ.<I.....
      <3>[  683.373153] Object 000000006f9b6204: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373167] Object 0000000091410ffb: e0 dd 6b fa 87 9f ff ff e0 dd 6b fa 87 9f ff ff  ..k.......k.....
      <3>[  683.373181] Object 000000004cdf799d: 20 de 6b fa 87 9f ff ff 3d 00 00 00 00 00 00 00   .k.....=.......
      <3>[  683.373195] Object 00000000545afebc: aa b3 00 00 00 00 00 00 0f 00 00 00 00 00 00 00  ................
      <3>[  683.373209] Object 00000000e4a394a8: 25 bd bd 1b 9f 00 00 00 00 00 00 00 5a 5a 5a 5a  %...........ZZZZ
      <3>[  683.373223] Object 0000000029a7878a: 00 00 00 00 ad 4e ad de ff ff ff ff 5a 5a 5a 5a  .....N......ZZZZ
      <3>[  683.373237] Object 00000000d37797b3: ff ff ff ff ff ff ff ff e8 6e 57 c0 ff ff ff ff  .........nW.....
      <3>[  683.373251] Object 00000000d50414f6: 00 b3 c8 8e ff ff ff ff 80 b0 c8 8e ff ff ff ff  ................
      <3>[  683.373265] Object 00000000c28e8847: 41 01 4b c0 ff ff ff ff 00 00 88 8e 88 9f ff ff  A.K.............
      <3>[  683.373279] Object 00000000c74212ab: 38 c1 6d 8a 88 9f ff ff 58 21 74 8a 88 9f ff ff  8.m.....X!t.....
      <3>[  683.373293] Object 000000000d8012cf: c0 c1 6d 8a 88 9f ff ff 58 79 dd d9 87 9f ff ff  ..m.....Xy......
      <3>[  683.373306] Object 00000000c9900b91: 98 d0 4e 8a 88 9f ff ff 58 3c e8 9b 88 9f ff ff  ..N.....X<......
      <3>[  683.373320] Object 0000000044bb8c3d: 58 3c e8 9b 88 9f ff ff 64 f5 04 00 00 00 00 00  X<......d.......
      <3>[  683.373334] Object 00000000180c4cca: 00 00 00 00 ad 4e ad de ff ff ff ff 5a 5a 5a 5a  .....N......ZZZZ
      <3>[  683.373348] Object 00000000c9044498: ff ff ff ff ff ff ff ff e0 6e 57 c0 ff ff ff ff  .........nW.....
      <3>[  683.373362] Object 0000000072d0dfb3: 00 00 00 00 00 00 00 00 c0 b1 c8 8e ff ff ff ff  ................
      <3>[  683.373376] Object 0000000081f198b9: 55 01 4b c0 ff ff ff ff d8 de 6b fa 87 9f ff ff  U.K.......k.....
      <3>[  683.373390] Object 000000006a375a13: d8 de 6b fa 87 9f ff ff cc 05 39 c0 ff ff ff ff  ..k.......9.....
      <3>[  683.373404] Object 00000000b8392dd1: ff ff ff ff 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ....ZZZZZZZZZZZZ
      <3>[  683.373418] Object 00000000e5c1bbcb: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373432] Object 00000000199feccd: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373446] Object 0000000020f5e08b: 20 df 6b fa 87 9f ff ff 20 df 6b fa 87 9f ff ff   .k..... .k.....
      <3>[  683.373460] Object 0000000090591b0f: 30 df 6b fa 87 9f ff ff 30 df 6b fa 87 9f ff ff  0.k.....0.k.....
      <3>[  683.373473] Object 00000000232f7cd0: 40 df 6b fa 87 9f ff ff 40 df 6b fa 87 9f ff ff  @.k.....@.k.....
      <3>[  683.373487] Object 0000000060458027: 50 df 6b fa 87 9f ff ff 50 df 6b fa 87 9f ff ff  P.k.....P.k.....
      <3>[  683.373501] Object 00000000e3c82ce2: 06 00 00 00 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a  ........ZZZZZZZZ
      <3>[  683.373515] Object 00000000ec804eb8: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373529] Object 00000000ce7ccc08: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373543] Object 000000002dbc575c: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373557] Object 00000000b86d3417: 5a 5a 5a 5a 5a 5a 5a 5a 00 de 6b fa 87 9f ff ff  ZZZZZZZZ..k.....
      <3>[  683.373571] Object 00000000d1e82276: b8 61 dd d9 87 9f ff ff a0 06 00 00 d0 06 00 00  .a..............
      <3>[  683.373585] Object 00000000cc53f969: e8 06 00 00 20 07 00 00 28 07 00 00 00 00 00 00  .... ...(.......
      <3>[  683.373599] Object 00000000ea2426d2: 40 0c 8c 7b 88 9f ff ff 00 00 00 00 00 00 00 00  @..{............
      <3>[  683.373613] Object 00000000b860c1c3: 68 0d 8c 7b 88 9f ff ff 68 25 8c 7b 88 9f ff ff  h..{....h%.{....
      <3>[  683.373627] Object 0000000016455ea0: 96 d5 05 00 01 00 00 00 00 5a 5a 5a 5a 5a 5a 5a  .........ZZZZZZZ
      <3>[  683.373640] Object 00000000e66ede82: 00 e0 6b fa 87 9f ff ff 00 e0 6b fa 87 9f ff ff  ..k.......k.....
      <3>[  683.373654] Object 0000000080964939: 10 e0 6b fa 87 9f ff ff 10 e0 6b fa 87 9f ff ff  ..k.......k.....
      <3>[  683.373668] Object 00000000e7ffc5dd: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ad de  ................
      <3>[  683.373682] Object 000000000ce9d6ca: 00 02 00 00 00 00 ad de 5a 5a 5a 5a 5a 5a 5a 5a  ........ZZZZZZZZ
      <3>[  683.373696] Object 00000000386659d0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373710] Redzone 0000000075d2069d: bb bb bb bb bb bb bb bb                          ........
      <3>[  683.373723] Padding 0000000054e14c6b: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373737] Padding 00000000425e5b34: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <3>[  683.373751] Padding 00000000ad3d4db9: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
      <4>[  683.373767] CPU: 1 PID: 151 Comm: kworker/1:2 Tainted: G    BU            5.0.0-rc8-g39139489403b-drmtip_236+ #1
      <4>[  683.373769] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake Y LPDDR4x T4 RVP TLC, BIOS ICLSFWR1.R00.3087.A00.1902250334 02/25/2019
      <4>[  683.373773] Workqueue: events delayed_fput
      <4>[  683.373775] Call Trace:
      <4>[  683.373777]  <IRQ>
      <4>[  683.373781]  dump_stack+0x67/0x9b
      <4>[  683.373783]  free_debug_processing+0x344/0x370
      <4>[  683.373832]  ? intel_engine_breadcrumbs_irq+0x2e4/0x380 [i915]
      <4>[  683.373836]  __slab_free+0x337/0x4f0
      <4>[  683.373840]  ? _raw_spin_unlock_irqrestore+0x39/0x60
      <4>[  683.373844]  ? debug_check_no_obj_freed+0x132/0x210
      <4>[  683.373889]  ? intel_engine_breadcrumbs_irq+0x2e4/0x380 [i915]
      <4>[  683.373892]  ? kmem_cache_free+0x275/0x2e0
      <4>[  683.373894]  kmem_cache_free+0x275/0x2e0
      <4>[  683.373939]  intel_engine_breadcrumbs_irq+0x2e4/0x380 [i915]
      <4>[  683.373984]  gen8_cs_irq_handler+0x4e/0xa0 [i915]
      <4>[  683.374026]  gen11_irq_handler+0x24b/0x330 [i915]
      <4>[  683.374032]  __handle_irq_event_percpu+0x41/0x2d0
      <4>[  683.374034]  ? handle_irq_event+0x27/0x50
      <4>[  683.374038]  handle_irq_event_percpu+0x2b/0x70
      <4>[  683.374040]  handle_irq_event+0x2f/0x50
      <4>[  683.374044]  handle_edge_irq+0xe7/0x190
      <4>[  683.374048]  handle_irq+0x67/0x160
      <4>[  683.374051]  do_IRQ+0x5e/0x130
      <4>[  683.374054]  common_interrupt+0xf/0xf
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109827
      Fixes: 52c0fdb2 ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190304114113.371-1-chris@chris-wilson.co.uk
      (cherry picked from commit e781a7a3)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      a89c0962
    • C
      drm/i915/selftests: Always free spinner on __sseu_prepare error · 339cc6ae
      Chris Wilson 提交于
      Prepare a nice little onion unwind to ensure that we always free the
      spinner if we __sseu_prepare fails.
      
      Fixes: c06ee6ff ("drm/i915/selftests: Context SSEU reconfiguration tests")
      Reported-by: NRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190215195010.16637-1-chris@chris-wilson.co.ukReviewed-by: NRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      (cherry picked from commit 2a4a2754)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      339cc6ae
    • C
      drm/i915: Reacquire priolist cache after dropping the engine lock · 7b1366b4
      Chris Wilson 提交于
      If we drop the engine lock, we may run execlists_dequeue which may free
      the priolist. Therefore if we ever drop the execution lock on the
      engine, we have to discard our cache and refetch the priolist to ensure
      we do not use a stale pointer.
      
      [  506.418935] [IGT] gem_exec_whisper: starting subtest contexts-priority
      [  593.240825] general protection fault: 0000 [#1] SMP
      [  593.240863] CPU: 1 PID: 494 Comm: gem_exec_whispe Tainted: G     U            5.0.0-rc6+ #100
      [  593.240879] Hardware name:  /NUC6CAYB, BIOS AYAPLCEL.86A.0029.2016.1124.1625 11/24/2016
      [  593.240965] RIP: 0010:__i915_schedule+0x1fe/0x320 [i915]
      [  593.240981] Code: 48 8b 0c 24 48 89 c3 49 8b 45 28 49 8b 75 20 4c 89 3c 24 48 89 46 08 48 89 30 48 8b 43 08 48 89 4b 08 49 89 5d 20 49 89 45 28 <48> 89 08 45 39 a7 b8 03 00 00 7d 44 45 89 a7 b8 03 00 00 49 8b 85
      [  593.240999] RSP: 0018:ffffc90000057a60 EFLAGS: 00010046
      [  593.241013] RAX: 6b6b6b6b6b6b6b6b RBX: ffff8882582d7870 RCX: ffff88826baba6f0
      [  593.241026] RDX: 0000000000000000 RSI: ffff8882582d6e70 RDI: ffff888273482194
      [  593.241049] RBP: ffffc90000057a68 R08: ffff8882582d7680 R09: ffff8882582d7840
      [  593.241068] R10: 0000000000000000 R11: ffffea00095ebe08 R12: 0000000000000728
      [  593.241105] R13: ffff88826baba6d0 R14: ffffc90000057a40 R15: ffff888273482158
      [  593.241120] FS:  00007f4613fb3900(0000) GS:ffff888277a80000(0000) knlGS:0000000000000000
      [  593.241133] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  593.241146] CR2: 00007f57d3c66a84 CR3: 000000026e2b6000 CR4: 00000000001406e0
      [  593.241158] Call Trace:
      [  593.241233]  i915_schedule+0x1f/0x30 [i915]
      [  593.241326]  i915_request_add+0x1a9/0x290 [i915]
      [  593.241393]  i915_gem_do_execbuffer+0x45f/0x1150 [i915]
      [  593.241411]  ? init_object+0x49/0x80
      [  593.241425]  ? ___slab_alloc.constprop.91+0x4b8/0x4e0
      [  593.241491]  ? i915_gem_execbuffer2_ioctl+0x99/0x380 [i915]
      [  593.241563]  ? i915_gem_execbuffer_ioctl+0x270/0x270 [i915]
      [  593.241629]  i915_gem_execbuffer2_ioctl+0x1bb/0x380 [i915]
      [  593.241705]  ? i915_gem_execbuffer_ioctl+0x270/0x270 [i915]
      [  593.241724]  drm_ioctl_kernel+0x81/0xd0
      [  593.241738]  drm_ioctl+0x1a7/0x310
      [  593.241803]  ? i915_gem_execbuffer_ioctl+0x270/0x270 [i915]
      [  593.241819]  ? __update_load_avg_se+0x1c9/0x240
      [  593.241834]  ? pick_next_entity+0x7e/0x120
      [  593.241851]  do_vfs_ioctl+0x88/0x5d0
      [  593.241880]  ksys_ioctl+0x35/0x70
      [  593.241894]  __x64_sys_ioctl+0x11/0x20
      [  593.241907]  do_syscall_64+0x44/0xf0
      [  593.241924]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [  593.241940] RIP: 0033:0x7f4615ffe757
      [  593.241952] Code: 00 00 90 48 8b 05 39 a7 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 09 a7 0c 00 f7 d8 64 89 01 48
      [  593.241970] RSP: 002b:00007ffc1030ddf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [  593.241984] RAX: ffffffffffffffda RBX: 00007ffc10324420 RCX: 00007f4615ffe757
      [  593.241997] RDX: 00007ffc1030e220 RSI: 0000000040406469 RDI: 0000000000000003
      [  593.242010] RBP: 00007ffc1030e220 R08: 00007f46160c9208 R09: 00007f46160c9240
      [  593.242022] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000040406469
      [  593.242038] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
      [  593.242058] Modules linked in: i915 intel_gtt drm_kms_helper prime_numbers
      
      v2: Track the local engine cache and explicitly clear it when switching
      engine locks.
      
      Fixes: a02eb975 ("drm/i915/execlists: Cache the priolist when rescheduling")
      Testcase: igt/gem_exec_whisper/contexts-priority # rare!
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190211204647.26723-1-chris@chris-wilson.co.uk
      (cherry picked from commit ed7dc677)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      7b1366b4
    • C
      drm/i915: Protect i915_active iterators from the shrinker · df069367
      Chris Wilson 提交于
      If we allocate while iterating the rbtree of active nodes, we may hit
      the shrinker and so retire the i915_active, reaping the rbtree. Modifying
      the rbtree as we iterate is not good behaviour, so acquire the
      i915_active first to keep the tree intact whenever we allocate.
      
      Fixes: a42375af ("drm/i915: Release the active tracker tree upon idling")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190208134704.23039-1-chris@chris-wilson.co.ukReviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      (cherry picked from commit 312c4ba1)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      df069367
    • R
      drm/i915: HDCP state handling in ddi_update_pipe · 08f68752
      Ramalingam C 提交于
      The downgrade of the fullmodeset into fastset
      intel_encoder->update_pipe, in possible scenario, skips the En/Dis-able
      DDI. Hence breaks the HDCP state change handling.
      
      We also don't have any hdcp tests in CI, because the shard runs don't
      have hdcp capable outputs :-/
      
      So this change fixs it by handling the HDCP state change request at
      intel_encoder->update_pipe too along with enable and disable of the DDI.
      
      Fixes: d19f958d ("drm/i915: Enable fastset for non-boot modesets.")
      
      v2:
        Added commit id that broke the HDCP [Daniel]
      Signed-off-by: NRamalingam C <ramalingam.c@intel.com>
      cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      cc: Hans de Goede <hdegoede@redhat.com>
      cc: Daniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/1549295080-18353-1-git-send-email-ramalingam.c@intel.com
      (cherry picked from commit 634852d1)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      08f68752
  15. 07 3月, 2019 1 次提交
  16. 06 3月, 2019 1 次提交
    • M
      mm, compaction: use free lists to quickly locate a migration source · 70b44595
      Mel Gorman 提交于
      The migration scanner is a linear scan of a zone with a potentiall large
      search space.  Furthermore, many pageblocks are unusable such as those
      filled with reserved pages or partially filled with pages that cannot
      migrate.  These still get scanned in the common case of allocating a THP
      and the cost accumulates.
      
      The patch uses a partial search of the free lists to locate a migration
      source candidate that is marked as MOVABLE when allocating a THP.  It
      prefers picking a block with a larger number of free pages already on
      the basis that there are fewer pages to migrate to free the entire
      block.  The lowest PFN found during searches is tracked as the basis of
      the start for the linear search after the first search of the free list
      fails.  After the search, the free list is shuffled so that the next
      search will not encounter the same page.  If the search fails then the
      subsequent searches will be shorter and the linear scanner is used.
      
      If this search fails, or if the request is for a small or
      unmovable/reclaimable allocation then the linear scanner is still used.
      It is somewhat pointless to use the list search in those cases.  Small
      free pages must be used for the search and there is no guarantee that
      movable pages are located within that block that are contiguous.
      
                                           5.0.0-rc1              5.0.0-rc1
                                       noboost-v3r10          findmig-v3r15
      Amean     fault-both-3      3771.41 (   0.00%)     3390.40 (  10.10%)
      Amean     fault-both-5      5409.05 (   0.00%)     5082.28 (   6.04%)
      Amean     fault-both-7      7040.74 (   0.00%)     7012.51 (   0.40%)
      Amean     fault-both-12    11887.35 (   0.00%)    11346.63 (   4.55%)
      Amean     fault-both-18    16718.19 (   0.00%)    15324.19 (   8.34%)
      Amean     fault-both-24    21157.19 (   0.00%)    16088.50 *  23.96%*
      Amean     fault-both-30    21175.92 (   0.00%)    18723.42 *  11.58%*
      Amean     fault-both-32    21339.03 (   0.00%)    18612.01 *  12.78%*
      
                                      5.0.0-rc1              5.0.0-rc1
                                  noboost-v3r10          findmig-v3r15
      Percentage huge-3        86.50 (   0.00%)       89.83 (   3.85%)
      Percentage huge-5        92.52 (   0.00%)       91.96 (  -0.61%)
      Percentage huge-7        92.44 (   0.00%)       92.85 (   0.44%)
      Percentage huge-12       92.98 (   0.00%)       92.74 (  -0.25%)
      Percentage huge-18       91.70 (   0.00%)       91.71 (   0.02%)
      Percentage huge-24       91.59 (   0.00%)       92.13 (   0.60%)
      Percentage huge-30       90.14 (   0.00%)       93.79 (   4.04%)
      Percentage huge-32       90.03 (   0.00%)       91.27 (   1.37%)
      
      This shows an improvement in allocation latencies with similar
      allocation success rates.  While not presented, there was a 31%
      reduction in migration scanning and a 8% reduction on system CPU usage.
      A 2-socket machine showed similar benefits.
      
      [mgorman@techsingularity.net: several fixes]
        Link: http://lkml.kernel.org/r/20190204120111.GL9565@techsingularity.net
      [vbabka@suse.cz: migrate block that was found-fast, some optimisations]
      Link: http://lkml.kernel.org/r/20190118175136.31341-10-mgorman@techsingularity.netSigned-off-by: NMel Gorman <mgorman@techsingularity.net>
      Acked-by: NVlastimil Babka <Vbabka@suse.cz>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: YueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70b44595
  17. 04 3月, 2019 2 次提交
    • Z
      drm/i915/gvt: Add mutual lock for ppgtt mm LRU list · 72aabfb8
      Zhenyu Wang 提交于
      This adds mutex to guard against update of global ppgtt mm LRU list.
      To resolve error found as below warning.
      
      [73130.012162] ------------[ cut here ]------------
      [73130.012168] list_add corruption. prev->next should be next (ffff995f970cca50), but was 0000000000000000. (prev=ffff995f0dc5bdf8).
      [73130.012181] WARNING: CPU: 3 PID: 82 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70
      [73130.012183] Modules linked in: btrfs(E) xor(E) zstd_decompress(E) zstd_compress(E) raid6_pq(E) dm_mod(E) kvmgt(E) fuse(E) xt_addrtype(E) nft_compat(E) xt_conntrack(E) nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) libcrc32c(E) br_netfilter(E) bridge(E) stp(E) llc(E) overlay(E) devlink(E) nf_tables(E) nfnetlink(E) loop(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) crct10dif_pclmul(E) crc32_pclmul(E) ghash_clmulni_intel(E) mei_me(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) intel_cstate(E) intel_uncore(E) mei(E) intel_pch_thermal(E) intel_rapl_perf(E) pcspkr(E) iTCO_wdt(E) iTCO_vendor_support(E) idma64(E) sg(E) virt_dma(E) acpi_pad(E) evdev(E) binfmt_misc(E) ip_tables(E) x_tables(E) ipv6(E) autofs4(E) hid_generic(E) usbhid(E) hid(E) ext4(E) crc32c_generic(E) crc16(E) mbcache(E) jbd2(E) fscrypto(E) xhci_pci(E) sdhci_pci(E) cqhci(E) intel_lpss_pci(E) intel_lpss(E) crc32c_intel(E) xhci_hcd(E) sdhci(E) i2c_i801(E) e1000e(E) mmc_core(E)
      [73130.012218]  ptp(E) pps_core(E) usbcore(E) mfd_core(E) sd_mod(E) fan(E) thermal(E)
      [73130.012227] CPU: 3 PID: 82 Comm: gvt workload 0 Tainted: G        W   E     5.0.0-rc7-staging-190226+ #282
      [73130.012228] Hardware name:  /NUC6i5SYB, BIOS SYSKLi35.86A.0039.2016.0316.1747 03/16/2016
      [73130.012232] RIP: 0010:__list_add_valid+0x4d/0x70
      [73130.012234] Code: c3 48 89 d1 48 c7 c7 e0 82 91 bb 48 89 c2 e8 44 8a cc ff 0f 0b 31 c0 c3 48 89 c1 4c 89 c6 48 c7 c7 30 83 91 bb e8 2d 8a cc ff <0f> 0b 31 c0 c3 48 89 f2 4c 89 c1 48 89 fe 48 c7 c7 80 83 91 bb e8
      [73130.012236] RSP: 0018:ffffa4924107fdd0 EFLAGS: 00010286
      [73130.012238] RAX: 0000000000000000 RBX: ffff995d8a5ccf00 RCX: 0000000000000006
      [73130.012240] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff995faad96680
      [73130.012241] RBP: 0000000000000000 R08: 0000000000213a28 R09: 0000000000000084
      [73130.012243] R10: 0000000000000000 R11: ffffa4924107fc70 R12: ffff995d8a5ccf78
      [73130.012245] R13: ffff995f970c8000 R14: ffff995f0dc5bdf8 R15: ffff995f970cca50
      [73130.012247] FS:  0000000000000000(0000) GS:ffff995faad80000(0000) knlGS:0000000000000000
      [73130.012249] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [73130.012250] CR2: 00000222e1891000 CR3: 0000000116848002 CR4: 00000000003626e0
      [73130.012252] Call Trace:
      [73130.012258]  intel_vgpu_pin_mm+0x7a/0xa0
      [73130.012262]  workload_thread+0x683/0x12a0
      [73130.012266]  ? do_wait_intr_irq+0xb0/0xb0
      [73130.012269]  ? finish_wait+0x80/0x80
      [73130.012271]  ? intel_vgpu_clean_workloads+0x110/0x110
      [73130.012274]  kthread+0x116/0x130
      [73130.012276]  ? kthread_bind+0x30/0x30
      [73130.012280]  ret_from_fork+0x35/0x40
      [73130.012285] WARNING: CPU: 3 PID: 82 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70
      [73130.012286] ---[ end trace 458a2e792eec21c0 ]---
      
      v2:
      - simplify lock handling
      Reviewed-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Cc: Xiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      72aabfb8
    • Z
      drm/i915/gvt: Only assign ppgtt root at dispatch time · 1e18d5e6
      Zhenyu Wang 提交于
      This moves ppgtt root hook out of scan and shadow function,
      as it's only required at dispatch time. Also make sure this
      checks against shadow mm to be ready, otherwise bail to fail
      earlier.
      Reviewed-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Cc: Xiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      1e18d5e6
  18. 01 3月, 2019 2 次提交
    • Z
      drm/i915/gvt: Don't submit request for error workload dispatch · f552e7bd
      Zhenyu Wang 提交于
      As vGPU shadow ctx is loaded with guest context state, arbitrarily
      submitting request in error workload dispatch path would cause trouble.
      So don't try to submit in error path now like in previous code.
      This is to fix VM failure when GPU hang happens.
      
      Fixes: f0e99437 ("drm/i915/gvt: Fix workload request allocation before request add")
      Reviewed-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      f552e7bd
    • W
      drm/i915/gvt: stop scheduling workload when vgpu is inactive · 9f498477
      Weinan Li 提交于
      There is one corner case that workload_thread may pick and dispatch one
      workload of vgpu after it's already deactivated. Below is the scenario:
      
      1. deactive_vgpu got the vgpu_lock, it found pending workload was
      submitted, then it released the vgpu_lock and wait for vgpu idle.
      2. before deactive_vgpu got the vgpu_lock back, workload_thread might pick
      one new valid workload, then it was blocked by the vgpu_lock.
      3. deactive_vgpu got the vgpu_lock again, finished the last processes of
      deactivating, then release the vgpu_lock.
      4. workload_thread got the vgpu_lock, then it will try to dispatch the
      fetched workload. It's not expected one workload of deactivated vgpu is
      dispatched.
      
      The solution is to add condition check of the vgpu's active flag and stop
      to schedule when it's inactive.
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NWeinan Li <weinan.z.li@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      9f498477
  19. 22 2月, 2019 1 次提交
    • C
      drm/i915/gvt: Add in context mmio 0x20D8 to gen9 mmio list · 1e8b15a1
      Colin Xu 提交于
      Depends on GEN family and I915_PARAM_HAS_CONTEXT_ISOLATION, Mesa driver
      will decide whether constant buffer 0 address is relative or absolute,
      and load GPU initial state by lri to context mmio INSTPM (GEN8)
      or 0x20D8 (>=GEN9).
      Mesa Commit fa8a764b62
      ("i965: Use absolute addressing for constant buffer 0 on Kernel 4.16+.")
      
      INSTPM is already added to gen8_engine_mmio_list, but 0x20D8 is missed
      in gen9_engine_mmio_list. From GVT point of view, different guest could
      have different context so should switch those mmio accordingly.
      
      v2: Update fixes commit ID.
      
      Fixes: 17865713 ("drm/i915/gvt: vGPU context switch")
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      1e8b15a1
  20. 21 2月, 2019 1 次提交
    • Z
      drm/i915/gvt: Fix MI_FLUSH_DW parsing with correct index check · 13bcb80b
      Zhenyu Wang 提交于
      When MI_FLUSH_DW post write hw status page in index mode, the index
      value is in dword step and turned into address offset in cmd dword1.
      As status page size is 4K, so can't exceed that.
      
      This fixed upper bound check in cmd parser code which incorrectly
      stopped VM for reason of invalid MI_FLUSH_DW write index.
      
      v2:
      - Fix upper bound as 4K page size because index value is address offset.
      
      Fixes: be1da707 ("drm/i915/gvt: vGPU command scanner")
      Cc: stable@vger.kernel.org # v4.10+
      Cc: "Zhao, Yan Y" <yan.y.zhao@intel.com>
      Reviewed-by: NYan Zhao <yan.y.zhao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      13bcb80b
  21. 20 2月, 2019 1 次提交
  22. 16 2月, 2019 1 次提交