]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/intel_dvo: Drop call to intel_panel_fixed_mode() from compute_config
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 30 Apr 2026 13:12:18 +0000 (18:42 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Mon, 11 May 2026 04:20:56 +0000 (09:50 +0530)
The function intel_dvo_compute_config() calls intel_panel_fixed_mode() only
to check if there is a valid fixed_mode and based on that it then calls
intel_panel_compute_config().

However, since the intel_panel_compute_config() already checks for
fixed_mode and we can drop the call to intel_panel_fixed_mode().

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260430131220.3891497-4-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_dvo.c

index 65015477abed7ff003c1e81c63ab56e8cb46e91f..dd1a995c29799f030b38ad552e2dc122f3674070 100644 (file)
@@ -246,11 +246,9 @@ static int intel_dvo_compute_config(struct intel_encoder *encoder,
                                    struct intel_crtc_state *pipe_config,
                                    struct drm_connector_state *conn_state)
 {
-       struct intel_dvo *intel_dvo = enc_to_dvo(encoder);
        struct intel_connector *connector = to_intel_connector(conn_state->connector);
        struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
-       const struct drm_display_mode *fixed_mode =
-               intel_panel_fixed_mode(intel_dvo->attached_connector, adjusted_mode);
+       int ret;
 
        /*
         * If we have timings from the BIOS for the panel, put them in
@@ -258,13 +256,9 @@ static int intel_dvo_compute_config(struct intel_encoder *encoder,
         * with the panel scaling set up to source from the H/VDisplay
         * of the original mode.
         */
-       if (fixed_mode) {
-               int ret;
-
-               ret = intel_panel_compute_config(connector, adjusted_mode);
-               if (ret)
-                       return ret;
-       }
+       ret = intel_panel_compute_config(connector, adjusted_mode);
+       if (ret)
+               return ret;
 
        if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
                return -EINVAL;