]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add missing rpm wakelock to GGTT pread
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Aug 2016 08:09:53 +0000 (09:09 +0100)
committerJani Nikula <jani.nikula@intel.com>
Wed, 10 Aug 2016 21:59:48 +0000 (00:59 +0300)
commit8613589c7fac403c03aca972f75497f464d1dae8
treea88b3501378810469b0927440ab0cbae1dc8e9f6
parent75f41d2fb3173a6b0e9ce0e475feed9a553a2409
drm/i915: Add missing rpm wakelock to GGTT pread

Joonas spotted a discrepancy between the pwrite and pread ioctls, in
that pwrite takes the rpm wakelock around its GGTT access, The wakelock
is required in order for the GTT to function. In disregard for the
current convention, we take the rpm wakelock around the access itself
rather than around the struct_mutex as the nesting is not strictly
required and such ordering will one day be fixed by explicitly noting
the barrier dependencies between the GGTT and rpm.

Fixes: 7bd025036881 ("drm/i915: Support for pread/pwrite ...")
Reported-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: drm-intel-fixes@lists.freedesktop.org
Link: http://patchwork.freedesktop.org/patch/msgid/1470298193-21765-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
(cherry picked from commit 1dd5b6f2020389e75bb3d269c038497f065e68c9)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem.c