]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: mgb4: Fix DV timings limits
authorMartin Tůma <martin.tuma@digiteqautomotive.com>
Wed, 25 Mar 2026 12:01:18 +0000 (13:01 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 5 May 2026 10:06:42 +0000 (12:06 +0200)
Provide the real DV timings limits in VIDIOC_DV_TIMINGS_CAP. For the
outputs the pixelclock is limited by the CMT table <25000kHz, 2*94642kHz>,
for the inputs a slightly broader range is possible. The minimal
supported/tested resolution is 64px.

Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/pci/mgb4/mgb4_vin.c
drivers/media/pci/mgb4/mgb4_vout.c

index 74fb00c4a40822e67dacc49429bc54333e499e8e..b247854556919ffa1a5b77d412903d4cf8651094 100644 (file)
@@ -85,12 +85,12 @@ static const struct mgb4_i2c_kv gmsl1_i2c[] = {
 static const struct v4l2_dv_timings_cap video_timings_cap = {
        .type = V4L2_DV_BT_656_1120,
        .bt = {
-               .min_width = 240,
+               .min_width = 64,
                .max_width = 4096,
-               .min_height = 240,
+               .min_height = 64,
                .max_height = 4096,
-               .min_pixelclock = 1843200, /* 320 x 240 x 24Hz */
-               .max_pixelclock = 530841600, /* 4096 x 2160 x 60Hz */
+               .min_pixelclock = 20000000,
+               .max_pixelclock = 200000000,
                .standards = V4L2_DV_BT_STD_CEA861 | V4L2_DV_BT_STD_DMT |
                        V4L2_DV_BT_STD_CVT | V4L2_DV_BT_STD_GTF,
                .capabilities = V4L2_DV_BT_CAP_PROGRESSIVE |
index 7725bcd55e4cb7e1d4026bc21240e5427c0e9120..22fbc9e53819319e7b0bfddbfcf6f34a7836caad 100644 (file)
@@ -53,12 +53,12 @@ static const struct mgb4_i2c_kv gmsl1_i2c[] = {
 static const struct v4l2_dv_timings_cap video_timings_cap = {
        .type = V4L2_DV_BT_656_1120,
        .bt = {
-               .min_width = 240,
+               .min_width = 64,
                .max_width = 4096,
-               .min_height = 240,
+               .min_height = 64,
                .max_height = 4096,
-               .min_pixelclock = 1843200, /* 320 x 240 x 24Hz */
-               .max_pixelclock = 530841600, /* 4096 x 2160 x 60Hz */
+               .min_pixelclock = 25000000,
+               .max_pixelclock = 189284000,
                .standards = V4L2_DV_BT_STD_CEA861 | V4L2_DV_BT_STD_DMT |
                        V4L2_DV_BT_STD_CVT | V4L2_DV_BT_STD_GTF,
                .capabilities = V4L2_DV_BT_CAP_PROGRESSIVE |