1. 08 3月, 2017 1 次提交
  2. 03 3月, 2017 2 次提交
  3. 02 3月, 2017 1 次提交
    • C
      drm/i915: Hold rpm during GEM suspend in driver unload/suspend · c998e8a0
      Chris Wilson 提交于
      i915_gem_suspend() tries to access the device to ensure it is idle and
      all writes from the device are flushed to memory. It assumed is already
      held the runtime pm wakeref, but we should explicitly acquire it for our
      access to be safe.
      
      [  619.926287] WARNING: CPU: 3 PID: 9353 at drivers/gpu/drm/i915/intel_drv.h:1750 gen6_write32+0x23e/0x2a0 [i915]
      [  619.926300] RPM wakelock ref not held during HW access
      [  619.926311] Modules linked in: vgem x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec coretemp snd_hwdep crct10dif_pclmul snd_hda_core crc32_pclmul snd_pcm mei_me mei lpc_ich ghash_clmulni_intel i915(-) sdhci_pci sdhci mmc_core e1000e ptp pps_core prime_numbers [last unloaded: snd_hda_intel]
      [  619.926578] CPU: 3 PID: 9353 Comm: drv_module_relo Tainted: G     U          4.10.0-CI-Trybot_609+ #1
      [  619.926585] Hardware name: LENOVO 42962WU/42962WU, BIOS 8DET56WW (1.26 ) 12/01/2011
      [  619.926592] Call Trace:
      [  619.926609]  dump_stack+0x67/0x92
      [  619.926625]  __warn+0xc6/0xe0
      [  619.926640]  warn_slowpath_fmt+0x4a/0x50
      [  619.926726]  gen6_write32+0x23e/0x2a0 [i915]
      [  619.926801]  gen6_mm_switch+0x38/0x70 [i915]
      [  619.926871]  i915_switch_context+0xec/0xa10 [i915]
      [  619.926942]  i915_gem_switch_to_kernel_context+0x13c/0x2b0 [i915]
      [  619.927019]  i915_gem_suspend+0x2b/0x180 [i915]
      [  619.927079]  i915_driver_unload+0x22/0x200 [i915]
      [  619.927093]  ? __this_cpu_preempt_check+0x13/0x20
      [  619.927105]  ? trace_hardirqs_on_caller+0xe7/0x200
      [  619.927118]  ? trace_hardirqs_on+0xd/0x10
      [  619.927128]  ? _raw_spin_unlock_irqrestore+0x3d/0x60
      [  619.927192]  i915_pci_remove+0x14/0x20 [i915]
      [  619.927205]  pci_device_remove+0x34/0xb0
      [  619.927219]  device_release_driver_internal+0x158/0x210
      [  619.927234]  driver_detach+0x3b/0x80
      [  619.927245]  bus_remove_driver+0x53/0xd0
      [  619.927256]  driver_unregister+0x27/0x50
      [  619.927267]  pci_unregister_driver+0x25/0xa0
      [  619.927351]  i915_exit+0x1a/0xb1a [i915]
      [  619.927362]  SyS_delete_module+0x193/0x1e0
      [  619.927378]  entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  619.927386] RIP: 0033:0x7f82b46c5d37
      [  619.927393] RSP: 002b:00007ffdb6f610d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0
      [  619.927408] RAX: ffffffffffffffda RBX: ffffffff81481ff3 RCX: 00007f82b46c5d37
      [  619.927415] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 000000000224f558
      [  619.927422] RBP: ffffc90001187f88 R08: 0000000000000000 R09: 00007ffdb6f61100
      [  619.927428] R10: 000000000224f4e0 R11: 0000000000000246 R12: 0000000000000000
      [  619.927435] R13: 00007ffdb6f612b0 R14: 0000000000000000 R15: 0000000000000000
      [  619.927451]  ? __this_cpu_preempt_check+0x13/0x20
      
      or
      
      [  641.646590] WARNING: CPU: 1 PID: 8913 at drivers/gpu/drm/i915/intel_drv.h:1750 intel_runtime_pm_get_noresume+0x8b/0x90 [i915]
      [  641.646595] RPM wakelock ref not held during HW access
      [  641.646600] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec snd_hwdep crct10dif_pclmul snd_hda_core crc32_pclmul ghash_clmulni_intel snd_pcm mei_me mei i915(-) r8169 mii prime_numbers i2c_hid [last unloaded: snd_hda_intel]
      [  641.646825] CPU: 1 PID: 8913 Comm: drv_module_relo Tainted: G     U          4.10.0-CI-Trybot_609+ #1
      [  641.646836] Hardware name: TOSHIBA SATELLITE P50-C/06F4                            , BIOS 1.20 10/08/2015
      [  641.646843] Call Trace:
      [  641.646857]  dump_stack+0x67/0x92
      [  641.646869]  __warn+0xc6/0xe0
      [  641.646880]  warn_slowpath_fmt+0x4a/0x50
      [  641.646893]  ? __this_cpu_preempt_check+0x13/0x20
      [  641.646904]  ? trace_hardirqs_on_caller+0xe7/0x200
      [  641.646957]  intel_runtime_pm_get_noresume+0x8b/0x90 [i915]
      [  641.647022]  __i915_add_request+0x423/0x540 [i915]
      [  641.647080]  i915_gem_switch_to_kernel_context+0x148/0x2b0 [i915]
      [  641.647145]  i915_gem_suspend+0x2b/0x180 [i915]
      [  641.647189]  i915_driver_unload+0x22/0x200 [i915]
      [  641.647200]  ? __this_cpu_preempt_check+0x13/0x20
      [  641.647210]  ? trace_hardirqs_on_caller+0xe7/0x200
      [  641.647220]  ? trace_hardirqs_on+0xd/0x10
      [  641.647231]  ? _raw_spin_unlock_irqrestore+0x3d/0x60
      [  641.647276]  i915_pci_remove+0x14/0x20 [i915]
      [  641.647293]  pci_device_remove+0x34/0xb0
      [  641.647307]  device_release_driver_internal+0x158/0x210
      [  641.647321]  driver_detach+0x3b/0x80
      [  641.647330]  bus_remove_driver+0x53/0xd0
      [  641.647338]  driver_unregister+0x27/0x50
      [  641.647348]  pci_unregister_driver+0x25/0xa0
      [  641.647415]  i915_exit+0x1a/0xb1a [i915]
      [  641.647429]  SyS_delete_module+0x193/0x1e0
      [  641.647444]  entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  641.647453] RIP: 0033:0x7fc622bd2d37
      [  641.647463] RSP: 002b:00007ffff8ffb5c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0
      [  641.647475] RAX: ffffffffffffffda RBX: ffffffff81481ff3 RCX: 00007fc622bd2d37
      [  641.647480] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000000000d49118
      [  641.647485] RBP: ffffc90000997f88 R08: 0000000000000000 R09: 00007ffff8ffb5f0
      [  641.647491] R10: 0000000000d490a0 R11: 0000000000000246 R12: 0000000000000000
      [  641.647498] R13: 00007ffff8ffb7a0 R14: 0000000000000000 R15: 0000000000000000
      [  641.647510]  ? __this_cpu_preempt_check+0x13/0x20
      
      v2: Keep holding rpm until the end to cover i915_gem_sanitize() as well.
      
      Fixes: 5ab57c70 ("drm/i915: Flush logical context image out to memory upon suspend")
      Fixes: 1c777c5d ("drm/i915/hsw: Fix GPU hang during resume from S3-devices state")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170302083029.19576-1-chris@chris-wilson.co.ukReviewed-by: NImre Deak <imre.deak@intel.com>
      Cc: <stable@vger.kernel.org> # v4.9+
      c998e8a0
  4. 28 2月, 2017 1 次提交
    • C
      drm/i915: Delay disabling the user interrupt for breadcrumbs · 67b807a8
      Chris Wilson 提交于
      A significant cost in setting up a wait is the overhead of enabling the
      interrupt. As we disable the interrupt whenever the queue of waiters is
      empty, if we are frequently waiting on alternating batches, we end up
      re-enabling the interrupt on a frequent basis. We do want to disable the
      interrupt during normal operations as under high load it may add several
      thousand interrupts/s - we have been known in the past to occupy whole
      cores with our interrupt handler after accidentally leaving user
      interrupts enabled. As a compromise, leave the interrupt enabled until
      the next IRQ, or the system is idle. This gives a small window for a
      waiter to keep the interrupt active and not be delayed by having to
      re-enable the interrupt.
      
      v2: Restore hangcheck/missed-irq detection for continuations
      v3: Be more careful restoring the hangcheck timer after reset
      v4: Be more careful restoring the fake irq after reset (if required!)
      v5: Redo changes to intel_engine_wakeup()
      v6: Factor out __intel_engine_wakeup()
      v7: Improve commentary for declaring a missed wakeup
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-4-chris@chris-wilson.co.uk
      67b807a8
  5. 25 2月, 2017 1 次提交
    • K
      drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters. · ef0f411f
      Kenneth Graunke 提交于
      This patch makes the I915_PARAM_HAS_EXEC_CONSTANTS getparam return 0
      (indicating the optional feature is not supported), and makes execbuf
      always return -EINVAL if the flags are used.
      
      Apparently, no userspace ever shipped which used this optional feature:
      I checked the git history of Mesa, xf86-video-intel, libva, and Beignet,
      and there were zero commits showing a use of these flags.  Kernel commit
      72bfa19c apparently introduced the feature prematurely.  According
      to Chris, the intention was to use this in cairo-drm, but "the use was
      broken for gen6", so I don't think it ever happened.
      
      'relative_constants_mode' has always been tracked per-device, but this
      has actually been wrong ever since hardware contexts were introduced, as
      the INSTPM register is saved (and automatically restored) as part of the
      render ring context. The software per-device value could therefore get
      out of sync with the hardware per-context value.  This meant that using
      them is actually unsafe: a client which tried to use them could damage
      the state of other clients, causing the GPU to interpret their BO
      offsets as absolute pointers, leading to bogus memory reads.
      
      These flags were also never ported to execlist mode, making them no-ops
      on Gen9+ (which requires execlists), and Gen8 in the default mode.
      
      On Gen8+, userspace can write these registers directly, achieving the
      same effect.  On Gen6-7.5, it likely makes sense to extend the command
      parser to support them.  I don't think anyone wants this on Gen4-5.
      
      Based on a patch by Dave Gordon.
      
      v3: Return -ENODEV for the getparam, as this is what we do for other
          obsolete features.  Suggested by Chris Wilson.
      
      Cc: stable@vger.kernel.org
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92448Signed-off-by: NKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170215093446.21291-1-kenneth@whitecape.orgAcked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      ef0f411f
  6. 23 2月, 2017 1 次提交
  7. 22 2月, 2017 6 次提交
  8. 17 2月, 2017 3 次提交
  9. 16 2月, 2017 2 次提交
  10. 14 2月, 2017 6 次提交
  11. 13 2月, 2017 4 次提交
  12. 11 2月, 2017 2 次提交
  13. 09 2月, 2017 4 次提交
  14. 08 2月, 2017 3 次提交
    • C
      drm/i915: Remove overzealous fence warn on runtime suspend · 83bf6d55
      Chris Wilson 提交于
      The goal of the WARN was to catch when we are still actively using the
      fence as we go into the runtime suspend. However, the reg->pin_count is
      too coarse as it does not distinguish between exclusive ownership of the
      fence register from activity.
      
      I've not improved on the WARN, nor have we captured this WARN in an
      exact igt, but it is showing up regularly in the wild:
      
      [ 1915.935332] WARNING: CPU: 1 PID: 10861 at drivers/gpu/drm/i915/i915_gem.c:2022 i915_gem_runtime_suspend+0x116/0x130 [i915]
      [ 1915.935383] WARN_ON(reg->pin_count)[ 1915.935399] Modules linked in:
       snd_hda_intel i915 drm_kms_helper vgem netconsole scsi_transport_iscsi fuse vfat fat x86_pkg_temp_thermal coretemp intel_cstate intel_uncore snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd mei_me mei serio_raw intel_rapl_perf intel_pch_thermal soundcore wmi acpi_pad i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops drm r8169 mii video [last unloaded: drm_kms_helper]
      [ 1915.935785] CPU: 1 PID: 10861 Comm: kworker/1:0 Tainted: G     U  W       4.9.0-rc5+ #170
      [ 1915.935799] Hardware name: LENOVO 80MX/Lenovo E31-80, BIOS DCCN34WW(V2.03) 12/01/2015
      [ 1915.935822] Workqueue: pm pm_runtime_work
      [ 1915.935845]  ffffc900044fbbf0 ffffffffac3220bc ffffc900044fbc40 0000000000000000
      [ 1915.935890]  ffffc900044fbc30 ffffffffac059bcb 000007e6044fbc60 ffff8801626e3198
      [ 1915.935937]  ffff8801626e0000 0000000000000002 ffffffffc05e5d4e 0000000000000000
      [ 1915.935985] Call Trace:
      [ 1915.936013]  [<ffffffffac3220bc>] dump_stack+0x4f/0x73
      [ 1915.936038]  [<ffffffffac059bcb>] __warn+0xcb/0xf0
      [ 1915.936060]  [<ffffffffac059c4f>] warn_slowpath_fmt+0x5f/0x80
      [ 1915.936158]  [<ffffffffc052d916>] i915_gem_runtime_suspend+0x116/0x130 [i915]
      [ 1915.936251]  [<ffffffffc04f1c74>] intel_runtime_suspend+0x64/0x280 [i915]
      [ 1915.936277]  [<ffffffffac0926f1>] ? dequeue_entity+0x241/0xbc0
      [ 1915.936298]  [<ffffffffac36bb85>] pci_pm_runtime_suspend+0x55/0x180
      [ 1915.936317]  [<ffffffffac36bb30>] ? pci_pm_runtime_resume+0xa0/0xa0
      [ 1915.936339]  [<ffffffffac4514e2>] __rpm_callback+0x32/0x70
      [ 1915.936356]  [<ffffffffac451544>] rpm_callback+0x24/0x80
      [ 1915.936375]  [<ffffffffac36bb30>] ? pci_pm_runtime_resume+0xa0/0xa0
      [ 1915.936392]  [<ffffffffac45222d>] rpm_suspend+0x12d/0x680
      [ 1915.936415]  [<ffffffffac69f6d7>] ? _raw_spin_unlock_irq+0x17/0x30
      [ 1915.936435]  [<ffffffffac0810b8>] ? finish_task_switch+0x88/0x220
      [ 1915.936455]  [<ffffffffac4534bf>] pm_runtime_work+0x6f/0xb0
      [ 1915.936477]  [<ffffffffac074353>] process_one_work+0x1f3/0x4d0
      [ 1915.936501]  [<ffffffffac074678>] worker_thread+0x48/0x4e0
      [ 1915.936523]  [<ffffffffac074630>] ? process_one_work+0x4d0/0x4d0
      [ 1915.936542]  [<ffffffffac074630>] ? process_one_work+0x4d0/0x4d0
      [ 1915.936559]  [<ffffffffac07a2c9>] kthread+0xd9/0xf0
      [ 1915.936580]  [<ffffffffac07a1f0>] ? kthread_park+0x60/0x60
      [ 1915.936600]  [<ffffffffac69fe62>] ret_from_fork+0x22/0x30
      
      In the case the register is pinned, it should be present and we will
      need to invalidate them to be restored upon resume as we cannot expect
      the owner of the pin to call get_fence prior to use after resume.
      
      Fixes: 7c108fd8 ("drm/i915: Move fence cancellation to runtime suspend")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98804Reported-by: NLionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Imre Deak <imre.deak@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
      Link: http://patchwork.freedesktop.org/patch/msgid/20170203125717.8431-1-chris@chris-wilson.co.ukReviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      (cherry picked from commit e0ec3ec6)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      83bf6d55
    • C
      drm/i915: Flush untouched framebuffers before display on !llc · e3818697
      Chris Wilson 提交于
      On a non-llc system, the objects are created with .cache_level =
      CACHE_NONE and so the transition to uncached for scanout is a no-op.
      However, if the object was never written to, it will still be in the CPU
      domain (having been zeroed out by shmemfs). Those cachelines need to be
      flushed prior to display.
      
      Reported-and-tested-by: Vito Caputo
      Fixes: a6a7cc4b ("drm/i915: Always flush the dirty CPU cache when pinning the scanout")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
      Link: http://patchwork.freedesktop.org/patch/msgid/20170109111932.6342-1-chris@chris-wilson.co.ukReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      (cherry picked from commit 69aeafea)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      e3818697
    • C
      drm/i915: Restore context and pd for ringbuffer submission after reset · c0dcb203
      Chris Wilson 提交于
      Following a reset, the context and page directory registers are lost.
      However, the queue of requests that we resubmit after the reset may
      depend upon them - the registers are restored from a context image, but
      that restore may be inhibited and may simply be absent from the request
      if it was in the middle of a sequence using the same context. If we
      prime the CCID/PD registers with the first request in the queue (even
      for the hung request), we prevent invalid memory access for the
      following requests (and continually hung engines).
      
      v2: Magic BIT(8), reserved for future use but still appears unused.
      v3: Some commentary on handling innocent vs guilty requests
      v4: Add a wait for PD_BASE fetch. The reload appears to be instant on my
      Ivybridge, but this bit probably exists for a reason.
      
      Fixes: 821ed7df ("drm/i915: Update reset path to fix incomplete requests")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170207152437.4252-1-chris@chris-wilson.co.ukReviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      c0dcb203
  15. 07 2月, 2017 1 次提交
    • C
      drm/i915: Remove overzealous fence warn on runtime suspend · e0ec3ec6
      Chris Wilson 提交于
      The goal of the WARN was to catch when we are still actively using the
      fence as we go into the runtime suspend. However, the reg->pin_count is
      too coarse as it does not distinguish between exclusive ownership of the
      fence register from activity.
      
      I've not improved on the WARN, nor have we captured this WARN in an
      exact igt, but it is showing up regularly in the wild:
      
      [ 1915.935332] WARNING: CPU: 1 PID: 10861 at drivers/gpu/drm/i915/i915_gem.c:2022 i915_gem_runtime_suspend+0x116/0x130 [i915]
      [ 1915.935383] WARN_ON(reg->pin_count)[ 1915.935399] Modules linked in:
       snd_hda_intel i915 drm_kms_helper vgem netconsole scsi_transport_iscsi fuse vfat fat x86_pkg_temp_thermal coretemp intel_cstate intel_uncore snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_timer snd mei_me mei serio_raw intel_rapl_perf intel_pch_thermal soundcore wmi acpi_pad i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops drm r8169 mii video [last unloaded: drm_kms_helper]
      [ 1915.935785] CPU: 1 PID: 10861 Comm: kworker/1:0 Tainted: G     U  W       4.9.0-rc5+ #170
      [ 1915.935799] Hardware name: LENOVO 80MX/Lenovo E31-80, BIOS DCCN34WW(V2.03) 12/01/2015
      [ 1915.935822] Workqueue: pm pm_runtime_work
      [ 1915.935845]  ffffc900044fbbf0 ffffffffac3220bc ffffc900044fbc40 0000000000000000
      [ 1915.935890]  ffffc900044fbc30 ffffffffac059bcb 000007e6044fbc60 ffff8801626e3198
      [ 1915.935937]  ffff8801626e0000 0000000000000002 ffffffffc05e5d4e 0000000000000000
      [ 1915.935985] Call Trace:
      [ 1915.936013]  [<ffffffffac3220bc>] dump_stack+0x4f/0x73
      [ 1915.936038]  [<ffffffffac059bcb>] __warn+0xcb/0xf0
      [ 1915.936060]  [<ffffffffac059c4f>] warn_slowpath_fmt+0x5f/0x80
      [ 1915.936158]  [<ffffffffc052d916>] i915_gem_runtime_suspend+0x116/0x130 [i915]
      [ 1915.936251]  [<ffffffffc04f1c74>] intel_runtime_suspend+0x64/0x280 [i915]
      [ 1915.936277]  [<ffffffffac0926f1>] ? dequeue_entity+0x241/0xbc0
      [ 1915.936298]  [<ffffffffac36bb85>] pci_pm_runtime_suspend+0x55/0x180
      [ 1915.936317]  [<ffffffffac36bb30>] ? pci_pm_runtime_resume+0xa0/0xa0
      [ 1915.936339]  [<ffffffffac4514e2>] __rpm_callback+0x32/0x70
      [ 1915.936356]  [<ffffffffac451544>] rpm_callback+0x24/0x80
      [ 1915.936375]  [<ffffffffac36bb30>] ? pci_pm_runtime_resume+0xa0/0xa0
      [ 1915.936392]  [<ffffffffac45222d>] rpm_suspend+0x12d/0x680
      [ 1915.936415]  [<ffffffffac69f6d7>] ? _raw_spin_unlock_irq+0x17/0x30
      [ 1915.936435]  [<ffffffffac0810b8>] ? finish_task_switch+0x88/0x220
      [ 1915.936455]  [<ffffffffac4534bf>] pm_runtime_work+0x6f/0xb0
      [ 1915.936477]  [<ffffffffac074353>] process_one_work+0x1f3/0x4d0
      [ 1915.936501]  [<ffffffffac074678>] worker_thread+0x48/0x4e0
      [ 1915.936523]  [<ffffffffac074630>] ? process_one_work+0x4d0/0x4d0
      [ 1915.936542]  [<ffffffffac074630>] ? process_one_work+0x4d0/0x4d0
      [ 1915.936559]  [<ffffffffac07a2c9>] kthread+0xd9/0xf0
      [ 1915.936580]  [<ffffffffac07a1f0>] ? kthread_park+0x60/0x60
      [ 1915.936600]  [<ffffffffac69fe62>] ret_from_fork+0x22/0x30
      
      In the case the register is pinned, it should be present and we will
      need to invalidate them to be restored upon resume as we cannot expect
      the owner of the pin to call get_fence prior to use after resume.
      
      Fixes: 7c108fd8 ("drm/i915: Move fence cancellation to runtime suspend")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98804Reported-by: NLionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Imre Deak <imre.deak@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
      Link: http://patchwork.freedesktop.org/patch/msgid/20170203125717.8431-1-chris@chris-wilson.co.ukReviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      e0ec3ec6
  16. 03 2月, 2017 1 次提交
    • C
      drm: Improve drm_mm search (and fix topdown allocation) with rbtrees · 4e64e553
      Chris Wilson 提交于
      The drm_mm range manager claimed to support top-down insertion, but it
      was neither searching for the top-most hole that could fit the
      allocation request nor fitting the request to the hole correctly.
      
      In order to search the range efficiently, we create a secondary index
      for the holes using either their size or their address. This index
      allows us to find the smallest hole or the hole at the bottom or top of
      the range efficiently, whilst keeping the hole stack to rapidly service
      evictions.
      
      v2: Search for holes both high and low. Rename flags to mode.
      v3: Discover rb_entry_safe() and use it!
      v4: Kerneldoc for enum drm_mm_insert_mode.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Sinclair Yeh <syeh@vmware.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: Sinclair Yeh <syeh@vmware.com> # vmwgfx
      Reviewed-by: Lucas Stach <l.stach@pengutronix.de> #etnaviv
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170202210438.28702-1-chris@chris-wilson.co.uk
      4e64e553
  17. 01 2月, 2017 1 次提交