Re: [PATCH] drm/vkms: Remove event from vkms_output

2024-07-04 Thread Louis Chauvet
l.org/all/5d9ca7b3884c1995bd4a983b1d2ff1b840eb7f1a.1531402095.git.rodrigosiqueiram...@gmail.com/ Reviewed-By: Louis Chauvet Tested-By: Louis Chauvet > > Signed-off-by: Lyude Paul > --- > drivers/gpu/drm/vkms/vkms_drv.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/dri

Re: [PATCH v8 00/17] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-07-01 Thread Louis Chauvet
refresh rate, mst...). However, I am currently waiting for feedback on this series before proceeding further with the next topics. What should I do to move those series forward? Best regards, Louis Chauvet [1]: https://lore.kernel.org/all/20240516-b4-new-color-formats-v1-0-74cf9fe07...@bootlin.com

Re: [PATCH 1/2] drm/vkms: Fix misalignment in comment block

2024-05-28 Thread Louis Chauvet
ean same column? Maybe in the same patch, also add the missing first empty line in the comment [1]: /* * FIXME: [...] */ https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting Thanks, Louis Chauvet > Co-developed-by: Lucas Antonio > Signed-

Re: [PATCH v6 0/7] Adds support for ConfigFS to VKMS!

2024-05-17 Thread Louis Chauvet
s bd721f41fad9 drm/vkms: Make writeback configurable with configfs Kind regards, Louis Chauvet [1]: https://github.com/Fomys/linux/tree/b4/new-configfs > > > Since you are already working on the kernel patches (and I guess IGT?), > > > I'll start working on a libdrm high level

[PATCH 3/3] drm/vkms: Add support for XRGB2101010

2024-05-16 Thread Louis Chauvet
Thanks to the WRITE_LINE macro, adding the format XRGB210101010 is trivial. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 12 drivers/gpu/drm/vkms/vkms_writeback.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 2/3] drm/vkms: Add a macro for write_line functions

2024-05-16 Thread Louis Chauvet
As stated in [2], the write_line functions are very similar and force code duplication. This patch add a macro to avoid code repetition. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 107 ++ drivers/gpu/drm/vkms/vkms_writeback.c | 4

[PATCH 0/3] drm/vkms: Reimplement line-per-line pixel conversion for writeback

2024-05-16 Thread Louis Chauvet
1]: https://lore.kernel.org/all/20240516-b4-new-color-formats-v1-0-74cf9fe07...@bootlin.com/ Signed-off-by: Louis Chauvet --- Louis Chauvet (3): drm/vkms: Re-introduce line-by-line algorithm for writeback drm/vkms: Add a macro for write_line functions drm/vkms: Add support for X

[PATCH 1/3] drm/vkms: Re-introduce line-by-line algorithm for writeback

2024-05-16 Thread Louis Chauvet
...@gmail.com/ [2]: https://lore.kernel.org/all/20230515135204.115393-4-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 18 + drivers/gpu/drm/vkms/vkms_drv.h | 20 +++-- drivers/gpu/drm/vkms/vkms_formats.c | 139

[PATCH 4/5] drm/vkms: Add support for RGB565 formats

2024-05-16 Thread Louis Chauvet
The format RGB565 was already supported. Add the support for: - BGR565 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 25 - drivers/gpu/drm/vkms/vkms_plane.c | 1 + 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH 3/5] drm/vkms: Add support for ARGB16161616 formats

2024-05-16 Thread Louis Chauvet
The formats XRGB16161616 and ARGB16161616 were already supported. Add the support for: - ABGR16161616 - XBGR16161616 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 7 ++- drivers/gpu/drm/vkms/vkms_plane.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion

[PATCH 5/5] drm/vkms: Add support for RGB888 formats

2024-05-16 Thread Louis Chauvet
Add the support for: - RGB888 - BGR888 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 7 +++ drivers/gpu/drm/vkms/vkms_plane.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[PATCH 1/5] drm/vkms: Create helpers macro to avoid code duplication in format callbacks

2024-05-16 Thread Louis Chauvet
The callback functions for line conversion are almost identical for some format. The generic READ_LINE macro generate all the required boilerplate to process a line. Two overrides of this macro have been added to avoid duplication of the same arguments every time. Signed-off-by: Louis Chauvet

[PATCH 0/5] drm/vkms: Add support for multiple plane formats

2024-05-16 Thread Louis Chauvet
. This series must be applied on top of [1]. [1] https://lore.kernel.org/all/20240516-yuv-v8-0-cf8d6f864...@bootlin.com/ Signed-off-by: Louis Chauvet --- Louis Chauvet (5): drm/vkms: Create helpers macro to avoid code duplication in format callbacks drm/vkms: Add support for ARGB

[PATCH 2/5] drm/vkms: Add support for ARGB8888 formats

2024-05-16 Thread Louis Chauvet
The formats XRGB and ARGB were already supported. Add the support for: - XBGR - RGBX - BGRX - ABGR - RGBA - BGRA Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 18 ++ drivers/gpu/drm/vkms/vkms_plane.c | 6 ++ 2 files

[PATCH v8 13/17] drm/vkms: Add range and encoding properties to the plane

2024-05-16 Thread Louis Chauvet
From: Arthur Grillo Now that the driver internally handles these quantization ranges and YUV encoding matrices, expose the UAPI for setting them. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts, updated the commit message] Acked-by: Pekka Paalanen Signed-off

[PATCH v8 11/17] drm/vkms: Remove useless drm_rotation_simplify

2024-05-16 Thread Louis Chauvet
As all the rotation are now supported by VKMS, this simplification does not make sense anymore, so remove it. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers

[PATCH v8 16/17] drm/vkms: Add how to run the Kunit tests

2024-05-16 Thread Louis Chauvet
From: Arthur Grillo Now that we have KUnit tests, add instructions on how to run them. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu

[PATCH v8 14/17] drm/vkms: Drop YUV formats TODO

2024-05-16 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v8 15/17] drm/vkms: Create KUnit tests for YUV conversions

