Re: [PATCH v2 04/18] drm/i915: pass intel_encoder to intel_write_eld

Rodrigo Vivi
2014-10-27T17:47:43Z

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

On Mon, Oct 27, 2014 at 7:26 AM, Jani Nikula <jani.nikula@intel.com> wrote:
> Everything else can be derived from that. No functional changes.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/intel_audio.c | 9 +++++----
> drivers/gpu/drm/i915/intel_ddi.c | 2 +-
> drivers/gpu/drm/i915/intel_dp.c | 2 +-
> drivers/gpu/drm/i915/intel_drv.h | 3 +--
> drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
> 5 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 00e9bfcd1e8d..829afd5305d1 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -313,10 +313,11 @@ static void ironlake_write_eld(struct drm_connector *connector,
> I915_WRITE(aud_cntrl_st2, tmp);
> }
>
> -void intel_write_eld(struct drm_encoder *encoder,
> - struct drm_display_mode *mode)
> +void intel_write_eld(struct intel_encoder *intel_encoder)
> {
> - struct drm_crtc *crtc = encoder->crtc;
> + struct drm_encoder *encoder = &intel_encoder->base;
> + struct intel_crtc *crtc = to_intel_crtc(encoder->crtc);
> + struct drm_display_mode *mode = &crtc->config.adjusted_mode;
> struct drm_connector *connector;
> struct drm_device *dev = encoder->dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> @@ -334,7 +335,7 @@ void intel_write_eld(struct drm_encoder *encoder,
> connector->eld[6] = drm_av_sync_delay(connector, mode) / 2;
>
> if (dev_priv->display.write_eld)
> - dev_priv->display.write_eld(connector, crtc, mode);
> + dev_priv->display.write_eld(connector, encoder->crtc, mode);
> }
>
> /**
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index cb5367c6f95a..2688bc940879 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1126,7 +1126,7 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder)
>
> /* write eld */
> DRM_DEBUG_DRIVER("DDI audio: write eld information\n");
> - intel_write_eld(encoder, &crtc->config.adjusted_mode);
> + intel_write_eld(intel_encoder);
> }
>
> if (type == INTEL_OUTPUT_EDP) {
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 4455009fb471..eafe9f598a03 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1250,7 +1250,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder)
> DRM_DEBUG_DRIVER("Enabling DP audio on pipe %c\n",
> pipe_name(crtc->pipe));
> intel_dp->DP |= DP_AUDIO_OUTPUT_ENABLE;
> - intel_write_eld(&encoder->base, adjusted_mode);
> + intel_write_eld(encoder);
> }
>
> /* Split out the IBX/CPU vs CPT settings */
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index 3bbc4fe817ff..bf72a9201a15 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -850,8 +850,7 @@ void intel_fb_obj_flush(struct drm_i915_gem_object *obj, bool retire);
>
> /* intel_audio.c */
> void intel_init_audio(struct drm_device *dev);
> -void intel_write_eld(struct drm_encoder *encoder,
> - struct drm_display_mode *mode);
> +void intel_write_eld(struct intel_encoder *encoder);
>
> /* intel_display.c */
> const char *intel_output_name(int output);
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 8b5f3aa027f3..07b5ebd65d41 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -666,7 +666,7 @@ static void intel_hdmi_prepare(struct intel_encoder *encoder)
> DRM_DEBUG_DRIVER("Enabling HDMI audio on pipe %c\n",
> pipe_name(crtc->pipe));
> hdmi_val |= SDVO_AUDIO_ENABLE;
> - intel_write_eld(&encoder->base, adjusted_mode);
> + intel_write_eld(encoder);
> }
>
> if (HAS_PCH_CPT(dev))
> --
> 2.1.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br