mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
media: mgb4: Fix resolution change events triggering
Always generate the resolution change event when the HW reports it and only discard the streaming termination in case the new resolution is the same as the old one. The old logic prevented events on "no signal" -> "valid resolution" transitions as VIDIOC_QUERY_DV_TIMINGS never updates the timings when there is no signal present. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
73fb3b92da
commit
e6fd3d81db
|
|
@ -749,14 +749,14 @@ static void signal_change(struct work_struct *work)
|
|||
u32 width = resolution >> 16;
|
||||
u32 height = resolution & 0xFFFF;
|
||||
|
||||
static const struct v4l2_event ev = {
|
||||
.type = V4L2_EVENT_SOURCE_CHANGE,
|
||||
.u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION,
|
||||
};
|
||||
|
||||
v4l2_event_queue(&vindev->vdev, &ev);
|
||||
|
||||
if (timings->width != width || timings->height != height) {
|
||||
static const struct v4l2_event ev = {
|
||||
.type = V4L2_EVENT_SOURCE_CHANGE,
|
||||
.u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION,
|
||||
};
|
||||
|
||||
v4l2_event_queue(&vindev->vdev, &ev);
|
||||
|
||||
if (vb2_is_streaming(&vindev->queue))
|
||||
vb2_queue_error(&vindev->queue);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user