2024-05-16 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. The code used to compute the expected result can be found in comment. [Louis Chauvet: - fix minor formating issues (whitespace, double line

[PATCH v8 17/17] drm/vkms: Add support for DRM_FORMAT_R*

2024-05-16 Thread Louis Chauvet
-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 110 +++- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++ 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[PATCH v8 12/17] drm/vkms: Add YUV support

2024-05-16 Thread Louis Chauvet
category of formats is the order of field, a simple swap in conversion matrix columns allows using the same function. Signed-off-by: Arthur Grillo [Louis Chauvet: - Adapted Arthur's work - Implemented the read_line_t callbacks for yuv - add struct conversion_matrix - store the whole

[PATCH v8 10/17] drm/vkms: Re-introduce line-per-line composition algorithm

2024-05-16 Thread Louis Chauvet
/lore.kernel.org/all/20240422-kms_fb_stress-dev-v5-0-0c577163d...@riseup.net/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 235 +++--- drivers/gpu/drm/vkms/vkms_drv.h | 28 ++-- drivers/gpu/drm/vkms/v

[PATCH v8 06/17] drm/vkms: Use const for input pointers in pixel_read an pixel_write functions

2024-05-16 Thread Louis Chauvet
As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 24

[PATCH v8 09/17] drm/vkms: Introduce pixel_read_direction enum

2024-05-16 Thread Louis Chauvet
, and one to compute the step, in byte, between two successive pixel in a specific direction. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 46 drivers/gpu/drm/vkms/vkms_drv.h | 11 + drivers/gpu/drm/vkms/vkms_formats.c

[PATCH v8 08/17] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

2024-05-16 Thread Louis Chauvet
in the same place: the loop in `blend`. Reviewed-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 40 +--- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm

[PATCH v8 07/17] drm/vkms: Update pixels accessor to support packed and multi-plane formats.

2024-05-16 Thread Louis Chauvet
`cpp`. Introduce the plane_index parameter to get an offset/pointer on a different plane. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 112 1 file changed, 89 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/vkms

[PATCH v8 03/17] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-05-16 Thread Louis Chauvet
Add some documentation on pixel conversion functions. Update of outdated comments for pixel_write functions. Signed-off-by: Louis Chauvet Acked-by: Pekka Paalanen --- drivers/gpu/drm/vkms/vkms_composer.c | 7 drivers/gpu/drm/vkms/vkms_drv.h | 15 - drivers/gpu/drm/vkms

[PATCH v8 05/17] drm/vkms: Add dummy pixel_read/pixel_write callbacks to avoid NULL pointers

2024-05-16 Thread Louis Chauvet
-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 45 - 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index 6b3e17374b19

[PATCH v8 04/17] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-05-16 Thread Louis Chauvet
between read_line and write_line. A warn has been added in get_pixel_*_function to alert when an unsupported pixel format is requested. As those formats are checked before atomic_update callbacks, it should never happen. Document for those typedefs. Reviewed-by: Pekka Paalanen Signed-off-by: Louis

[PATCH v8 01/17] drm/vkms: Code formatting

2024-05-16 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++ drivers/gpu/drm/vkms/vkms_drv.c

[PATCH v8 02/17] drm/vkms: Use drm_frame directly

2024-05-16 Thread Louis Chauvet
From: Arthur Grillo Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Reviewed-by: Maíra Canal Reviewed-by: Louis Chauvet [Louis Chauvet: Applied review from Maíra] Signed-off

[PATCH v8 00/17] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-05-16 Thread Louis Chauvet
mie.dautheri...@bootlin.com Cc: miquel.ray...@bootlin.com Cc: thomas.petazz...@bootlin.com Cc: seanp...@google.com Cc: marc...@google.com Cc: nicolejade...@google.com Signed-off-by: Louis Chauvet Note: after my changes, those tests seems to pass, so [7] may need updating (I did not check,

Re: [PATCH v7 11/17] drm/vkms: Remove useless drm_rotation_simplify

2024-05-16 Thread Louis Chauvet
Le 16/05/24 - 07:43, Maíra Canal a écrit : > Hi Louis, > > On 5/13/24 04:50, Louis Chauvet wrote: > > As all the rotation are now supported by VKMS, this simplification does > > not make sense anymore, so remove it. > > > > Signed-off-by: Louis Chauvet >

[PATCH v7 15/17] drm/vkms: Create KUnit tests for YUV conversions

2024-05-13 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. The code used to compute the expected result can be found in comment. [Louis Chauvet: - fix minor formating issues (whitespace, double line

[PATCH v7 16/17] drm/vkms: Add how to run the Kunit tests

2024-05-13 Thread Louis Chauvet
From: Arthur Grillo Now that we have KUnit tests, add instructions on how to run them. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu

[PATCH v7 14/17] drm/vkms: Drop YUV formats TODO

2024-05-13 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v7 17/17] drm/vkms: Add support for DRM_FORMAT_R*

2024-05-13 Thread Louis Chauvet
-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 105 +++- drivers/gpu/drm/vkms/vkms_plane.c | 4 ++ 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index

[PATCH v7 13/17] drm/vkms: Add range and encoding properties to the plane

2024-05-13 Thread Louis Chauvet
From: Arthur Grillo Now that the driver internally handles these quantization ranges and YUV encoding matrices, expose the UAPI for setting them. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts, updated the commit message] Acked-by: Pekka Paalanen Signed-off

[PATCH v7 12/17] drm/vkms: Add YUV support

2024-05-13 Thread Louis Chauvet
category of formats is the order of field, a simple swap in conversion matrix columns allows using the same function. Signed-off-by: Arthur Grillo [Louis Chauvet: - Adapted Arthur's work - Implemented the read_line_t callbacks for yuv - add struct conversion_matrix - store the whole

[PATCH v7 10/17] drm/vkms: Re-introduce line-per-line composition algorithm

2024-05-13 Thread Louis Chauvet
2d716a3e8a ("drm/vkms: isolate pixel conversion functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ [3]: https://lore.kernel.org/igt-dev/20240313-new_rotation-v2-0-6230fd5ca...@bootlin.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/v

[PATCH v7 09/17] drm/vkms: Introduce pixel_read_direction enum

2024-05-13 Thread Louis Chauvet
, and one to compute the step, in byte, between two successive pixel in a specific direction. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 46 drivers/gpu/drm/vkms/vkms_drv.h | 11 + drivers/gpu/drm/vkms/vkms_formats.c

[PATCH v7 06/17] drm/vkms: Use const for input pointers in pixel_read an pixel_write functions

2024-05-13 Thread Louis Chauvet
As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 24

[PATCH v7 11/17] drm/vkms: Remove useless drm_rotation_simplify

2024-05-13 Thread Louis Chauvet
As all the rotation are now supported by VKMS, this simplification does not make sense anymore, so remove it. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers

[PATCH v7 08/17] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

2024-05-13 Thread Louis Chauvet
in the same place: the loop in `blend`. Reviewed-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 40 +--- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm

[PATCH v7 07/17] drm/vkms: Update pixels accessor to support packed and multi-plane formats.

2024-05-13 Thread Louis Chauvet
`cpp`. Introduce the plane_index parameter to get an offset/pointer on a different plane. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 110 1 file changed, 87 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/vkms

[PATCH v7 05/17] drm/vkms: Add dummy pixel_read/pixel_write callbacks to avoid NULL pointers

2024-05-13 Thread Louis Chauvet
-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 45 - 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index 6b3e17374b19

[PATCH v7 04/17] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-05-13 Thread Louis Chauvet
between read_line and write_line. A warn has been added in get_pixel_*_function to alert when an unsupported pixel format is requested. As those formats are checked before atomic_update callbacks, it should never happen. Document for those typedefs. Reviewed-by: Pekka Paalanen Signed-off-by: Louis

[PATCH v7 01/17] drm/vkms: Code formatting

2024-05-13 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++ drivers/gpu/drm/vkms/vkms_drv.c

[PATCH v7 02/17] drm/vkms: Use drm_frame directly

2024-05-13 Thread Louis Chauvet
From: Arthur Grillo Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Reviewed-by: Maíra Canal Reviewed-by: Louis Chauvet [Louis Chauvet: Applied review from Maíra] Signed-off

[PATCH v7 03/17] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-05-13 Thread Louis Chauvet
Add some documentation on pixel conversion functions. Update of outdated comments for pixel_write functions. Signed-off-by: Louis Chauvet Acked-by: Pekka Paalanen --- drivers/gpu/drm/vkms/vkms_composer.c | 7 drivers/gpu/drm/vkms/vkms_drv.h | 15 - drivers/gpu/drm/vkms

[PATCH v7 00/17] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-05-13 Thread Louis Chauvet
inux-ker...@vger.kernel.org Cc: jeremie.dautheri...@bootlin.com Cc: miquel.ray...@bootlin.com Cc: thomas.petazz...@bootlin.com Cc: seanp...@google.com Cc: marc...@google.com Cc: nicolejade...@google.com Signed-off-by: Louis Chauvet Note: after my changes, those tests seems to pass, so [7] may need updating

Re: [PATCH v6 09/17] drm/vkms: Introduce pixel_read_direction enum

2024-05-13 Thread Louis Chauvet
ffer of 9x5 pixels, the step between two blocks verticaly must be 40 bytes. Your formula and interpretation of pitch will give only 36 bytes (a row only need 18 bytes). So a new "pitch" is needed. > Aside from this problem, looks good. > > > Thanks, > pq > > > + } > > + > > + return 0; > > +} > > + > > /** > > * packed_pixels_addr_1x1() - Get the pointer to the block containing the > > pixel at the given > > * coordinates > > > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v6 07/17] drm/vkms: Update pixels accessor to support packed and multi-plane formats.

2024-05-13 Thread Louis Chauvet
Le 22/04/24 - 14:07, Pekka Paalanen a écrit : > On Tue, 09 Apr 2024 15:25:25 +0200 > Louis Chauvet wrote: > > > Introduce the usage of block_h/block_w to compute the offset and the > > pointer of a pixel. The previous implementation was specialized for > > planes w

Re: [PATCH v6 03/17] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-05-13 Thread Louis Chauvet
Le 22/04/24 - 13:33, Pekka Paalanen a écrit : > On Tue, 09 Apr 2024 15:25:21 +0200 > Louis Chauvet wrote: > > > Add some documentation on pixel conversion functions. > > Update of outdated comments for pixel_write functions. > > > > Signed-off-by: Louis Chau

Re: [PATCH v6 0/7] Adds support for ConfigFS to VKMS!

2024-05-10 Thread Louis Chauvet
we can distinguish between the "creation" and the "runtime configuration", in two different configFS directory? Once a device is created, it is moved to the "enabled" directory and will have a different set of attribute (connection status, current EDID...) For the platform dr

Re: [PATCH 3/3] drm/fourcc: Add documentation around drm_format_info

2024-04-16 Thread Louis Chauvet
Le 15/04/24 - 15:00, Pekka Paalanen a écrit : > On Tue, 09 Apr 2024 12:04:07 +0200 > Louis Chauvet wrote: > > > Let's provide more details about the drm_format_info structure because > > its content may not be straightforward for someone not used to video > >

Re: [PATCH 2/3] drm: drm_blend.c: Improve drm_plane_create_rotation_property kernel doc

2024-04-16 Thread Louis Chauvet
Le 15/04/24 - 21:28, Bagas Sanjaya a écrit : > On Tue, Apr 09, 2024 at 12:04:06PM +0200, Louis Chauvet wrote: > > @@ -266,8 +257,41 @@ EXPORT_SYMBOL(drm_plane_create_alpha_property); > > * > > * Rotation is the specified amount in degrees in counter clockwise > &g

Re: [PATCH 2/3] drm: drm_blend.c: Improve drm_plane_create_rotation_property kernel doc

2024-04-16 Thread Louis Chauvet
Le 15/04/24 - 14:36, Pekka Paalanen a écrit : > On Tue, 09 Apr 2024 12:04:06 +0200 > Louis Chauvet wrote: > > > The expected behavior of the rotation property was not very clear. Add > > more examples to explain what is the expected result. > > >

[PATCH v6 11/17] drm/vkms: Remove useless drm_rotation_simplify

2024-04-09 Thread Louis Chauvet
As all the rotation are now supported by VKMS, this simplification does not make sense anymore, so remove it. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers

[PATCH v6 02/17] drm/vkms: Use drm_frame directly

2024-04-09 Thread Louis Chauvet
From: Arthur Grillo Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Reviewed-by: Maíra Canal Reviewed-by: Louis Chauvet [Louis Chauvet: Applied review from Maíra] Signed-off

[PATCH v6 03/17] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-04-09 Thread Louis Chauvet
Add some documentation on pixel conversion functions. Update of outdated comments for pixel_write functions. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 7 drivers/gpu/drm/vkms/vkms_drv.h | 15 - drivers/gpu/drm/vkms/vkms_formats.c | 62

[PATCH v6 14/17] drm/vkms: Drop YUV formats TODO

2024-04-09 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b

[PATCH v6 13/17] drm/vkms: Add range and encoding properties to the plane

2024-04-09 Thread Louis Chauvet
From: Arthur Grillo Now that the driver internally handles these quantization ranges and YUV encoding matrices, expose the UAPI for setting them. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts, updated the commit message] Signed-off-by: Louis Chauvet --- drivers

[PATCH v6 10/17] drm/vkms: Re-introduce line-per-line composition algorithm

2024-04-09 Thread Louis Chauvet
functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ [3]: https://lore.kernel.org/igt-dev/20240313-new_rotation-v2-0-6230fd5ca...@bootlin.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 230 ++---

[PATCH v6 15/17] drm/vkms: Create KUnit tests for YUV conversions

2024-04-09 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. The code used to compute the expected result can be found in comment. Signed-off-by: Arthur Grillo [Louis Chauvet: - fix minor formating

[PATCH v6 09/17] drm/vkms: Introduce pixel_read_direction enum

2024-04-09 Thread Louis Chauvet
, and one to compute the step, in byte, between two successive pixel in a specific direction. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 42 drivers/gpu/drm/vkms/vkms_drv.h | 11 ++ drivers/gpu/drm/vkms/vkms_formats.c

[PATCH v6 17/17] drm/vkms: Add support for DRM_FORMAT_R*

2024-04-09 Thread Louis Chauvet
This add the support for: - R1/R2/R4/R8 R1 format was tested with [1] and [2]. [1]: https://lore.kernel.org/r/20240313-new_rotation-v2-0-6230fd5ca...@bootlin.com [2]: https://lore.kernel.org/igt-dev/20240306-b4-kms_tests-v1-0-8fe451efd...@bootlin.com/ Signed-off-by: Louis Chauvet

[PATCH v6 12/17] drm/vkms: Add YUV support

2024-04-09 Thread Louis Chauvet
category of formats is the order of field, a simple swap in conversion matrix columns allows using the same function. Signed-off-by: Arthur Grillo [Louis Chauvet: - Adapted Arthur's work - Implemented the read_line_t callbacks for yuv - add struct conversion_matrix - store the whole

[PATCH v6 16/17] drm/vkms: Add how to run the Kunit tests

2024-04-09 Thread Louis Chauvet
From: Arthur Grillo Now that we have KUnit tests, add instructions on how to run them. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu

[PATCH v6 07/17] drm/vkms: Update pixels accessor to support packed and multi-plane formats.

2024-04-09 Thread Louis Chauvet
`cpp`. Introduce the plane_index parameter to get an offset/pointer on a different plane. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 110 1 file changed, 87 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/vkms

[PATCH v6 08/17] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

2024-04-09 Thread Louis Chauvet
in the same place: the loop in `blend`. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 40 +--- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c index

[PATCH v6 04/17] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-04-09 Thread Louis Chauvet
between read_line and write_line. A warn has been added in get_pixel_*_function to alert when an unsupported pixel format is requested. As those formats are checked before atomic_update callbacks, it should never happen. Document for those typedefs. Reviewed-by: Pekka Paalanen Signed-off-by: Louis

[PATCH v6 06/17] drm/vkms: Use const for input pointers in pixel_read an pixel_write functions

2024-04-09 Thread Louis Chauvet
As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 24

[PATCH v6 05/17] drm/vkms: Add dummy pixel_read/pixel_write callbacks to avoid NULL pointers

2024-04-09 Thread Louis Chauvet
-by: Pekka Paalanen Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 45 - 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index 6b3e17374b19

[PATCH v6 01/17] drm/vkms: Code formatting

2024-04-09 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++ drivers/gpu/drm/vkms/vkms_drv.c

[PATCH v6 00/17] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-04-09 Thread Louis Chauvet
inux-ker...@vger.kernel.org Cc: jeremie.dautheri...@bootlin.com Cc: miquel.ray...@bootlin.com Cc: thomas.petazz...@bootlin.com Cc: seanp...@google.com Cc: marc...@google.com Cc: nicolejade...@google.com Signed-off-by: Louis Chauvet Note: after my changes, those tests seems to pass, so [7] may need updating

Re: [PATCH 0/3] drm: Multiple documentation update

2024-04-09 Thread Louis Chauvet
Le 09/04/24 - 13:18, Jani Nikula a écrit : > On Tue, 09 Apr 2024, Louis Chauvet wrote: > > PATCH 1 and PATCH 2 focus on the rotation property. The rotation property > > can be challenging to understand, especially when it is combined with > > reflections. These patches a

Re: [PATCH v5 11/16] drm/vkms: Add YUV support

2024-04-09 Thread Louis Chauvet
Le 09/04/24 - 10:58, Pekka Paalanen a écrit : > On Mon, 8 Apr 2024 09:50:19 +0200 > Louis Chauvet wrote: > > > Le 27/03/24 - 16:23, Pekka Paalanen a écrit : > > > On Wed, 13 Mar 2024 18:45:05 +0100 > > > Louis Chauvet wrote: > > > > > >

Re: [PATCH v5 09/16] drm/vkms: Introduce pixel_read_direction enum

2024-04-09 Thread Louis Chauvet
Le 09/04/24 - 10:35, Pekka Paalanen a écrit : > On Mon, 8 Apr 2024 09:50:18 +0200 > Louis Chauvet wrote: > > > Le 27/03/24 - 14:16, Pekka Paalanen a écrit : > > > On Tue, 26 Mar 2024 16:57:00 +0100 > > > Louis Chauvet wrote: > > > > >

[PATCH 2/3] drm: drm_blend.c: Improve drm_plane_create_rotation_property kernel doc

2024-04-09 Thread Louis Chauvet
The expected behavior of the rotation property was not very clear. Add more examples to explain what is the expected result. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/drm_blend.c | 52 + 1 file changed, 38 insertions(+), 14 deletions(-) diff

[PATCH 3/3] drm/fourcc: Add documentation around drm_format_info

2024-04-09 Thread Louis Chauvet
Let's provide more details about the drm_format_info structure because its content may not be straightforward for someone not used to video formats and drm internals. Signed-off-by: Louis Chauvet --- include/drm/drm_fourcc.h | 45 ++--- 1 file changed, 38

[PATCH 0/3] drm: Multiple documentation update

2024-04-09 Thread Louis Chauvet
, during my testing phase, I noticed that the original VKMS implementation interpreted the rotation differently. Therefore, I kindly request that someone validate or invalidate my interpretation before proceeding with the merge. Signed-off-by: Louis Chauvet --- Louis Chauvet (3): drm

[PATCH 1/3] drm: drm_blend.c: Add precision in drm_rotation_simplify kernel doc

2024-04-09 Thread Louis Chauvet
As the function uses non-trivial bit operations, add a little paragraph to describe what is the expected behavior. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/drm_blend.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c

Re: [PATCH v5 16/16] drm/vkms: Add support for DRM_FORMAT_R*

2024-04-08 Thread Louis Chauvet
Le 28/03/24 - 16:00, Pekka Paalanen a écrit : > On Wed, 13 Mar 2024 18:45:10 +0100 > Louis Chauvet wrote: > > > This add the support for: > > - R1/R2/R4/R8 > > > > R1 format was tested with [1] and [2]. > > > > [1]: > > https://lor

Re: [PATCH v5 11/16] drm/vkms: Add YUV support

2024-04-08 Thread Louis Chauvet
Le 27/03/24 - 13:11, Philipp Zabel a écrit : > Hi Louis, > > On Mi, 2024-03-13 at 18:45 +0100, Louis Chauvet wrote: > > From: Arthur Grillo > > > > Add support to the YUV formats bellow: > > > > - NV12/NV16/NV24 > > - NV21/NV61/NV42 > >

Re: [PATCH v5 11/16] drm/vkms: Add YUV support

2024-04-08 Thread Louis Chauvet
Le 27/03/24 - 14:59, Pekka Paalanen a écrit : > On Tue, 26 Mar 2024 16:57:03 +0100 > Louis Chauvet wrote: > > > Le 25/03/24 - 11:26, Maíra Canal a écrit : > > > On 3/13/24 14:45, Louis Chauvet wrote: > > > > From: Arthur Grillo > > > >

Re: [PATCH v5 11/16] drm/vkms: Add YUV support

2024-04-08 Thread Louis Chauvet
Le 27/03/24 - 16:23, Pekka Paalanen a écrit : > On Wed, 13 Mar 2024 18:45:05 +0100 > Louis Chauvet wrote: > > > From: Arthur Grillo > > > > Add support to the YUV formats bellow: > > > > - NV12/NV16/NV24 > > - NV21/NV61/NV42 > >

Re: [PATCH v5 09/16] drm/vkms: Introduce pixel_read_direction enum

2024-04-08 Thread Louis Chauvet
Le 27/03/24 - 14:16, Pekka Paalanen a écrit : > On Tue, 26 Mar 2024 16:57:00 +0100 > Louis Chauvet wrote: > > > Le 25/03/24 - 15:11, Pekka Paalanen a écrit : > > > On Wed, 13 Mar 2024 18:45:03 +0100 > > > Louis Chauvet wrote: > > > > > > &g

Re: [PATCH v5 08/16] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

2024-04-08 Thread Louis Chauvet
Le 27/03/24 - 13:48, Pekka Paalanen a écrit : > On Tue, 26 Mar 2024 16:57:00 +0100 > Louis Chauvet wrote: > > > Le 25/03/24 - 14:41, Pekka Paalanen a écrit : > > > On Wed, 13 Mar 2024 18:45:02 +0100 > > > Louis Chauvet wrote: > > > > > > >

Re: [PATCH v5 10/16] drm/vkms: Re-introduce line-per-line composition algorithm

2024-04-08 Thread Louis Chauvet
Le 27/03/24 - 14:29, Pekka Paalanen a écrit : > On Tue, 26 Mar 2024 16:57:02 +0100 > Louis Chauvet wrote: > > > [...] > > > > > > @@ -215,34 +188,146 @@ static void blend(struct vkms_writeback_job *wb, > > > > { > > > > st

Re: [PATCH v5 11/16] drm/vkms: Add YUV support

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 11:26, Maíra Canal a écrit : > On 3/13/24 14:45, Louis Chauvet wrote: > > From: Arthur Grillo > > > > Add support to the YUV formats bellow: > > > > - NV12/NV16/NV24 > > - NV21/NV61/NV42 > > - YUV420/YUV422/YUV444 > > - YVU420/YV

Re: [PATCH v5 04/16] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 14:04, Pekka Paalanen a écrit : > On Wed, 13 Mar 2024 18:44:58 +0100 > Louis Chauvet wrote: > > > Introduce two typedefs: pixel_read_t and pixel_write_t. It allows the > > compiler to check if the passed functions take the correct arguments. > > Such

Re: [PATCH v5 09/16] drm/vkms: Introduce pixel_read_direction enum

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 11:07, Maíra Canal a écrit : > On 3/13/24 14:45, Louis Chauvet wrote: > > The pixel_read_direction enum is useful to describe the reading direction > > in a plane. It avoids using the rotation property of DRM, which not > > practical to know the direction of re

Re: [PATCH v5 14/16] drm/vkms: Create KUnit tests for YUV conversions

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 11:34, Maíra Canal a écrit : > On 3/13/24 14:45, Louis Chauvet wrote: > > From: Arthur Grillo > > > > Create KUnit tests to test the conversion between YUV and RGB. Test each > > conversion and range combination with some common colors. > &

Re: [PATCH v5 07/16] drm/vkms: Update pixels accessor to support packed and multi-plane formats.

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 14:40, Pekka Paalanen a écrit : > On Wed, 13 Mar 2024 18:45:01 +0100 > Louis Chauvet wrote: > > > Introduce the usage of block_h/block_w to compute the offset and the > > pointer of a pixel. The previous implementation was specialized for > > planes w

Re: [PATCH v5 10/16] drm/vkms: Re-introduce line-per-line composition algorithm

2024-03-26 Thread Louis Chauvet
t_pixel < end) { > > + u16 *px = (u16 *)src_pixels; > > > > + *out_pixel = argb_u16_from_RGB565(px); > > + out_pixel += 1; > > + src_pixels += step; > > } > > } > > > > @@ -343,25 +399,25 @@ void vkms_writeback_row(struct vkms_writeback_job *wb, > > } > > > > /** > > - * Retrieve the correct read_pixel function for a specific format. > > + * Retrieve the correct read_line function for a specific format. > > * If the format is not supported by VKMS a warn is emitted and a dummy > > "always read black" > > * function is returned. > > * > > * @format: DRM_FORMAT_* value for which to obtain a conversion function > > (see [drm_fourcc.h]) > > */ > > -pixel_read_t get_pixel_read_function(u32 format) > > +pixel_read_line_t get_pixel_read_line_function(u32 format) > > { > > switch (format) { > > case DRM_FORMAT_ARGB: > > - return _to_argb_u16; > > + return _read_line; > > case DRM_FORMAT_XRGB: > > - return _to_argb_u16; > > + return _read_line; > > case DRM_FORMAT_ARGB16161616: > > - return _to_argb_u16; > > + return _read_line; > > case DRM_FORMAT_XRGB16161616: > > - return _to_argb_u16; > > + return _read_line; > > case DRM_FORMAT_RGB565: > > - return _to_argb_u16; > > + return _read_line; > > default: > > /* > > * This is a bug in vkms_plane_atomic_check. All the supported > > diff --git a/drivers/gpu/drm/vkms/vkms_formats.h > > b/drivers/gpu/drm/vkms/vkms_formats.h > > index 3ecea4563254..8d2bef95ff79 100644 > > --- a/drivers/gpu/drm/vkms/vkms_formats.h > > +++ b/drivers/gpu/drm/vkms/vkms_formats.h > > @@ -5,7 +5,7 @@ > > > > #include "vkms_drv.h" > > > > -pixel_read_t get_pixel_read_function(u32 format); > > +pixel_read_line_t get_pixel_read_line_function(u32 format); > > > > pixel_write_t get_pixel_write_function(u32 format); > > > > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c > > b/drivers/gpu/drm/vkms/vkms_plane.c > > index 10e9b23dab28..8875bed76410 100644 > > --- a/drivers/gpu/drm/vkms/vkms_plane.c > > +++ b/drivers/gpu/drm/vkms/vkms_plane.c > > @@ -112,7 +112,6 @@ static void vkms_plane_atomic_update(struct drm_plane > > *plane, > > frame_info = vkms_plane_state->frame_info; > > memcpy(_info->src, _state->src, sizeof(struct drm_rect)); > > memcpy(_info->dst, _state->dst, sizeof(struct drm_rect)); > > - memcpy(_info->rotated, _state->dst, sizeof(struct drm_rect)); > > frame_info->fb = fb; > > memcpy(_info->map, _plane_state->data, > > sizeof(frame_info->map)); > > drm_framebuffer_get(frame_info->fb); > > @@ -122,10 +121,8 @@ static void vkms_plane_atomic_update(struct drm_plane > > *plane, > > > > DRM_MODE_REFLECT_X | > > > > DRM_MODE_REFLECT_Y); > > > > - drm_rect_rotate(_info->rotated, > > drm_rect_width(_info->rotated), > > - drm_rect_height(_info->rotated), > > frame_info->rotation); > > > > - vkms_plane_state->pixel_read = get_pixel_read_function(fmt); > > + vkms_plane_state->pixel_read_line = get_pixel_read_line_function(fmt); > > } > > > > static int vkms_plane_atomic_check(struct drm_plane *plane, > > > > This is looking good enough that I can give an Thanks for all your feedback ! > Acked-by: Pekka Paalanen As I changed the code, I will not keep it in the commit. Thanks, Louis Chauvet > Thanks, > pq -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v5 03/16] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 10:32, Maíra Canal a écrit : > On 3/13/24 14:44, Louis Chauvet wrote: > > Add some documentation on pixel conversion functions. > > Update of outdated comments for pixel_write functions. > > > > Signed-off-by: Louis Chauvet > > --- > > dr

Re: [PATCH v5 05/16] drm/vkms: Add dummy pixel_read/pixel_write callbacks to avoid NULL pointers

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 10:59, Maíra Canal a écrit : > On 3/13/24 14:44, Louis Chauvet wrote: > > Introduce two callbacks which does nothing. They are used in replacement > > of NULL and it avoid kernel OOPS if this NULL is called. > > > > If those callback are used, it mea

Re: [PATCH v5 09/16] drm/vkms: Introduce pixel_read_direction enum

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 15:11, Pekka Paalanen a écrit : > On Wed, 13 Mar 2024 18:45:03 +0100 > Louis Chauvet wrote: > > > The pixel_read_direction enum is useful to describe the reading direction > > in a plane. It avoids using the rotation property of DRM, which not > > prac

Re: [PATCH v5 08/16] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

2024-03-26 Thread Louis Chauvet
Le 25/03/24 - 14:41, Pekka Paalanen a écrit : > On Wed, 13 Mar 2024 18:45:02 +0100 > Louis Chauvet wrote: > > > The pre_mul_alpha_blend is dedicated to blending, so to avoid mixing > > different concepts (coordinate calculation and color management), extract > > the x_

  1   2   >