Message ID | 1451372739-5904-1-git-send-email-praveen.paneri@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Praveen, [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on v4.4-rc7 next-20151223] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Praveen-Paneri/drm-i915-Unbind-objects-in-shrinker-only-if-device-is-runtime-active/20151229-145756 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-rhel (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/gpu/drm/i915/i915_gem_shrinker.c: In function 'i915_gem_shrink': >> drivers/gpu/drm/i915/i915_gem_shrinker.c:97:6: error: implicit declaration of function 'intel_runtime_pm_get_noidle' [-Werror=implicit-function-declaration] !intel_runtime_pm_get_noidle(dev_priv)) ^ cc1: some warnings being treated as errors vim +/intel_runtime_pm_get_noidle +97 drivers/gpu/drm/i915/i915_gem_shrinker.c 91 /* 92 * Unbinding of objects will require HW access; Let us not wake the 93 * device just to recover a little memory. If absolutely necessary, 94 * we will force the wake during oom-notifier. 95 */ 96 if ((flags & I915_SHRINK_BOUND) && > 97 !intel_runtime_pm_get_noidle(dev_priv)) 98 flags &= ~I915_SHRINK_BOUND; 99 100 /* --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c index f7df54a..6f91070 100644 --- a/drivers/gpu/drm/i915/i915_gem_shrinker.c +++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c @@ -89,6 +89,15 @@ i915_gem_shrink(struct drm_i915_private *dev_priv, i915_gem_retire_requests(dev_priv->dev); /* + * Unbinding of objects will require HW access; Let us not wake the + * device just to recover a little memory. If absolutely necessary, + * we will force the wake during oom-notifier. + */ + if ((flags & I915_SHRINK_BOUND) && + !intel_runtime_pm_get_noidle(dev_priv)) + flags &= ~I915_SHRINK_BOUND; + + /* * As we may completely rewrite the (un)bound list whilst unbinding * (due to retiring requests) we have to strictly process only * one element of the list at the time, and recheck the list @@ -145,6 +154,9 @@ i915_gem_shrink(struct drm_i915_private *dev_priv, list_splice(&still_in_list, phase->list); } + if (flags & I915_SHRINK_BOUND) + intel_runtime_pm_put(dev_priv); + i915_gem_retire_requests(dev_priv->dev); return count;