From: Chris Wilson Date: Mon, 4 Jan 2010 18:57:57 +0000 (+0000) Subject: drm/i915: Permit pinning whilst the device is 'suspended' X-Git-Tag: firefly_0821_release~11625^2~371 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c6939598243bc2dbaece589a8dadb547d9083098;p=firefly-linux-kernel-4.4.55.git drm/i915: Permit pinning whilst the device is 'suspended' commit e3d8affb0d2d95f2da61e30ce86b33177feb91e8 upstream. As pinning (allocating and binding GTT memory) does not actually invoke GPU commands, it is safe, and indeed is attempted, during resumption from suspension: [drm:intel_init_clock_gating] *ERROR* failed to pin power context: -16 Signed-off-by: Chris Wilson Reported-by: Hugh Dickins Signed-off-by: Eric Anholt Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 2e10b9a0db69..3d75c67fa78c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2571,9 +2571,6 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment) bool retry_alloc = false; int ret; - if (dev_priv->mm.suspended) - return -EBUSY; - if (obj_priv->madv != I915_MADV_WILLNEED) { DRM_ERROR("Attempting to bind a purgeable object\n"); return -EINVAL;