[Intel-gfx] [PATCH 08/43] drm/i915/hdmi: convert to encoder->disable/enable

Paulo Zanoni przanoni at gmail.com
Thu Jul 26 19:12:15 CEST 2012


Hi

2012/7/3 Daniel Vetter <daniel.vetter at ffwll.ch>:
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index f33fe1a..b71303c 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -752,3 +747,18 @@ void intel_ddi_dpms(struct drm_encoder *encoder, int mode)
>         I915_WRITE(DDI_BUF_CTL(port),
>                         temp);
>  }
> +
> +void intel_disable_ddi(struct intel_encoder *encoder)
> +{
> +       struct drm_device *dev = encoder->base.dev;
> +       struct drm_i915_private *dev_priv = dev->dev_private;
> +       struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
> +       int port = intel_hdmi->ddi_port;
> +       u32 temp;
> +
> +       temp = I915_READ(DDI_BUF_CTL(port));
> +       temp &= ~DDI_BUF_CTL_ENABLE;
> +
> +       I915_WRITE(DDI_BUF_CTL(port),
> +                       temp);

<bikeshed>
Since you're creating 2 "new functions" you might want to move temp to
the upper line in both intel_disable_did and intel_enable_ddi.

Every time I look at this I think about fixing it. And now there are
two. Maybe it's just my obsessive compulsive disorder... :)
</bikeshed>

-- 
Paulo Zanoni



More information about the Intel-gfx mailing list