summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-kthread-cap.c
diff options
context:
space:
mode:
authorJohan Korsnes <johan.korsnes@gmail.com>2019-06-18 03:37:19 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-21 17:28:25 -0400
commit6c396c28dce0709b105eb59ecf4e44fd2f2e54dc (patch)
tree95800bc5a8250755aba7c7e95d105411b229bc1f /drivers/media/platform/vivid/vivid-kthread-cap.c
parent448e11538f71933ba0ebd156bb176cf66827d6fd (diff)
downloadlinux-6c396c28dce0709b105eb59ecf4e44fd2f2e54dc.tar.bz2
media: vivid: make input std_signal per-input
Make the following properties per-input: -Standard Signal Mode -Standard These properties need to be per-input in order to implement proper HDMI (dis)connect-behavior, where the signal mode will be used to signify whether or not there is an inpute device connected. Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/vivid/vivid-kthread-cap.c')
-rw-r--r--drivers/media/platform/vivid/vivid-kthread-cap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/platform/vivid/vivid-kthread-cap.c
index b4eee952e1c9..6cf495a7d5cc 100644
--- a/drivers/media/platform/vivid/vivid-kthread-cap.c
+++ b/drivers/media/platform/vivid/vivid-kthread-cap.c
@@ -43,7 +43,7 @@
static inline v4l2_std_id vivid_get_std_cap(const struct vivid_dev *dev)
{
if (vivid_is_sdtv_cap(dev))
- return dev->std_cap;
+ return dev->std_cap[dev->input];
return 0;
}
@@ -408,7 +408,7 @@ static void vivid_fillbuff(struct vivid_dev *dev, struct vivid_buffer *buf)
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
unsigned line_height = 16 / factor;
bool is_tv = vivid_is_sdtv_cap(dev);
- bool is_60hz = is_tv && (dev->std_cap & V4L2_STD_525_60);
+ bool is_60hz = is_tv && (dev->std_cap[dev->input] & V4L2_STD_525_60);
unsigned p;
int line = 1;
u8 *basep[TPG_MAX_PLANES][2];
@@ -419,7 +419,7 @@ static void vivid_fillbuff(struct vivid_dev *dev, struct vivid_buffer *buf)
if (dev->loop_video && dev->can_loop_video &&
((vivid_is_svid_cap(dev) &&
- !VIVID_INVALID_SIGNAL(dev->std_signal_mode)) ||
+ !VIVID_INVALID_SIGNAL(dev->std_signal_mode[dev->input])) ||
(vivid_is_hdmi_cap(dev) &&
!VIVID_INVALID_SIGNAL(dev->dv_timings_signal_mode[dev->input]))))
is_loop = true;