]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/i915: Do not override mode's aspect ratio with the prop value NONE
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 20 Jun 2019 14:26:38 +0000 (17:26 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 14 Nov 2019 17:49:19 +0000 (19:49 +0200)
HDMI_PICTURE_ASPECT_NONE means "Automatic" so when the user has that
selected we should keep whatever aspect ratio the mode already has.

Also no point in checking for connector->is_hdmi in the SDVO code
since we only attach the property to HDMI connectors.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190620142639.17518-5-ville.syrjala@linux.intel.com
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_sdvo.c

index 659a03b088493f40d01d84eec4f7991a71625d60..315920c35cc04255813c20da12ee3da15c4a790e 100644 (file)
@@ -2451,8 +2451,9 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
        if (ret)
                return ret;
 
-       /* Set user selected PAR to incoming mode's member */
-       adjusted_mode->picture_aspect_ratio = conn_state->picture_aspect_ratio;
+       if (conn_state->picture_aspect_ratio)
+               adjusted_mode->picture_aspect_ratio =
+                       conn_state->picture_aspect_ratio;
 
        pipe_config->lane_count = 4;
 
index a4b1339fcc00c8ceddae742dfe6914cc6ca0d72a..c9cae6a9e8974355232aac91457ff4bb0f98c3cc 100644 (file)
@@ -1349,9 +1349,9 @@ static int intel_sdvo_compute_config(struct intel_encoder *encoder,
        if (IS_TV(intel_sdvo_connector))
                i9xx_adjust_sdvo_tv_clock(pipe_config);
 
-       /* Set user selected PAR to incoming mode's member */
-       if (intel_sdvo_connector->is_hdmi)
-               adjusted_mode->picture_aspect_ratio = conn_state->picture_aspect_ratio;
+       if (conn_state->picture_aspect_ratio)
+               adjusted_mode->picture_aspect_ratio =
+                       conn_state->picture_aspect_ratio;
 
        if (!intel_sdvo_compute_avi_infoframe(intel_sdvo,
                                              pipe_config, conn_state)) {