diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2014-12-16 14:40:43 +0100 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2014-12-16 14:40:43 +0100 |
commit | f81c57f01c09d0dd44c8b24ee8e7a67f48539853 (patch) | |
tree | d3a175ea4e8cc60ab9b2bc7b3e400e28449e11d0 | |
parent | ed1a080698019fc03a45e72e330aaeb520493f7f (diff) | |
parent | cd7624a837a933ba8d47855b0caa0ad6a23096bb (diff) |
Merge branch 'vf610-dcu-3.18-2' into toradex_vf_3.18-next
-rw-r--r-- | drivers/video/fbdev/fsl-dcu-fb.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/video/fbdev/fsl-dcu-fb.c b/drivers/video/fbdev/fsl-dcu-fb.c index 9c7e9b8cf31e..7facc0e6c60d 100644 --- a/drivers/video/fbdev/fsl-dcu-fb.c +++ b/drivers/video/fbdev/fsl-dcu-fb.c @@ -145,7 +145,7 @@ struct dcu_fb_data { int modecnt; struct fb_videomode native_mode; u32 bits_per_pixel; - bool clk_pol_negedge; + bool pixclockpol; }; struct layer_display_offset { @@ -461,8 +461,11 @@ static void update_controller(struct fb_info *info) DCU_VSYN_PARA_FP(var->lower_margin), dcufb->reg_base + DCU_VSYN_PARA); - /* Reference Manual is wrong, INV_PXCK => 1 means falling edge! */ - if (dcufb->clk_pol_negedge) + /* + * pixclockpol = 0 => display samples data on falling edge => 0 + * pixclockpol = 1 => display samples data on rising edge => 1 (default) + */ + if (dcufb->pixclockpol) pol |= DCU_SYN_POL_INV_PXCK_FALL; /* hsync:0 => active low => HS_LOW */ @@ -824,7 +827,14 @@ static int fsl_dcu_init_modelist(struct dcu_fb_data *dcufb) if (i == timings->native_mode) { fb_videomode_from_videomode(&vm, &dcufb->native_mode); - dcufb->clk_pol_negedge = timings->timings[i]->flags & + + /* + * Kernel pixelclk settings are controller centric + * whereas DCU is display centric: + * PIXDATA_NEGEDGE (drive data on falling edge) + * => pixclockpol (display samples data on rising edge) + */ + dcufb->pixclockpol = timings->timings[i]->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE; } @@ -851,8 +861,7 @@ static int parse_opt(struct dcu_fb_data *dcufb, char *this_opt, u32 *sync) if (simple_strtoul(this_opt+6, NULL, 0)) *sync |= FB_SYNC_VERT_HIGH_ACT; } else if (!strncmp(this_opt, "pixclockpol:", 12)) - dcufb->clk_pol_negedge = - !!simple_strtoul(this_opt+12, NULL, 0); + dcufb->pixclockpol = !!simple_strtoul(this_opt+12, NULL, 0); else return -EINVAL; |