[Intel-gfx] [PATCH 02/33] drm/i915: Convert intel_dp to enum port

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jan 25 13:28:35 CET 2013


On Thu, Jan 24, 2013 at 03:54:19PM -0200, Paulo Zanoni wrote:
> Hi
> 
> 2013/1/24  <ville.syrjala at linux.intel.com>:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > Use intel_dig_port->port rather than intel_dp->output_reg.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index f05364a..d274f8e 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -2293,16 +2293,17 @@ g4x_dp_detect(struct intel_dp *intel_dp)
> >  {
> >         struct drm_device *dev = intel_dp_to_dev(intel_dp);
> >         struct drm_i915_private *dev_priv = dev->dev_private;
> > +       struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
> 
> 
> Minor optional detail:
> With "struct drm_device *dev = intel_dig_port->base.base.dev" you
> would save a call to intel_dp_to_dev (which calls dp_to_dig_port).

Dang :)

> With or without that:
> Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

Cheers. Daniel slurped it already, so w/o it is.

> 
> >         uint32_t bit;
> >
> > -       switch (intel_dp->output_reg) {
> > -       case DP_B:
> > +       switch (intel_dig_port->port) {
> > +       case PORT_B:
> >                 bit = DPB_HOTPLUG_LIVE_STATUS;
> >                 break;
> > -       case DP_C:
> > +       case PORT_C:
> >                 bit = DPC_HOTPLUG_LIVE_STATUS;
> >                 break;
> > -       case DP_D:
> > +       case PORT_D:
> >                 bit = DPD_HOTPLUG_LIVE_STATUS;
> >                 break;
> >         default:
> > --
> > 1.7.12.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Paulo Zanoni

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list