Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'media/v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fix from Mauro Carvalho Chehab:
"A v4l-core fix related to validating DV timings related to video
blanking values"

* tag 'media/v6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
media: v4l2-dv-timings.c: fix too strict blanking sanity checks

+14 -6
+14 -6
drivers/media/v4l2-core/v4l2-dv-timings.c
··· 145 145 const struct v4l2_bt_timings *bt = &t->bt; 146 146 const struct v4l2_bt_timings_cap *cap = &dvcap->bt; 147 147 u32 caps = cap->capabilities; 148 + const u32 max_vert = 10240; 149 + u32 max_hor = 3 * bt->width; 148 150 149 151 if (t->type != V4L2_DV_BT_656_1120) 150 152 return false; ··· 168 166 if (!bt->interlaced && 169 167 (bt->il_vbackporch || bt->il_vsync || bt->il_vfrontporch)) 170 168 return false; 171 - if (bt->hfrontporch > 2 * bt->width || 172 - bt->hsync > 1024 || bt->hbackporch > 1024) 169 + /* 170 + * Some video receivers cannot properly separate the frontporch, 171 + * backporch and sync values, and instead they only have the total 172 + * blanking. That can be assigned to any of these three fields. 173 + * So just check that none of these are way out of range. 174 + */ 175 + if (bt->hfrontporch > max_hor || 176 + bt->hsync > max_hor || bt->hbackporch > max_hor) 173 177 return false; 174 - if (bt->vfrontporch > 4096 || 175 - bt->vsync > 128 || bt->vbackporch > 4096) 178 + if (bt->vfrontporch > max_vert || 179 + bt->vsync > max_vert || bt->vbackporch > max_vert) 176 180 return false; 177 - if (bt->interlaced && (bt->il_vfrontporch > 4096 || 178 - bt->il_vsync > 128 || bt->il_vbackporch > 4096)) 181 + if (bt->interlaced && (bt->il_vfrontporch > max_vert || 182 + bt->il_vsync > max_vert || bt->il_vbackporch > max_vert)) 179 183 return false; 180 184 return fnc == NULL || fnc(t, fnc_handle); 181 185 }