Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: sh_mobile_lcdc: Don't confuse line size with pitch

When using the MERAM the LCDC line size needs to be programmed with a
MERAM-specific value different than the real frame buffer pitch. Fix it.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: stable@vger.kernel.org # for 3.4
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Laurent Pinchart and committed by
Linus Torvalds
72c04af9 47136855

+4 -2
+3 -2
drivers/video/sh_mobile_lcdcfb.c
··· 758 758 } 759 759 760 760 lcdc_write_chan(ch, LDDFR, tmp); 761 - lcdc_write_chan(ch, LDMLSR, ch->pitch); 761 + lcdc_write_chan(ch, LDMLSR, ch->line_size); 762 762 lcdc_write_chan(ch, LDSA1R, ch->base_addr_y); 763 763 if (ch->format->yuv) 764 764 lcdc_write_chan(ch, LDSA2R, ch->base_addr_c); ··· 847 847 848 848 ch->base_addr_y = ch->dma_handle; 849 849 ch->base_addr_c = ch->base_addr_y + ch->xres * ch->yres_virtual; 850 + ch->line_size = ch->pitch; 850 851 851 852 /* Enable MERAM if possible. */ 852 853 if (mdev == NULL || mdev->ops == NULL || ··· 883 882 884 883 meram = mdev->ops->meram_register(mdev, ch->cfg->meram_cfg, 885 884 ch->pitch, ch->yres, pixelformat, 886 - &ch->pitch); 885 + &ch->line_size); 887 886 if (!IS_ERR(meram)) { 888 887 mdev->ops->meram_update(mdev, meram, 889 888 ch->base_addr_y, ch->base_addr_c,
+1
drivers/video/sh_mobile_lcdcfb.h
··· 84 84 85 85 unsigned long base_addr_y; 86 86 unsigned long base_addr_c; 87 + unsigned int line_size; 87 88 88 89 int (*notify)(struct sh_mobile_lcdc_chan *ch, 89 90 enum sh_mobile_lcdc_entity_event event,