]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: grab runtime pm first for forcewake use
authorXiaolin Zhang <xiaolin.zhang@intel.com>
Thu, 20 Jun 2019 14:29:24 +0000 (10:29 -0400)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 30 Jul 2019 06:30:36 +0000 (14:30 +0800)
commitaceb6a741818a89b71975cc7f167c2d430d8eeb4
tree480b7ba3f10253732a941f16ad42c1af0ebb3832
parentffee5ebe1863f9cbf55a95464f32c0ad0bb54532
drm/i915/gvt: grab runtime pm first for forcewake use

in workload_thread, it should grab runtime pm wakelock and later
uncore forcewake get will check rpm wakelock held successfully.
otherwise, sometimes, rpm wakelock not hold and print call trace below:

 Call Trace:
  intel_uncore_forcewake_get+0x15/0x20 [i915]
  workload_thread+0x5f9/0x16f0 [i915]
  ? __switch_to_asm+0x34/0x70
  ? __switch_to_asm+0x40/0x70
  ? __switch_to_asm+0x34/0x70
  ? __switch_to_asm+0x40/0x70
  ? __switch_to_asm+0x34/0x70
  ? __switch_to+0x85/0x3f0
  ? __switch_to_asm+0x40/0x70
  ? do_wait_intr_irq+0x90/0x90
  kthread+0x121/0x140
  ? intel_vgpu_clean_workloads+0x100/0x100 [i915]
  ? kthread_park+0x90/0x90
  ret_from_fork+0x35/0x40
 --[ end trace 86525f742a02e12c ]--

v2: adapted to use rpm structure.

Fixes: c752fccf004c ("drm/i915/gvt: Pin the per-engine GVT shadow contexts")
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Xiaolin Zhang <xiaolin.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c