Message ID | 1395279079-12704-12-git-send-email-benjamin.widawsky@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Mar 19, 2014 at 06:31:18PM -0700, Ben Widawsky wrote: > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index ee32759..4de8800 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -2436,6 +2436,7 @@ void i915_gem_reset(struct drm_device *dev) > static void > i915_gem_retire_requests_ring(struct intel_ring_buffer *ring) > { > + struct drm_i915_private *dev_priv = ring->dev->dev_private; > uint32_t seqno; > > if (list_empty(&ring->request_list)) > @@ -2459,6 +2460,15 @@ i915_gem_retire_requests_ring(struct intel_ring_buffer *ring) > if (!i915_seqno_passed(seqno, obj->last_read_seqno)) > break; > > + /* Wa: can't find the w/a name. > + * This doesn't actually implement the w/a, but it a workaround > + * for the workaround. It defers using rc6 until we know valid > + * state exists. > + */ > + if (IS_BROADWELL(ring->dev) && intel_enable_rc6(ring->dev) && > + !dev_priv->rps.enabled && ring->id == RCS) > + intel_enable_gt_powersave(ring->dev); > + This is a big eyesore. I think we will both be happy if you move this to intel_mark_idle(). You can then check for ring[RCS]->last_context being set. > i915_gem_object_move_to_inactive(obj); > }
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index fa5d0ed..4dc18ea 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -672,6 +672,8 @@ int i915_reset(struct drm_device *dev) mutex_lock(&dev->struct_mutex); i915_gem_reset(dev); + if (IS_BROADWELL(dev)) + intel_disable_gt_powersave(dev); simulated = dev_priv->gpu_error.stop_rings != 0; @@ -726,7 +728,7 @@ int i915_reset(struct drm_device *dev) * reset and the re-install of drm irq. Skip for ironlake per * previous concerns that it doesn't respond well to some forms * of re-init after reset. */ - if (INTEL_INFO(dev)->gen > 5) { + if (INTEL_INFO(dev)->gen > 5 && !IS_BROADWELL(dev)) { mutex_lock(&dev->struct_mutex); intel_enable_gt_powersave(dev); mutex_unlock(&dev->struct_mutex); diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index ee32759..4de8800 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2436,6 +2436,7 @@ void i915_gem_reset(struct drm_device *dev) static void i915_gem_retire_requests_ring(struct intel_ring_buffer *ring) { + struct drm_i915_private *dev_priv = ring->dev->dev_private; uint32_t seqno; if (list_empty(&ring->request_list)) @@ -2459,6 +2460,15 @@ i915_gem_retire_requests_ring(struct intel_ring_buffer *ring) if (!i915_seqno_passed(seqno, obj->last_read_seqno)) break; + /* Wa: can't find the w/a name. + * This doesn't actually implement the w/a, but it a workaround + * for the workaround. It defers using rc6 until we know valid + * state exists. + */ + if (IS_BROADWELL(ring->dev) && intel_enable_rc6(ring->dev) && + !dev_priv->rps.enabled && ring->id == RCS) + intel_enable_gt_powersave(ring->dev); + i915_gem_object_move_to_inactive(obj); } diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0b19afd..12055c9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11221,6 +11221,11 @@ void intel_modeset_init_hw(struct drm_device *dev) intel_reset_dpio(dev); + if (IS_BROADWELL(dev)) { + DRM_DEBUG_DRIVER("Deferring RC6 enabling until first batch is complete\n"); + return; + } + mutex_lock(&dev->struct_mutex); intel_enable_gt_powersave(dev); mutex_unlock(&dev->struct_mutex);