[Intel-gfx] [PATCH 02/12] drm/i915: Remove encoder type checks from MST suspend/resume

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Jun 16 13:40:02 UTC 2016


On Thu, Jun 16, 2016 at 06:11:50PM +0530, Sharma, Shashank wrote:
> Regards
> Shashank
> On 6/8/2016 4:11 PM, ville.syrjala at linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > Now that eDP encoders won't have can_mst==true, we can throw out
> > the encoder type checks from the MST suspend/resume paths.
> >
> > Cc: Dave Airlie <airlied at redhat.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_dp.c | 28 ++++++++++------------------
> >   1 file changed, 10 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 0ab4f319f88f..29fb0d907f7b 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -5659,15 +5659,12 @@ void intel_dp_mst_suspend(struct drm_device *dev)
> >   	/* disable MST */
> >   	for (i = 0; i < I915_MAX_PORTS; i++) {
> >   		struct intel_digital_port *intel_dig_port = dev_priv->hotplug.irq_port[i];
> > -		if (!intel_dig_port)
> > +
> > +		if (!intel_dig_port || !intel_dig_port->dp.can_mst)
> >   			continue;
> >
> > -		if (intel_dig_port->base.type == INTEL_OUTPUT_DISPLAYPORT) {
> > -			if (!intel_dig_port->dp.can_mst)
> > -				continue;
> > -			if (intel_dig_port->dp.is_mst)
> > -				drm_dp_mst_topology_mgr_suspend(&intel_dig_port->dp.mst_mgr);
> > -		}
> > +		if (intel_dig_port->dp.is_mst)
> > +			drm_dp_mst_topology_mgr_suspend(&intel_dig_port->dp.mst_mgr);
> >   	}
> >   }
> >
> > @@ -5678,18 +5675,13 @@ void intel_dp_mst_resume(struct drm_device *dev)
> >
> >   	for (i = 0; i < I915_MAX_PORTS; i++) {
> >   		struct intel_digital_port *intel_dig_port = dev_priv->hotplug.irq_port[i];
> > -		if (!intel_dig_port)
> > -			continue;
> > -		if (intel_dig_port->base.type == INTEL_OUTPUT_DISPLAYPORT) {
> > -			int ret;
> > +		int ret;
> >
> > -			if (!intel_dig_port->dp.can_mst)
> > -				continue;
> > +		if (!intel_dig_port || !intel_dig_port->dp.can_mst)
> > +			continue;
> >
> > -			ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
> > -			if (ret != 0) {
> > -				intel_dp_check_mst_status(&intel_dig_port->dp);
> > -			}
> > -		}
> > +		ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
> > +		if (ret)
> > +			intel_dp_check_mst_status(&intel_dig_port->dp);
> Now when we are modifying this code, can we please check the return 
> value of this function 'intel_dp_check_mst_status' which returns an int ?

I'll leave that to someone that cares about MST, and undestands what the
code does.

> - Shashank
> >   	}
> >   }
> >

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list