[PATCH 4/5] drm/i915/dp_mst: Simplify getting a drm_device pointer needed by to_i915()

Imre Deak imre.deak at intel.com
Wed Jan 8 15:19:15 UTC 2025


Simplify getting a drm_device pointer when using to_i915() in
intel_dp_mst.c from the already available intel_display object, instead
of getting it from a DRM KMS object.

While at it rename dev_priv to i915, following the driver's standard
terminology.

Suggested-by: Jani Nikula <jani.nikula at intel.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 85f451c986ae8..fbc504037a969 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1423,7 +1423,7 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,
 {
 	struct intel_connector *connector = to_intel_connector(_connector);
 	struct intel_display *display = to_intel_display(connector);
-	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
+	struct drm_i915_private *i915 = to_i915(display->drm);
 	struct intel_dp *intel_dp = connector->mst_port;
 	struct drm_dp_mst_topology_mgr *mgr = &intel_dp->mst_mgr;
 	struct drm_dp_mst_port *port = connector->port;
@@ -1442,7 +1442,7 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,
 		return 0;
 	}
 
-	*status = intel_cpu_transcoder_mode_valid(dev_priv, mode);
+	*status = intel_cpu_transcoder_mode_valid(i915, mode);
 	if (*status != MODE_OK)
 		return 0;
 
@@ -1526,7 +1526,7 @@ mst_connector_mode_valid_ctx(struct drm_connector *_connector,
 		return 0;
 	}
 
-	*status = intel_mode_valid_max_plane_size(dev_priv, mode, num_joined_pipes);
+	*status = intel_mode_valid_max_plane_size(i915, mode, num_joined_pipes);
 	return 0;
 }
 
-- 
2.44.2



More information about the Intel-gfx mailing list