drm/i915: pass intel_encoder to intel_write_eld
authorJani Nikula <jani.nikula@intel.com>
Mon, 27 Oct 2014 14:26:46 +0000 (16:26 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 22:21:57 +0000 (23:21 +0100)
Everything else can be derived from that. No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_audio.c
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_hdmi.c

index 00e9bfcd1e8d22ae54f769e53280e131f6808494..829afd5305d16eeaa89184dc89cec8dabd0eb0de 100644 (file)
@@ -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);
 }
 
 /**
index cb5367c6f95a989554f71ae2540945c09895e5b9..2688bc940879aef148f118b3ccf9cf0c199e6d25 100644 (file)
@@ -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) {
index 64c8e047891d1db30d78c741d64758ac550b1816..b474a29d00d50e8da4e413359b6f088c17a08628 100644 (file)
@@ -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 */
index 3bbc4fe817ffa94d03461cd42d127be45cdf1d25..bf72a9201a15b912452645d0a88bcf4c7ec97166 100644 (file)
@@ -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);
index 8b5f3aa027f3550bfba3eb179939ca66f941b4c2..07b5ebd65d41cb59acdb65de400de6dd15fb183d 100644 (file)
@@ -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))