diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-04-11 06:13:37 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-04-11 07:44:02 -0400 |
commit | 02b312d05d1b51008e37f72f5a30c88e11c51ea5 (patch) | |
tree | 60223710eaedd4ce9389e20a50594db9e0c9437b /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 84d84cb7e20d3d2c6413c5f75634e88eb68a3f97 (diff) |
drm/i915: Stop sleeping from inside gen6_bsd_submit_request()
submit_request() is called from an atomic context, it's not allowed to
sleep. We have to be careful in our parameters to
intel_uncore_wait_for_register() to limit ourselves to the atomic wait
loop and not incur the wrath of our warnings.
Fixes: 6976e74b5fa1 ("drm/i915: Don't allow overuse of __intel_wait_for_register_fw()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170410143807.22725-1-chris@chris-wilson.co.uk
Link: http://patchwork.freedesktop.org/patch/msgid/20170411101340.31994-2-chris@chris-wilson.co.uk
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index c98acc27279a..331da59a1eb5 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1729,11 +1729,11 @@ static void gen6_bsd_submit_request(struct drm_i915_gem_request *request) | |||
1729 | I915_WRITE64_FW(GEN6_BSD_RNCID, 0x0); | 1729 | I915_WRITE64_FW(GEN6_BSD_RNCID, 0x0); |
1730 | 1730 | ||
1731 | /* Wait for the ring not to be idle, i.e. for it to wake up. */ | 1731 | /* Wait for the ring not to be idle, i.e. for it to wake up. */ |
1732 | if (intel_wait_for_register_fw(dev_priv, | 1732 | if (__intel_wait_for_register_fw(dev_priv, |
1733 | GEN6_BSD_SLEEP_PSMI_CONTROL, | 1733 | GEN6_BSD_SLEEP_PSMI_CONTROL, |
1734 | GEN6_BSD_SLEEP_INDICATOR, | 1734 | GEN6_BSD_SLEEP_INDICATOR, |
1735 | 0, | 1735 | 0, |
1736 | 50)) | 1736 | 1000, 0, NULL)) |
1737 | DRM_ERROR("timed out waiting for the BSD ring to wake up\n"); | 1737 | DRM_ERROR("timed out waiting for the BSD ring to wake up\n"); |
1738 | 1738 | ||
1739 | /* Now that the ring is fully powered up, update the tail */ | 1739 | /* Now that the ring is fully powered up, update the tail */ |