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;
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);
}
/**
/* 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) {
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 */
/* 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);
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))