Re: [PATCH 4/5] drm/i915: Do not override mode's aspect ratio with the prop value NONE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>-----Original Message-----
>From: dri-devel <dri-devel-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Ville Syrjala
>Sent: Thursday, June 20, 2019 7:57 PM
>To: dri-devel@xxxxxxxxxxxxxxxxxxxxx
>Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
>Subject: [PATCH 4/5] drm/i915: Do not override mode's aspect ratio with the prop
>value NONE
>
>From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>
>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.

Looks good to me.
Reviewed-by: Uma Shankar <uma.shankar@xxxxxxxxx>

>Cc: Ilia Mirkin <imirkin@xxxxxxxxxxxx>
>Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>---
> drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +++--
>drivers/gpu/drm/i915/display/intel_sdvo.c | 6 +++---
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c
>b/drivers/gpu/drm/i915/display/intel_hdmi.c
>index 0ebec69bbbfc..6a4650b44ac6 100644
>--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
>+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
>@@ -2394,8 +2394,9 @@ int intel_hdmi_compute_config(struct intel_encoder
>*encoder,
> 		return -EINVAL;
> 	}
>
>-	/* 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;
>
>diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c
>b/drivers/gpu/drm/i915/display/intel_sdvo.c
>index ceda03e5a3d4..5cb619613157 100644
>--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
>+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
>@@ -1321,9 +1321,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)) {
>--
>2.21.0
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@xxxxxxxxxxxxxxxxxxxxx
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux