Update backport patch for 5.18

This commit is contained in:
CrazyCat
2023-04-28 22:05:20 +03:00
parent c44b8832b6
commit f03ce3d8ee
3 changed files with 32 additions and 18 deletions

View File

@@ -49,6 +49,7 @@ add v6.0_testdrv.patch
add v5.18_rc.patch
add v5.18_rc2.patch
add v5.18_v4l2.patch
add v5.18_misc.patch
[5.17.1023]
add v5.17_spi.patch

View File

@@ -1,5 +1,5 @@
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index b26da2650289..09e5ba108a09 100644
index a858acea6547..431e9d8784ab 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -32,6 +32,12 @@
@@ -15,7 +15,7 @@ index b26da2650289..09e5ba108a09 100644
#define is_valid_ioctl(vfd, cmd) test_bit(_IOC_NR(cmd), (vfd)->valid_ioctls)
struct std_descr {
@@ -1528,7 +1534,7 @@ static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1539,7 +1545,7 @@ static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops,
p->mbus_code = 0;
mbus_code = p->mbus_code;
@@ -24,7 +24,7 @@ index b26da2650289..09e5ba108a09 100644
p->mbus_code = mbus_code;
switch (p->type) {
@@ -1703,7 +1709,7 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1692,7 +1698,7 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikely(!ops->vidioc_s_fmt_vid_cap))
break;
@@ -33,7 +33,7 @@ index b26da2650289..09e5ba108a09 100644
ret = ops->vidioc_s_fmt_vid_cap(file, fh, arg);
/* just in case the driver zeroed it again */
p->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
@@ -1713,30 +1719,30 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1702,15 +1708,15 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
if (unlikely(!ops->vidioc_s_fmt_vid_cap_mplane))
break;
@@ -43,14 +43,17 @@ index b26da2650289..09e5ba108a09 100644
- memset_after(&p->fmt.pix_mp.plane_fmt[i],
- 0, bytesperline);
+ CLEAR_AFTER_FIELD(&p->fmt.pix_mp.plane_fmt[i],
+ bytesperline);
+ bytesperline);
return ops->vidioc_s_fmt_vid_cap_mplane(file, fh, arg);
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
if (unlikely(!ops->vidioc_s_fmt_vid_overlay))
break;
- memset_after(p, 0, fmt.win);
+ CLEAR_AFTER_FIELD(p, fmt.win);
return ops->vidioc_s_fmt_vid_overlay(file, fh, arg);
p->fmt.win.clips = NULL;
p->fmt.win.clipcount = 0;
p->fmt.win.bitmap = NULL;
@@ -1718,17 +1724,17 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VBI_CAPTURE:
if (unlikely(!ops->vidioc_s_fmt_vbi_cap))
break;
@@ -71,7 +74,7 @@ index b26da2650289..09e5ba108a09 100644
ret = ops->vidioc_s_fmt_vid_out(file, fh, arg);
/* just in case the driver zeroed it again */
p->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
@@ -1744,45 +1750,45 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1736,15 +1742,15 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
if (unlikely(!ops->vidioc_s_fmt_vid_out_mplane))
break;
@@ -81,14 +84,17 @@ index b26da2650289..09e5ba108a09 100644
- memset_after(&p->fmt.pix_mp.plane_fmt[i],
- 0, bytesperline);
+ CLEAR_AFTER_FIELD(&p->fmt.pix_mp.plane_fmt[i],
+ bytesperline);
+ bytesperline);
return ops->vidioc_s_fmt_vid_out_mplane(file, fh, arg);
case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
if (unlikely(!ops->vidioc_s_fmt_vid_out_overlay))
break;
- memset_after(p, 0, fmt.win);
+ CLEAR_AFTER_FIELD(p, fmt.win);
return ops->vidioc_s_fmt_vid_out_overlay(file, fh, arg);
p->fmt.win.clips = NULL;
p->fmt.win.clipcount = 0;
p->fmt.win.bitmap = NULL;
@@ -1752,32 +1758,32 @@ static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VBI_OUTPUT:
if (unlikely(!ops->vidioc_s_fmt_vbi_out))
break;
@@ -127,7 +133,7 @@ index b26da2650289..09e5ba108a09 100644
return ops->vidioc_s_fmt_meta_out(file, fh, arg);
}
return -EINVAL;
@@ -1805,7 +1811,7 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1800,7 +1806,7 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikely(!ops->vidioc_try_fmt_vid_cap))
break;
@@ -136,7 +142,7 @@ index b26da2650289..09e5ba108a09 100644
ret = ops->vidioc_try_fmt_vid_cap(file, fh, arg);
/* just in case the driver zeroed it again */
p->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
@@ -1815,30 +1821,30 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1810,15 +1816,15 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
if (unlikely(!ops->vidioc_try_fmt_vid_cap_mplane))
break;
@@ -146,14 +152,17 @@ index b26da2650289..09e5ba108a09 100644
- memset_after(&p->fmt.pix_mp.plane_fmt[i],
- 0, bytesperline);
+ CLEAR_AFTER_FIELD(&p->fmt.pix_mp.plane_fmt[i],
+ bytesperline);
+ bytesperline);
return ops->vidioc_try_fmt_vid_cap_mplane(file, fh, arg);
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
if (unlikely(!ops->vidioc_try_fmt_vid_overlay))
break;
- memset_after(p, 0, fmt.win);
+ CLEAR_AFTER_FIELD(p, fmt.win);
return ops->vidioc_try_fmt_vid_overlay(file, fh, arg);
p->fmt.win.clips = NULL;
p->fmt.win.clipcount = 0;
p->fmt.win.bitmap = NULL;
@@ -1826,17 +1832,17 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VBI_CAPTURE:
if (unlikely(!ops->vidioc_try_fmt_vbi_cap))
break;
@@ -174,7 +183,7 @@ index b26da2650289..09e5ba108a09 100644
ret = ops->vidioc_try_fmt_vid_out(file, fh, arg);
/* just in case the driver zeroed it again */
p->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
@@ -1846,45 +1852,45 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
@@ -1844,15 +1850,15 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
if (unlikely(!ops->vidioc_try_fmt_vid_out_mplane))
break;
@@ -184,14 +193,17 @@ index b26da2650289..09e5ba108a09 100644
- memset_after(&p->fmt.pix_mp.plane_fmt[i],
- 0, bytesperline);
+ CLEAR_AFTER_FIELD(&p->fmt.pix_mp.plane_fmt[i],
+ bytesperline);
+ bytesperline);
return ops->vidioc_try_fmt_vid_out_mplane(file, fh, arg);
case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
if (unlikely(!ops->vidioc_try_fmt_vid_out_overlay))
break;
- memset_after(p, 0, fmt.win);
+ CLEAR_AFTER_FIELD(p, fmt.win);
return ops->vidioc_try_fmt_vid_out_overlay(file, fh, arg);
p->fmt.win.clips = NULL;
p->fmt.win.clipcount = 0;
p->fmt.win.bitmap = NULL;
@@ -1860,32 +1866,32 @@ static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops,
case V4L2_BUF_TYPE_VBI_OUTPUT:
if (unlikely(!ops->vidioc_try_fmt_vbi_out))
break;
@@ -230,7 +242,7 @@ index b26da2650289..09e5ba108a09 100644
return ops->vidioc_try_fmt_meta_out(file, fh, arg);
}
return -EINVAL;
@@ -2083,7 +2089,7 @@ static int v4l_reqbufs(const struct v4l2_ioctl_ops *ops,
@@ -2093,7 +2099,7 @@ static int v4l_reqbufs(const struct v4l2_ioctl_ops *ops,
if (ret)
return ret;
@@ -239,7 +251,7 @@ index b26da2650289..09e5ba108a09 100644
return ops->vidioc_reqbufs(file, fh, p);
}
@@ -2124,7 +2130,7 @@ static int v4l_create_bufs(const struct v4l2_ioctl_ops *ops,
@@ -2134,7 +2140,7 @@ static int v4l_create_bufs(const struct v4l2_ioctl_ops *ops,
if (ret)
return ret;

View File

@@ -20,6 +20,7 @@ VIDEO_S5K5BAF
VIDEO_S5C73M3
VIDEO_AR0521
VIDEO_VISL
VIDEO_OV13B10
[5.16.0]
# Needs i2c_driver flags field