From 0fa9026b935683f92b20ce99a12f5a57102b8098 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Tue, 10 Oct 2023 09:03:48 +0000 Subject: [PATCH] linux (Allwinner): drop upstreamed patches in 6.6 --- ...codec-Add-capture-format-to-support-.patch | 75 ------------------- ...codec-Add-capture-format-to-support-.patch | 74 ------------------ ...mi-truly-enforce-420-only-formats-wh.patch | 42 ----------- 3 files changed, 191 deletions(-) delete mode 100644 projects/Allwinner/patches/linux/0045-media-mediatek-vcodec-Add-capture-format-to-support-.patch delete mode 100644 projects/Allwinner/patches/linux/0046-media-mediatek-vcodec-Add-capture-format-to-support-.patch delete mode 100644 projects/Allwinner/patches/linux/0068-drm-bridge-dw-hdmi-truly-enforce-420-only-formats-wh.patch diff --git a/projects/Allwinner/patches/linux/0045-media-mediatek-vcodec-Add-capture-format-to-support-.patch b/projects/Allwinner/patches/linux/0045-media-mediatek-vcodec-Add-capture-format-to-support-.patch deleted file mode 100644 index ec37ca59c7..0000000000 --- a/projects/Allwinner/patches/linux/0045-media-mediatek-vcodec-Add-capture-format-to-support-.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mingjia Zhang -Date: Sat, 29 Jul 2023 11:41:10 +0800 -Subject: [PATCH] media: mediatek: vcodec: Add capture format to support 10bit - tile mode - -Define one uncompressed capture format V4L2_PIX_FMT_MT2110T in order to -support 10bit for AV1/VP9/HEVC in mt8195. - -Signed-off-by: Mingjia Zhang -Co-developed-by: Yunfei Dong -Signed-off-by: Yunfei Dong -Signed-off-by: Hans Verkuil ---- - Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 7 +++++++ - drivers/media/v4l2-core/v4l2-common.c | 2 ++ - drivers/media/v4l2-core/v4l2-ioctl.c | 1 + - include/uapi/linux/videodev2.h | 1 + - 4 files changed, 11 insertions(+) - -diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst -index 58f6ae25b2e7..0bc69639baaa 100644 ---- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst -+++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst -@@ -275,6 +275,13 @@ please make a proposal on the linux-media mailing list. - - Decoder's implementation can be found here, - `aspeed_codec `__ -+ * .. _V4L2-PIX-FMT-MT2110T: -+ -+ - ``V4L2_PIX_FMT_MT2110T`` -+ - 'MT2110T' -+ - This format is two-planar 10-Bit tile mode and having similitude with -+ ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for VP9, AV1 -+ and HEVC. - .. raw:: latex - - \normalsize -diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c -index bee1535b04d3..869fc09a210b 100644 ---- a/drivers/media/v4l2-core/v4l2-common.c -+++ b/drivers/media/v4l2-core/v4l2-common.c -@@ -262,6 +262,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) - { .format = V4L2_PIX_FMT_VYUY, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 }, - { .format = V4L2_PIX_FMT_Y212, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 4, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 }, - { .format = V4L2_PIX_FMT_YUV48_12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 6, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 }, -+ { .format = V4L2_PIX_FMT_MT2110T, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 2, .comp_planes = 2, .bpp = { 5, 10, 0, 0 }, .bpp_div = { 4, 4, 1, 1 }, .hdiv = 2, .vdiv = 2, -+ .block_w = { 16, 8, 0, 0 }, .block_h = { 32, 16, 0, 0 }}, - - /* YUV planar formats */ - { .format = V4L2_PIX_FMT_NV12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 }, -diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c -index 01ba27f2ef87..f465c0e3d6e3 100644 ---- a/drivers/media/v4l2-core/v4l2-ioctl.c -+++ b/drivers/media/v4l2-core/v4l2-ioctl.c -@@ -1508,6 +1508,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) - case V4L2_PIX_FMT_QC10C: descr = "QCOM Compressed 10-bit Format"; break; - case V4L2_PIX_FMT_AJPG: descr = "Aspeed JPEG"; break; - case V4L2_PIX_FMT_AV1_FRAME: descr = "AV1 Frame"; break; -+ case V4L2_PIX_FMT_MT2110T: descr = "Mediatek 10bit Tile Mode"; break; - default: - if (fmt->description[0]) - return; -diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 3af6a82d0cad..8c7d71afbdc7 100644 ---- a/include/uapi/linux/videodev2.h -+++ b/include/uapi/linux/videodev2.h -@@ -796,6 +796,7 @@ struct v4l2_pix_format { - #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */ - #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ - #define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */ -+#define V4L2_PIX_FMT_MT2110T v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */ - #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ - #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ - #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ diff --git a/projects/Allwinner/patches/linux/0046-media-mediatek-vcodec-Add-capture-format-to-support-.patch b/projects/Allwinner/patches/linux/0046-media-mediatek-vcodec-Add-capture-format-to-support-.patch deleted file mode 100644 index babb247667..0000000000 --- a/projects/Allwinner/patches/linux/0046-media-mediatek-vcodec-Add-capture-format-to-support-.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mingjia Zhang -Date: Sat, 29 Jul 2023 11:41:11 +0800 -Subject: [PATCH] media: mediatek: vcodec: Add capture format to support 10bit - raster mode - -Define one uncompressed capture format V4L2_PIX_FMT_MT2110R in order to -support 10bit for H264 in mt8195. - -Signed-off-by: Mingjia Zhang -Co-developed-by: Yunfei Dong -Signed-off-by: Yunfei Dong -Signed-off-by: Hans Verkuil ---- - Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 6 ++++++ - drivers/media/v4l2-core/v4l2-common.c | 2 ++ - drivers/media/v4l2-core/v4l2-ioctl.c | 1 + - include/uapi/linux/videodev2.h | 1 + - 4 files changed, 10 insertions(+) - -diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst -index 0bc69639baaa..296ad2025e8d 100644 ---- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst -+++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst -@@ -282,6 +282,12 @@ please make a proposal on the linux-media mailing list. - - This format is two-planar 10-Bit tile mode and having similitude with - ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for VP9, AV1 - and HEVC. -+ * .. _V4L2-PIX-FMT-MT2110R: -+ -+ - ``V4L2_PIX_FMT_MT2110R`` -+ - 'MT2110R' -+ - This format is two-planar 10-Bit raster mode and having similitude with -+ ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for AVC. - .. raw:: latex - - \normalsize -diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c -index 869fc09a210b..3a4b15a98e02 100644 ---- a/drivers/media/v4l2-core/v4l2-common.c -+++ b/drivers/media/v4l2-core/v4l2-common.c -@@ -264,6 +264,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) - { .format = V4L2_PIX_FMT_YUV48_12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 6, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 }, - { .format = V4L2_PIX_FMT_MT2110T, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 2, .comp_planes = 2, .bpp = { 5, 10, 0, 0 }, .bpp_div = { 4, 4, 1, 1 }, .hdiv = 2, .vdiv = 2, - .block_w = { 16, 8, 0, 0 }, .block_h = { 32, 16, 0, 0 }}, -+ { .format = V4L2_PIX_FMT_MT2110R, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 2, .comp_planes = 2, .bpp = { 5, 10, 0, 0 }, .bpp_div = { 4, 4, 1, 1 }, .hdiv = 2, .vdiv = 2, -+ .block_w = { 16, 8, 0, 0 }, .block_h = { 32, 16, 0, 0 }}, - - /* YUV planar formats */ - { .format = V4L2_PIX_FMT_NV12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 }, -diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c -index f465c0e3d6e3..f4d9d6279094 100644 ---- a/drivers/media/v4l2-core/v4l2-ioctl.c -+++ b/drivers/media/v4l2-core/v4l2-ioctl.c -@@ -1509,6 +1509,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) - case V4L2_PIX_FMT_AJPG: descr = "Aspeed JPEG"; break; - case V4L2_PIX_FMT_AV1_FRAME: descr = "AV1 Frame"; break; - case V4L2_PIX_FMT_MT2110T: descr = "Mediatek 10bit Tile Mode"; break; -+ case V4L2_PIX_FMT_MT2110R: descr = "Mediatek 10bit Raster Mode"; break; - default: - if (fmt->description[0]) - return; -diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h -index 8c7d71afbdc7..78260e5d9985 100644 ---- a/include/uapi/linux/videodev2.h -+++ b/include/uapi/linux/videodev2.h -@@ -797,6 +797,7 @@ struct v4l2_pix_format { - #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */ - #define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */ - #define V4L2_PIX_FMT_MT2110T v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */ -+#define V4L2_PIX_FMT_MT2110R v4l2_fourcc('M', 'T', '2', 'R') /* Mediatek 10-bit block raster mode */ - #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */ - #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */ - #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */ diff --git a/projects/Allwinner/patches/linux/0068-drm-bridge-dw-hdmi-truly-enforce-420-only-formats-wh.patch b/projects/Allwinner/patches/linux/0068-drm-bridge-dw-hdmi-truly-enforce-420-only-formats-wh.patch deleted file mode 100644 index b8fc0d94e6..0000000000 --- a/projects/Allwinner/patches/linux/0068-drm-bridge-dw-hdmi-truly-enforce-420-only-formats-wh.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f3710b424a96078f416e1be9cf52b87eadabae78 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Adri=C3=A1n=20Larumbe?= -Date: Sun, 25 Jun 2023 15:17:16 +0100 -Subject: [PATCH] drm/bridge: dw-hdmi: truly enforce 420-only formats when drm - mode demands it -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The current output bus format selection logic is enforcing YUV420 even -when the drm mode allows for other bus formats as well. -Fix it by adding check for 420-only drm modes. - -Signed-off-by: Adrián Larumbe -Acked-by: Neil Armstrong -Signed-off-by: Neil Armstrong -Link: https://patchwork.freedesktop.org/patch/msgid/6e6a217c180584a67ed7992c785764ba54af9151.1687702042.git.adrian.larumbe@collabora.com ---- - drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -index 8e1a9854ebc0..55281f63a186 100644 ---- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -@@ -2710,9 +2710,10 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge, - /* Default 8bit fallback */ - output_fmts[i++] = MEDIA_BUS_FMT_UYYVYY8_0_5X24; - -- *num_output_fmts = i; -- -- return output_fmts; -+ if (drm_mode_is_420_only(info, mode)) { -+ *num_output_fmts = i; -+ return output_fmts; -+ } - } - - /* --- -2.42.0 -