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

video: da8xx-fb: preserve display width when changing HSYNC

When looking at this driver for a client, I noticed the code that
configures the HSYNC pulse clobbers the display width in the same
register. It only preserves the MS part of the width in bit 3 and zeros
the LS part of the width in bits 9 to 4. This doesn't matter during
initialization as the width is configured afterwards, but subsequent use
of the FBIPUT_HSYNC ioctl would clobber the width.

Preserve bits 9 to 0 of LCD_RASTER_TIMING_0_REG when configuring the
horizontal sync.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Ian Abbott and committed by
Tomi Valkeinen
4d4e2c00 62795a0d

+1 -1
+1 -1
drivers/video/fbdev/da8xx-fb.c
··· 419 419 { 420 420 u32 reg; 421 421 422 - reg = lcdc_read(LCD_RASTER_TIMING_0_REG) & 0xf; 422 + reg = lcdc_read(LCD_RASTER_TIMING_0_REG) & 0x3ff; 423 423 reg |= (((back_porch-1) & 0xff) << 24) 424 424 | (((front_porch-1) & 0xff) << 16) 425 425 | (((pulse_width-1) & 0x3f) << 10);