drm/i915/dsi: Use enc_to_intel_dsi()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 7 Mar 2024 15:18:07 +0000 (17:18 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 15 Mar 2024 08:53:16 +0000 (10:53 +0200)
Use enc_to_intel_dsi() instead hand rolling it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307151810.24208-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/vlv_dsi.c

index ac456a2275dbad62cb9a4ac7f706333c73dd03aa..79ecfc339430a25655dcef56c90c567c2badbc95 100644 (file)
@@ -1616,8 +1616,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
                                    struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *i915 = to_i915(encoder->base.dev);
-       struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
-                                                  base);
+       struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
        struct intel_connector *intel_connector = intel_dsi->attached_connector;
        struct drm_display_mode *adjusted_mode =
                &pipe_config->hw.adjusted_mode;
index 9b33b8a74d643470812859b00e0c36757a3aaf77..63f4af601d15ff73a21107d78de16fa9d21c6296 100644 (file)
@@ -273,8 +273,7 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
                                    struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_dsi *intel_dsi = container_of(encoder, struct intel_dsi,
-                                                  base);
+       struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
        struct intel_connector *intel_connector = intel_dsi->attached_connector;
        struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
        int ret;