drm/i915: Add rpm get/put in oom and vmap notifier
authorPraveen Paneri <praveen.paneri@intel.com>
Mon, 2 May 2016 08:40:29 +0000 (14:10 +0530)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 2 May 2016 13:02:27 +0000 (14:02 +0100)
commitea9d9768a497e23713366a0e2ca290332bc1ed81
tree94d5317ac7eb21324f9adb2a9b19cef54605c09d
parent178a30c90ac74e661eb8c3703eff0daaa0aaf38f
drm/i915: Add rpm get/put in oom and vmap notifier

i915_gem_shrink() will scan the bound list only if device is not
suspended but in OOM failure scenario it becomes absolutely necessary
to release as much memory as possible. Also in allocation failure from
vmap address space, it is incumbent on the Driver to reap all its
vmaps. So, adding rpm get/put in i915_gem_shrinker_oom() and
i915_gem_shrinker_vmap() to ensure shrinking of bound objects as well.

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1462178429-13449-2-git-send-email-praveen.paneri@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem_shrinker.c