]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: add missing rpm ref to i915_gem_pwrite_ioctl
authorImre Deak <imre.deak@intel.com>
Wed, 12 Nov 2014 14:40:35 +0000 (16:40 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 18 Dec 2014 13:46:47 +0000 (15:46 +0200)
commit4906270a8389877954fa93a56b8f0cbc55a37a2a
tree41c6602a2650c5bbdc60edd71998eadacd739e74
parentda4b5717a3824f9b210d3d22ef8ea88896a38eec
drm/i915: add missing rpm ref to i915_gem_pwrite_ioctl

Without this RPM ref we can hit the device suspended WARN via:
i915_gem_object_pin()->ggtt_bind_vma->gen6_ggtt_insert_entries(). I
noticed this on my BYT while keeping the i915 device in runtime
suspended state for a while. I chose this place to take the ref to
avoid the possible deadlock via the mutex_lock taken both later in this
function and in the runtime suspend handler. This can happen if an RPM
suspend event is queued and need to be flushed before taking the RPM
ref.

Testcase: igt/pm_rpm/gem-evict-pwrite
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87363
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem.c