summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-01-25 15:44:32 -0800
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-12-24 01:27:34 +0100
commit3df4eef3dcbc9926b11c327c25ebbd717674e1f0 (patch)
tree963f5206e2a66df4e2e5e416c8eb4c5ba02890f9
parenta2cbd4ab6c2d3b2f7cf2fb1312ec4f08fe01d5dc (diff)
video: fbdev: mxsfb: fix pixelclock polarity
The PIXDATA flags of the display_flags enum are controller centric, e.g. NEGEDGE means the controller shall drive the data signals on pixelclocks negative edge. However, the drivers flag is display centric: Sample the data on negative (falling) edge. Therefore, change the if statement to check for the POSEDGE flag (which is typically not set): Drive on positive edge => sample on negative edge Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 5652dc1ad78303fb246f050ba23c563319d823cf)
-rw-r--r--drivers/video/fbdev/mxsfb.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c
index 3864fbf60e0b..71ea8df544f1 100644
--- a/drivers/video/fbdev/mxsfb.c
+++ b/drivers/video/fbdev/mxsfb.c
@@ -1434,7 +1434,16 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host)
if (!(vm.flags & DISPLAY_FLAGS_DE_HIGH))
fb_vm.sync |= FB_SYNC_OE_LOW_ACT;
- if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+
+ /*
+ * The PIXDATA flags of the display_flags enum are controller
+ * centric, e.g. NEGEDGE means drive data on negative edge.
+ * However, the drivers flag is display centric: Sample the
+ * data on negative (falling) edge. Therefore, check for the
+ * POSEDGE flag:
+ * drive on positive edge => sample on negative edge
+ */
+ if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
fb_vm.sync |= FB_SYNC_CLK_LAT_FALL;
if (i == timings->native_mode) {