imx-drm: encoder prepare/mode_set must use adjusted mode
authorSteve Longerbeam <slongerbeam@gmail.com>
Fri, 19 Dec 2014 02:00:24 +0000 (18:00 -0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 7 Jan 2015 18:15:03 +0000 (19:15 +0100)
The encoder ->prepare() and ->mode_set() methods need to use the
hw adjusted mode, not the original mode.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/drm/bridge/dw_hdmi.c
drivers/gpu/drm/imx/imx-ldb.c
drivers/gpu/drm/imx/imx-tve.c
drivers/gpu/drm/imx/parallel-display.c

index 4cc456945c8ba20d6af021dcf0d096ed5256936c..6ea00050417341a27f997cd84c39769c3387d8b3 100644 (file)
@@ -1341,8 +1341,8 @@ static void dw_hdmi_poweroff(struct dw_hdmi *hdmi)
 }
 
 static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
-                                   struct drm_display_mode *mode,
-                                   struct drm_display_mode *adjusted_mode)
+                                   struct drm_display_mode *orig_mode,
+                                   struct drm_display_mode *mode)
 {
        struct dw_hdmi *hdmi = bridge->driver_private;
 
index 4ff62a517c755e6e0e4e34a4a63c0e13fa4abd51..1b86aac0b341c7083b15e03163338989a1543592 100644 (file)
@@ -163,7 +163,7 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder)
 {
        struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
        struct imx_ldb *ldb = imx_ldb_ch->ldb;
-       struct drm_display_mode *mode = &encoder->crtc->mode;
+       struct drm_display_mode *mode = &encoder->crtc->hwmode;
        u32 pixel_fmt;
        unsigned long serial_clk;
        unsigned long di_clk = mode->clock * 1000;
@@ -241,8 +241,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;
index a729f4f7074c1125a04ec3e35bd87f99be95a49b..b63601d0460138f479d50c7d30dd9bdeddbc70ba 100644 (file)
@@ -307,8 +307,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;
index 88cf7ca1e886a52b156da75264ff702dea7baef6..5e83e007080f7ae757b3f6c567cd791a595bd9d1 100644 (file)
@@ -130,8 +130,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)
 {
 }