Message ID | 1414683003-17211-1-git-send-email-david.s.gordon@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
This is an old version. I have a new and improved patch that also fixes the legacy ring buffer case (which was equally broken). Will post shortly... On 30/10/2014 15:30, Dave Gordon wrote: > From: John Harrison <John.C.Harrison@Intel.com> > > Check whether each engine exists before trying to clean up the > corresponding logical ring. > > Change-Id: I31b1ed941824db2d6bd7233360dbce05671979a8 > Signed-off-by: Dave Gordon <david.s.gordon@intel.com> > --- > drivers/gpu/drm/i915/intel_lrc.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c > index cd74e5c..7a7d30a 100644 > --- a/drivers/gpu/drm/i915/intel_lrc.c > +++ b/drivers/gpu/drm/i915/intel_lrc.c > @@ -1444,13 +1444,17 @@ int intel_logical_rings_init(struct drm_device *dev) > return 0; > > cleanup_bsd2_ring: > - intel_logical_ring_cleanup(&dev_priv->ring[VCS2]); > + if (HAS_BSD2(dev)) > + intel_logical_ring_cleanup(&dev_priv->ring[VCS2]); > cleanup_vebox_ring: > - intel_logical_ring_cleanup(&dev_priv->ring[VECS]); > + if (HAS_VEBOX(dev)) > + intel_logical_ring_cleanup(&dev_priv->ring[VECS]); > cleanup_blt_ring: > - intel_logical_ring_cleanup(&dev_priv->ring[BCS]); > + if (HAS_BLT(dev)) > + intel_logical_ring_cleanup(&dev_priv->ring[BCS]); > cleanup_bsd_ring: > - intel_logical_ring_cleanup(&dev_priv->ring[VCS]); > + if (HAS_BSD(dev)) > + intel_logical_ring_cleanup(&dev_priv->ring[VCS]); > cleanup_render_ring: > intel_logical_ring_cleanup(&dev_priv->ring[RCS]); >
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index cd74e5c..7a7d30a 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1444,13 +1444,17 @@ int intel_logical_rings_init(struct drm_device *dev) return 0; cleanup_bsd2_ring: - intel_logical_ring_cleanup(&dev_priv->ring[VCS2]); + if (HAS_BSD2(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[VCS2]); cleanup_vebox_ring: - intel_logical_ring_cleanup(&dev_priv->ring[VECS]); + if (HAS_VEBOX(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[VECS]); cleanup_blt_ring: - intel_logical_ring_cleanup(&dev_priv->ring[BCS]); + if (HAS_BLT(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[BCS]); cleanup_bsd_ring: - intel_logical_ring_cleanup(&dev_priv->ring[VCS]); + if (HAS_BSD(dev)) + intel_logical_ring_cleanup(&dev_priv->ring[VCS]); cleanup_render_ring: intel_logical_ring_cleanup(&dev_priv->ring[RCS]);