From: Arthur Grillo <arthurgrillo@riseup.net> To: "Daniel Vetter" <daniel@ffwll.ch>, "David Airlie" <airlied@gmail.com>, "Haneen Mohammed" <hamohammed.sa@gmail.com>, "Harry Wentland" <harry.wentland@amd.com>, "Jonathan Corbet" <corbet@lwn.net>, "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>, "Maxime Ripard" <mripard@kernel.org>, "Maíra Canal" <mairacanal@riseup.net>, "Melissa Wen" <melissa.srw@gmail.com>, "Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>, "Thomas Zimmermann" <tzimmermann@suse.de> Cc: Arthur Grillo <arthurgrillo@riseup.net>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org Subject: [PATCH v2 0/7] Add YUV formats to VKMS Date: Wed, 10 Jan 2024 14:44:00 -0300 [thread overview] Message-ID: <20240110-vkms-yuv-v2-0-952fcaa5a193@riseup.net> (raw) This patchset aims to add support for additional buffer YUV formats. More specifically, it adds support to: Semi-planar formats: - NV12 - NV16 - NV24 - NV21 - NV61 - NV42 Planar formats: - YUV440 - YUV422 - YUV444 - YVU440 - YVU422 - YVU444 These formats have more than one plane, and most have chroma subsampling. These properties don't have support on VKMS, so I had to work on this before. To ensure that the conversions from YUV to RGB are working, I wrote a KUnit test. As the work from Harry on creating KUnit tests on VKMS[1] is not yet merged, I took the setup part (Kconfig entry and .kunitfile) from it. Furthermore, I couldn't find any sources with the conversion matrices, so I had to work out the values myself based on the ITU papers[2][3][4]. So, I'm not 100% sure if the values are accurate. I'd appreciate some input if anyone has more knowledge in this area. Also, I used two IGT tests to check if the formats were having a correct conversion (all with the --extended flag): - kms_plane@pixel_format - kms_plane@pixel_format_source_clamping. The nonsubsampled formats don't have support on IGT, so I sent a patch fixing this[5]. Currently, this patchset does not add those formats to the writeback, as it would require a rewrite of how the conversions are done (similar to what was done on a previous patch[6]). So, I would like to review this patchset before I start the work on this other part. [1]: https://lore.kernel.org/all/20231108163647.106853-5-harry.wentland@amd.com/ [2]: https://www.itu.int/rec/R-REC-BT.601-7-201103-I/en [3]: https://www.itu.int/rec/R-REC-BT.709-6-201506-I/en [4]: https://www.itu.int/rec/R-REC-BT.2020-2-201510-I/en [5]: https://lists.freedesktop.org/archives/igt-dev/2024-January/066937.html [6]: https://lore.kernel.org/dri-devel/20230414135151.75975-2-mcanal@igalia.com/ Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net> --- Changes in v2: - Use EXPORT_SYMBOL_IF_KUNIT instead of including the .c test file (Maxime) - Link to v1: https://lore.kernel.org/r/20240105-vkms-yuv-v1-0-34c4cd3455e0@riseup.net --- Arthur Grillo (7): drm/vkms: Use drm_frame directly drm/vkms: Add support for multy-planar framebuffers drm/vkms: Add range and encoding properties to pixel_read function drm/vkms: Add chroma subsampling drm/vkms: Add YUV support drm/vkms: Drop YUV formats TODO drm/vkms: Create KUnit tests for YUV conversions Documentation/gpu/vkms.rst | 3 +- drivers/gpu/drm/vkms/Kconfig | 15 ++ drivers/gpu/drm/vkms/Makefile | 1 + drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + drivers/gpu/drm/vkms/tests/Makefile | 3 + drivers/gpu/drm/vkms/tests/vkms_format_test.c | 156 ++++++++++++++++ drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_formats.c | 247 ++++++++++++++++++++++---- drivers/gpu/drm/vkms/vkms_formats.h | 9 + drivers/gpu/drm/vkms/vkms_plane.c | 26 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 5 - 11 files changed, 426 insertions(+), 49 deletions(-) --- base-commit: eeb8e8d9f124f279e80ae679f4ba6e822ce4f95f change-id: 20231226-vkms-yuv-6f7859f32df8 Best regards, -- Arthur Grillo <arthurgrillo@riseup.net>
WARNING: multiple messages have this Message-ID (diff)
From: Arthur Grillo <arthurgrillo@riseup.net> To: "Daniel Vetter" <daniel@ffwll.ch>, "David Airlie" <airlied@gmail.com>, "Haneen Mohammed" <hamohammed.sa@gmail.com>, "Harry Wentland" <harry.wentland@amd.com>, "Jonathan Corbet" <corbet@lwn.net>, "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>, "Maxime Ripard" <mripard@kernel.org>, "Maíra Canal" <mairacanal@riseup.net>, "Melissa Wen" <melissa.srw@gmail.com>, "Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>, "Thomas Zimmermann" <tzimmermann@suse.de> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arthur Grillo <arthurgrillo@riseup.net> Subject: [PATCH v2 0/7] Add YUV formats to VKMS Date: Wed, 10 Jan 2024 14:44:00 -0300 [thread overview] Message-ID: <20240110-vkms-yuv-v2-0-952fcaa5a193@riseup.net> (raw) This patchset aims to add support for additional buffer YUV formats. More specifically, it adds support to: Semi-planar formats: - NV12 - NV16 - NV24 - NV21 - NV61 - NV42 Planar formats: - YUV440 - YUV422 - YUV444 - YVU440 - YVU422 - YVU444 These formats have more than one plane, and most have chroma subsampling. These properties don't have support on VKMS, so I had to work on this before. To ensure that the conversions from YUV to RGB are working, I wrote a KUnit test. As the work from Harry on creating KUnit tests on VKMS[1] is not yet merged, I took the setup part (Kconfig entry and .kunitfile) from it. Furthermore, I couldn't find any sources with the conversion matrices, so I had to work out the values myself based on the ITU papers[2][3][4]. So, I'm not 100% sure if the values are accurate. I'd appreciate some input if anyone has more knowledge in this area. Also, I used two IGT tests to check if the formats were having a correct conversion (all with the --extended flag): - kms_plane@pixel_format - kms_plane@pixel_format_source_clamping. The nonsubsampled formats don't have support on IGT, so I sent a patch fixing this[5]. Currently, this patchset does not add those formats to the writeback, as it would require a rewrite of how the conversions are done (similar to what was done on a previous patch[6]). So, I would like to review this patchset before I start the work on this other part. [1]: https://lore.kernel.org/all/20231108163647.106853-5-harry.wentland@amd.com/ [2]: https://www.itu.int/rec/R-REC-BT.601-7-201103-I/en [3]: https://www.itu.int/rec/R-REC-BT.709-6-201506-I/en [4]: https://www.itu.int/rec/R-REC-BT.2020-2-201510-I/en [5]: https://lists.freedesktop.org/archives/igt-dev/2024-January/066937.html [6]: https://lore.kernel.org/dri-devel/20230414135151.75975-2-mcanal@igalia.com/ Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net> --- Changes in v2: - Use EXPORT_SYMBOL_IF_KUNIT instead of including the .c test file (Maxime) - Link to v1: https://lore.kernel.org/r/20240105-vkms-yuv-v1-0-34c4cd3455e0@riseup.net --- Arthur Grillo (7): drm/vkms: Use drm_frame directly drm/vkms: Add support for multy-planar framebuffers drm/vkms: Add range and encoding properties to pixel_read function drm/vkms: Add chroma subsampling drm/vkms: Add YUV support drm/vkms: Drop YUV formats TODO drm/vkms: Create KUnit tests for YUV conversions Documentation/gpu/vkms.rst | 3 +- drivers/gpu/drm/vkms/Kconfig | 15 ++ drivers/gpu/drm/vkms/Makefile | 1 + drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + drivers/gpu/drm/vkms/tests/Makefile | 3 + drivers/gpu/drm/vkms/tests/vkms_format_test.c | 156 ++++++++++++++++ drivers/gpu/drm/vkms/vkms_drv.h | 6 +- drivers/gpu/drm/vkms/vkms_formats.c | 247 ++++++++++++++++++++++---- drivers/gpu/drm/vkms/vkms_formats.h | 9 + drivers/gpu/drm/vkms/vkms_plane.c | 26 ++- drivers/gpu/drm/vkms/vkms_writeback.c | 5 - 11 files changed, 426 insertions(+), 49 deletions(-) --- base-commit: eeb8e8d9f124f279e80ae679f4ba6e822ce4f95f change-id: 20231226-vkms-yuv-6f7859f32df8 Best regards, -- Arthur Grillo <arthurgrillo@riseup.net>
next reply other threads:[~2024-01-10 17:44 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-10 17:44 Arthur Grillo [this message] 2024-01-10 17:44 ` [PATCH v2 0/7] Add YUV formats to VKMS Arthur Grillo 2024-01-10 17:44 ` [PATCH v2 1/7] drm/vkms: Use drm_frame directly Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:43 ` Louis Chauvet 2024-01-10 17:44 ` [PATCH v2 2/7] drm/vkms: Add support for multy-planar framebuffers Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:38 ` Louis Chauvet 2024-02-02 18:49 ` Arthur Grillo 2024-01-10 17:44 ` [PATCH v2 3/7] drm/vkms: Add range and encoding properties to pixel_read function Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:44 ` Louis Chauvet 2024-01-10 17:44 ` [PATCH v2 4/7] drm/vkms: Add chroma subsampling Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:39 ` Louis Chauvet 2024-01-10 17:44 ` [PATCH v2 5/7] drm/vkms: Add YUV support Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:44 ` Louis Chauvet 2024-01-10 17:44 ` [PATCH v2 6/7] drm/vkms: Drop YUV formats TODO Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:46 ` Louis Chauvet 2024-01-10 17:44 ` [PATCH v2 7/7] drm/vkms: Create KUnit tests for YUV conversions Arthur Grillo 2024-01-10 17:44 ` Arthur Grillo 2024-02-01 17:40 ` Louis Chauvet 2024-01-15 15:06 ` [PATCH v2 0/7] Add YUV formats to VKMS Sebastian Wick 2024-01-15 15:06 ` Sebastian Wick 2024-02-28 23:42 ` Arthur Grillo 2024-02-29 17:52 ` Sebastian Wick 2024-02-29 18:27 ` Arthur Grillo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240110-vkms-yuv-v2-0-952fcaa5a193@riseup.net \ --to=arthurgrillo@riseup.net \ --cc=airlied@gmail.com \ --cc=corbet@lwn.net \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=hamohammed.sa@gmail.com \ --cc=harry.wentland@amd.com \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mairacanal@riseup.net \ --cc=melissa.srw@gmail.com \ --cc=mripard@kernel.org \ --cc=rodrigosiqueiramelo@gmail.com \ --cc=tzimmermann@suse.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.