diff mbox series

[RFC,2/3] drm/i915/hdmi: drafting what struct intel_display usage would look like

Message ID aa83c0debb9300076ab53bb214a01d54833965a7.1695747484.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: split display from drm_i915_private and i915_drv.h | expand

Commit Message

Jani Nikula Sept. 26, 2023, 5:15 p.m. UTC
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(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index af4102e91769..f06d57b386c0 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -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);
 }