diff mbox

[5/6] imx-drm: encoder mode_set must use adjusted mode

Message ID 1418689764-11276-6-git-send-email-slongerbeam@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Longerbeam Dec. 16, 2014, 12:29 a.m. UTC
From: Steve Longerbeam <steve_longerbeam@mentor.com>

The encoder ->mode_set() methods need to use the hw adjusted mode,
not the original mode.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
---
 drivers/gpu/drm/imx/imx-hdmi.c         |    4 ++--
 drivers/gpu/drm/imx/imx-ldb.c          |    4 ++--
 drivers/gpu/drm/imx/imx-tve.c          |    4 ++--
 drivers/gpu/drm/imx/parallel-display.c |    4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

Comments

Philipp Zabel Dec. 17, 2014, 2:03 p.m. UTC | #1
Am Montag, den 15.12.2014, 16:29 -0800 schrieb slongerbeam@gmail.com:
> From: Steve Longerbeam <steve_longerbeam@mentor.com>
> 
> The encoder ->mode_set() methods need to use the hw adjusted mode,
> not the original mode.
> 
> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> ---
>  drivers/gpu/drm/imx/imx-hdmi.c         |    4 ++--
>  drivers/gpu/drm/imx/imx-ldb.c          |    4 ++--
>  drivers/gpu/drm/imx/imx-tve.c          |    4 ++--
>  drivers/gpu/drm/imx/parallel-display.c |    4 ++--
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c
> index aaec6b2..32116cc 100644
> --- a/drivers/gpu/drm/imx/imx-hdmi.c
> +++ b/drivers/gpu/drm/imx/imx-hdmi.c
> @@ -1417,8 +1417,8 @@ static struct drm_encoder *imx_hdmi_connector_best_encoder(struct drm_connector
>  }
>  
>  static void imx_hdmi_encoder_mode_set(struct drm_encoder *encoder,
> -			struct drm_display_mode *mode,
> -			struct drm_display_mode *adjusted_mode)
> +			struct drm_display_mode *orig_mode,
> +			struct drm_display_mode *mode)
>  {
>  	struct imx_hdmi *hdmi = container_of(encoder, struct imx_hdmi, encoder);
>  
> diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
> index 4662e00..a88c0e1 100644
> --- a/drivers/gpu/drm/imx/imx-ldb.c
> +++ b/drivers/gpu/drm/imx/imx-ldb.c

There's another line that should be changed

-       struct drm_display_mode *mode = &encoder->crtc->mode;
+       struct drm_display_mode *mode = &encoder->crtc->hwmode;

in imx_ldb_encoder_prepare.

> @@ -246,8 +246,8 @@ static void imx_ldb_encoder_commit(struct drm_encoder *encoder)
>  }
>  
>  static void imx_ldb_encoder_mode_set(struct drm_encoder *encoder,
> -			 struct drm_display_mode *mode,
> -			 struct drm_display_mode *adjusted_mode)
> +			 struct drm_display_mode *orig_mode,
> +			 struct drm_display_mode *mode)
>  {
>  	struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
>  	struct imx_ldb *ldb = imx_ldb_ch->ldb;

regards
Philipp
Steve Longerbeam Dec. 19, 2014, 12:31 a.m. UTC | #2
On 12/17/2014 06:03 AM, Philipp Zabel wrote:
>
> There's another line that should be changed
>
> -       struct drm_display_mode *mode = &encoder->crtc->mode;
> +       struct drm_display_mode *mode = &encoder->crtc->hwmode;
>
> in imx_ldb_encoder_prepare.

done.

Steve
diff mbox

Patch

diff --git a/drivers/gpu/drm/imx/imx-hdmi.c b/drivers/gpu/drm/imx/imx-hdmi.c
index aaec6b2..32116cc 100644
--- a/drivers/gpu/drm/imx/imx-hdmi.c
+++ b/drivers/gpu/drm/imx/imx-hdmi.c
@@ -1417,8 +1417,8 @@  static struct drm_encoder *imx_hdmi_connector_best_encoder(struct drm_connector
 }
 
 static void imx_hdmi_encoder_mode_set(struct drm_encoder *encoder,
-			struct drm_display_mode *mode,
-			struct drm_display_mode *adjusted_mode)
+			struct drm_display_mode *orig_mode,
+			struct drm_display_mode *mode)
 {
 	struct imx_hdmi *hdmi = container_of(encoder, struct imx_hdmi, encoder);
 
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index 4662e00..a88c0e1 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -246,8 +246,8 @@  static void imx_ldb_encoder_commit(struct drm_encoder *encoder)
 }
 
 static void imx_ldb_encoder_mode_set(struct drm_encoder *encoder,
-			 struct drm_display_mode *mode,
-			 struct drm_display_mode *adjusted_mode)
+			 struct drm_display_mode *orig_mode,
+			 struct drm_display_mode *mode)
 {
 	struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
 	struct imx_ldb *ldb = imx_ldb_ch->ldb;
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c
index 42c651b..9709bf9a 100644
--- a/drivers/gpu/drm/imx/imx-tve.c
+++ b/drivers/gpu/drm/imx/imx-tve.c
@@ -312,8 +312,8 @@  static void imx_tve_encoder_prepare(struct drm_encoder *encoder)
 }
 
 static void imx_tve_encoder_mode_set(struct drm_encoder *encoder,
-				     struct drm_display_mode *mode,
-				     struct drm_display_mode *adjusted_mode)
+				     struct drm_display_mode *orig_mode,
+				     struct drm_display_mode *mode)
 {
 	struct imx_tve *tve = enc_to_tve(encoder);
 	unsigned long rounded_rate;
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c
index 015a454..d0842a4 100644
--- a/drivers/gpu/drm/imx/parallel-display.c
+++ b/drivers/gpu/drm/imx/parallel-display.c
@@ -131,8 +131,8 @@  static void imx_pd_encoder_commit(struct drm_encoder *encoder)
 }
 
 static void imx_pd_encoder_mode_set(struct drm_encoder *encoder,
-			 struct drm_display_mode *mode,
-			 struct drm_display_mode *adjusted_mode)
+			 struct drm_display_mode *orig_mode,
+			 struct drm_display_mode *mode)
 {
 }