summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2019-07-25 16:23:56 +0200
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-07-29 16:28:58 +0200
commitbce34124a2433dede4f9b3e719f47b07e44479ea (patch)
tree2a241ba89f91abe53c2246a94e924b2fb6aa6fa3
parenta2e9251becc84c30acad06be48d051ad07101c81 (diff)
video: fbdev: mxsfb: Fix flags not being applied
If one used display timings in devicetree the display_flags like pixelclk-active have not been applied. This commit fixes that and puts some nice debug messages so one can see from where those timings are applied. This fixes commit f397f60efbb24c2906cd95f443607b2642b49b24 "video: fbdev: mxsfb: allow setting display timings via kernel command line" Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit 17652e758b1236c49d2e1d336d81a832452b7c53)
-rw-r--r--drivers/video/fbdev/mxsfb.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/video/fbdev/mxsfb.c b/drivers/video/fbdev/mxsfb.c
index 697963a395ec..8aaa1ea58fde 100644
--- a/drivers/video/fbdev/mxsfb.c
+++ b/drivers/video/fbdev/mxsfb.c
@@ -1441,7 +1441,7 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host)
fb_vm.sync |= FB_SYNC_CLK_LAT_FALL;
if (i == timings->native_mode) {
- fb_videomode_from_videomode(&vm, &native_mode);
+ native_mode = fb_vm;
fb_videomode_to_var(&fb_info->var, &fb_vm);
}
@@ -1455,6 +1455,27 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host)
/* save the sync value getting from dtb */
host->sync = fb_info->var.sync;
+ switch (retval) {
+ case 0:
+ dev_err(dev, "fb_find_mode can't find a "
+ "suitable timing\n");
+ break;
+ case 1:
+ dev_info(dev, "Using timings from kernel parameters\n");
+ break;
+ case 2:
+ dev_info(dev, "Using timings from kernel parameters "
+ "and ignoring refresh rate\n");
+ break;
+ case 3:
+ dev_info(dev, "Using timings from devicetree\n");
+ break;
+ case 4:
+ dev_warn(dev, "Falling back to any valid timing\n");
+ default:
+ break;
+ }
+
put_display_node:
if (timings)
kfree(timings);