Message ID | 20191120011016.18049-1-stuart.summers@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Do not initialize display BW when display not available | expand |
On Tue, Nov 19, 2019 at 05:10:16PM -0800, Stuart Summers wrote: > When display is not available, finding the memory bandwidth available > for display is not useful. Skip this sequence here. > > References: HSDES 1209978255 > > Signed-off-by: Stuart Summers <stuart.summers@intel.com> > --- > drivers/gpu/drm/i915/display/intel_bw.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c > index 3f6e29f61323..86e75e858008 100644 > --- a/drivers/gpu/drm/i915/display/intel_bw.c > +++ b/drivers/gpu/drm/i915/display/intel_bw.c > @@ -264,6 +264,9 @@ static unsigned int icl_max_bw(struct drm_i915_private *dev_priv, > > void intel_bw_init_hw(struct drm_i915_private *dev_priv) > { > + if (!HAS_DISPLAY(dev_priv)) > + return; > + It might make sense to catch this somewhere higher up. But seems OK for now until people figure out what HAS_DISPLAY actually means. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > if (IS_GEN(dev_priv, 12)) > icl_get_bw_info(dev_priv, &tgl_sa_info); > else if (IS_GEN(dev_priv, 11)) > -- > 2.22.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Wed, 2019-11-20 at 12:28 +0200, Ville Syrjälä wrote: > On Tue, Nov 19, 2019 at 05:10:16PM -0800, Stuart Summers wrote: > > When display is not available, finding the memory bandwidth > > available > > for display is not useful. Skip this sequence here. > > > > References: HSDES 1209978255 > > > > Signed-off-by: Stuart Summers <stuart.summers@intel.com> > > --- > > drivers/gpu/drm/i915/display/intel_bw.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_bw.c > > b/drivers/gpu/drm/i915/display/intel_bw.c > > index 3f6e29f61323..86e75e858008 100644 > > --- a/drivers/gpu/drm/i915/display/intel_bw.c > > +++ b/drivers/gpu/drm/i915/display/intel_bw.c > > @@ -264,6 +264,9 @@ static unsigned int icl_max_bw(struct > > drm_i915_private *dev_priv, > > > > void intel_bw_init_hw(struct drm_i915_private *dev_priv) > > { > > + if (!HAS_DISPLAY(dev_priv)) > > + return; > > + > > It might make sense to catch this somewhere higher up. But seems OK > for > now until people figure out what HAS_DISPLAY actually means. We could reorganize this, but for now this is called in driver_hw_probe, so I figured it was better to allow this routine to handle the valid/invalid case itself rather than having the caller make that determination. > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Thanks for the review! -Stuart > > > if (IS_GEN(dev_priv, 12)) > > icl_get_bw_info(dev_priv, &tgl_sa_info); > > else if (IS_GEN(dev_priv, 11)) > > -- > > 2.22.0 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > >
diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c index 3f6e29f61323..86e75e858008 100644 --- a/drivers/gpu/drm/i915/display/intel_bw.c +++ b/drivers/gpu/drm/i915/display/intel_bw.c @@ -264,6 +264,9 @@ static unsigned int icl_max_bw(struct drm_i915_private *dev_priv, void intel_bw_init_hw(struct drm_i915_private *dev_priv) { + if (!HAS_DISPLAY(dev_priv)) + return; + if (IS_GEN(dev_priv, 12)) icl_get_bw_info(dev_priv, &tgl_sa_info); else if (IS_GEN(dev_priv, 11))
When display is not available, finding the memory bandwidth available for display is not useful. Skip this sequence here. References: HSDES 1209978255 Signed-off-by: Stuart Summers <stuart.summers@intel.com> --- drivers/gpu/drm/i915/display/intel_bw.c | 3 +++ 1 file changed, 3 insertions(+)