]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (5700): Saa7111: fix picture settings cache bug
authorRussell King <rmk@arm.linux.org.uk>
Sat, 26 May 2007 10:55:32 +0000 (07:55 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 8 Jun 2007 11:21:12 +0000 (08:21 -0300)
commit624fc7f52b48f69fd9d1fe7a594c211762c89825
treeef26093d4dfc7d3009c5db0c753d7df86757ce16
parent05f85839a2ffcaa75d505526ca8e74097be18d8c
V4L/DVB (5700): Saa7111: fix picture settings cache bug

If the SAA7111 device is powered down, and requires re-initialisation when
the V4L device is opened (as on the NetWinder), the SAA7111 driver gets
completely confused about the current settings.

The problem is centred around the way the driver keeps _two_ cached copies
of the current settings - one of the struct video_picture settings, and one
of the registers.

When the decoder is re-initailised, the cached register settings are
overwritten, as are the values in the hardware registers.  However, the
cached video_picture settings are not.

Resolve this by removing the useless and buggy second level of caching for
video_picture.  Instead, provide a function which updates register values
if and only if the value we are going to write to the register has changed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/saa7111.c