aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorMartin Tůma <martin.tuma@digiteqautomotive.com>2025-08-26 18:28:29 +0200
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-08-29 11:04:03 +0200
commit0750649b528ff18d1d68aecb45b34ec22d5ab778 (patch)
treed0b6ba0f48c8643e065da8ce8dde754d0bf38260 /drivers/media/pci
parentmedia: aspeed: Allow to capture from SoC display (GFX) (diff)
downloadlinux-0750649b528ff18d1d68aecb45b34ec22d5ab778.tar.gz
linux-0750649b528ff18d1d68aecb45b34ec22d5ab778.zip
media: pci: mgb4: Fix timings comparison in VIDIOC_S_DV_TIMINGS
Compare the whole v4l2_bt_timings struct, not just the width/height when setting new timings. Timings with the same resolution and different pixelclock can now be properly set. Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/mgb4/mgb4_vin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/pci/mgb4/mgb4_vin.c b/drivers/media/pci/mgb4/mgb4_vin.c
index 989e93f67f75..42c327bc50e1 100644
--- a/drivers/media/pci/mgb4/mgb4_vin.c
+++ b/drivers/media/pci/mgb4/mgb4_vin.c
@@ -610,8 +610,7 @@ static int vidioc_s_dv_timings(struct file *file, void *fh,
timings->bt.height < video_timings_cap.bt.min_height ||
timings->bt.height > video_timings_cap.bt.max_height)
return -EINVAL;
- if (timings->bt.width == vindev->timings.bt.width &&
- timings->bt.height == vindev->timings.bt.height)
+ if (v4l2_match_dv_timings(timings, &vindev->timings, 0, false))
return 0;
if (vb2_is_busy(&vindev->queue))
return -EBUSY;