Skip to content

Commit c92f038

Browse files
committed
Merge tag 'media/v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: "For two regressions in media core: - v4l2-subdev: fix regression in check_pad() - videodev2.h: change V4L2_PIX_FMT_BGRA444 define: fourcc was already in use" * tag 'media/v5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: videodev2.h: change V4L2_PIX_FMT_BGRA444 define: fourcc was already in use media: v4l2-subdev: fix regression in check_pad()
2 parents 8376824 + 22be823 commit c92f038

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

drivers/media/v4l2-core/v4l2-subdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static inline int check_which(__u32 which)
124124
static inline int check_pad(struct v4l2_subdev *sd, __u32 pad)
125125
{
126126
#if defined(CONFIG_MEDIA_CONTROLLER)
127-
if (sd->entity.graph_obj.mdev) {
127+
if (sd->entity.num_pads) {
128128
if (pad >= sd->entity.num_pads)
129129
return -EINVAL;
130130
return 0;

include/uapi/linux/videodev2.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,13 @@ struct v4l2_pix_format {
518518
#define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */
519519
#define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */
520520
#define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */
521-
#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('B', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
521+
522+
/*
523+
* Originally this had 'BA12' as fourcc, but this clashed with the older
524+
* V4L2_PIX_FMT_SGRBG12 which inexplicably used that same fourcc.
525+
* So use 'GA12' instead for V4L2_PIX_FMT_BGRA444.
526+
*/
527+
#define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
522528
#define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */
523529
#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
524530
#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */

0 commit comments

Comments
 (0)