[5/7] drm/i915: Move HDMI aspect ratio setup to .compute_config()
diff mbox

Message ID 1441708851-24646-6-git-send-email-ville.syrjala@linux.intel.com
State New
Headers show

Commit Message

Ville Syrjala Sept. 8, 2015, 10:40 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kahola, Mika Sept. 24, 2015, 8:08 a.m. UTC | #1
Reviewed-by: Mika Kahola <mika.kahola@intel.com>

On Tue, 2015-09-08 at 13:40 +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 0b256c9..e03dca0 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -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;
>  }
>

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 0b256c9..e03dca0 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -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;
 }