cx88: Fix regression in initial video standard setting
commite82672f45ea3dd7511fcbe0098df3f4fe65c20e8
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Sat, 20 Sep 2014 12:23:44 +0000 (20 09:23 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:08:01 +0000 (27 15:08 -0700)
treefc1b4a845824cb116aef88c41de496f305b02482
parent4d3d3a1690c25205b36f6ec015458466e1ea6dae
cx88: Fix regression in initial video standard setting

commit 4e0973a918b9a42e217093f078e04a61e5dd95a5 upstream.

Setting initial standard at the top of cx8800_initdev would cause the
first call to cx88_set_tvnorm() to return without programming any
registers (leaving the driver saying it's set to NTSC but the hardware
isn't programmed).  Even worse, any subsequent attempt to explicitly
set it to NTSC-M will return success but actually fail to program the
underlying registers unless first changing the standard to something
other than NTSC-M.

Set the initial standard later in the process, and make sure the field
is zero at the beginning to ensure that the call always goes through.

This regression was introduced in the following commit:

commit ccd6f1d488e7 ("[media] cx88: move width, height and field to core
struct")

Author: Hans Verkuil <hans.verkuil@cisco.com>

[media] cx88: move width, height and field to core struct

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/pci/cx88/cx88-cards.c
drivers/media/pci/cx88/cx88-video.c