@@ -64,6 +64,11 @@ inline struct drm_i915_private *intel_hdmi_to_i915(struct intel_hdmi *intel_hdmi
return to_i915(hdmi_to_dig_port(intel_hdmi)->base.base.dev);
}
+static inline struct intel_display *intel_hdmi_to_display(struct intel_hdmi *intel_hdmi)
+{
+ return to_intel_display(hdmi_to_dig_port(intel_hdmi)->base.base.dev);
+}
+
static void
assert_hdmi_port_disabled(struct intel_hdmi *intel_hdmi)
{
@@ -1239,16 +1244,16 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)
{
- struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi);
+ struct intel_display *display = intel_hdmi_to_display(hdmi);
struct i2c_adapter *ddc = hdmi->attached_connector->base.ddc;
if (hdmi->dp_dual_mode.type < DRM_DP_DUAL_MODE_TYPE2_DVI)
return;
- drm_dbg_kms(&dev_priv->drm, "%s DP dual mode adaptor TMDS output\n",
+ drm_dbg_kms(display->drm, "%s DP dual mode adaptor TMDS output\n",
enable ? "Enabling" : "Disabling");
- drm_dp_dual_mode_set_tmds_output(&dev_priv->drm,
+ drm_dp_dual_mode_set_tmds_output(display->drm,
hdmi->dp_dual_mode.type, ddc, enable);
}
Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/display/intel_hdmi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)