diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-05-18 04:58:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 23:59:32 -0400 |
commit | 72c04af9a2d57b7945cf3de8e71461bd80695d50 (patch) | |
tree | 1edf785ba527cabff41df7b66423faba81771008 /drivers/video/sh_mobile_lcdcfb.c | |
parent | 471368557a734c6c486ee757952c902b36e7fd01 (diff) |
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>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 7a0b301587f6..e672698bd820 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -758,7 +758,7 @@ static void __sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
758 | } | 758 | } |
759 | 759 | ||
760 | lcdc_write_chan(ch, LDDFR, tmp); | 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 | lcdc_write_chan(ch, LDSA1R, ch->base_addr_y); | 762 | lcdc_write_chan(ch, LDSA1R, ch->base_addr_y); |
763 | if (ch->format->yuv) | 763 | if (ch->format->yuv) |
764 | lcdc_write_chan(ch, LDSA2R, ch->base_addr_c); | 764 | lcdc_write_chan(ch, LDSA2R, ch->base_addr_c); |
@@ -847,6 +847,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
847 | 847 | ||
848 | ch->base_addr_y = ch->dma_handle; | 848 | ch->base_addr_y = ch->dma_handle; |
849 | ch->base_addr_c = ch->base_addr_y + ch->xres * ch->yres_virtual; | 849 | ch->base_addr_c = ch->base_addr_y + ch->xres * ch->yres_virtual; |
850 | ch->line_size = ch->pitch; | ||
850 | 851 | ||
851 | /* Enable MERAM if possible. */ | 852 | /* Enable MERAM if possible. */ |
852 | if (mdev == NULL || mdev->ops == NULL || | 853 | if (mdev == NULL || mdev->ops == NULL || |
@@ -882,7 +883,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
882 | 883 | ||
883 | meram = mdev->ops->meram_register(mdev, ch->cfg->meram_cfg, | 884 | meram = mdev->ops->meram_register(mdev, ch->cfg->meram_cfg, |
884 | ch->pitch, ch->yres, pixelformat, | 885 | ch->pitch, ch->yres, pixelformat, |
885 | &ch->pitch); | 886 | &ch->line_size); |
886 | if (!IS_ERR(meram)) { | 887 | if (!IS_ERR(meram)) { |
887 | mdev->ops->meram_update(mdev, meram, | 888 | mdev->ops->meram_update(mdev, meram, |
888 | ch->base_addr_y, ch->base_addr_c, | 889 | ch->base_addr_y, ch->base_addr_c, |