media: atomisp: Only set default_run_mode on first open of a stream/asd
authorHans de Goede <hdegoede@redhat.com>
Wed, 28 Dec 2022 22:11:47 +0000 (23:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:44 +0000 (09:33 +0100)
commit5259b92dc466196b622fa227eeed16a19df8d27f
tree152041041f4fe0eeec5282a76ecfa00cadadef0d
parent029c1410e345ce579db5c007276340d072aac54a
media: atomisp: Only set default_run_mode on first open of a stream/asd

[ Upstream commit 60ec70a71a9f9975a5d2dd4a7d97c20da0e41976 ]

Calling v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode) when
the stream is already active (through another /dev/video# node) causes
the stream to stop.

Move the call to set the default run-mode so that it is only done
on the first open of one of the 4 /dev/video# nodes of one of
the 2 streams (atomisp-sub-devices / asd-s).

Fixes: 2c45e343c581 ("media: atomisp: set per-device's default mode")
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_fops.c