drm/i915: Move HDMI aspect ratio setup to .compute_config()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 8 Sep 2015 10:40:48 +0000 (13:40 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 30 Sep 2015 08:20:10 +0000 (10:20 +0200)
We shouldn't frob adjusted_mode after .compute_config(), so move the
infoframe aspect ratio setup to .compute_config() from
intel_hdmi_set_avi_infoframe().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_hdmi.c

index c11703a0e6b12767795ad246a19aa1a4e5f5bb4a..08f8399f841875daceb0fecd99a52f8b0391f77b 100644 (file)
@@ -454,9 +454,6 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
        union hdmi_infoframe frame;
        int ret;
 
-       /* Set user selected PAR to incoming mode's member */
-       adjusted_mode->picture_aspect_ratio = intel_hdmi->aspect_ratio;
-
        ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
                                                       adjusted_mode);
        if (ret < 0) {
@@ -1312,6 +1309,9 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
                return false;
        }
 
+       /* Set user selected PAR to incoming mode's member */
+       adjusted_mode->picture_aspect_ratio = intel_hdmi->aspect_ratio;
+
        return true;
 }