From ba654ccf69f92d41e286ceb4989cdc1dec6ae432 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 25 Jan 2016 15:44:32 -0800 Subject: 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 Acked-by: Max Krummenacher --- drivers/video/mxsfb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index ff02dc8a9468..23368874108a 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -1189,7 +1189,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; fb_add_videomode(&fb_vm, &fb_info->modelist); } -- cgit v1.2.3