Re: [PATCH 2/2] drm/vkms: Use a simpler composition function

2024-02-07 Thread Louis Chauvet
e to read (so the caller need to compute the correct offset) - x_start/x_stop are the start and stop column, but they may be not ordered properly (i.e DRM_REFLECT_X will make x_start greater than x_stop) - src/dst are source and destination buffers This way: - It's simple to read for the general case (usage of drm_rect_* instead of manually rewriting the logic) - Each pixel format can be quickly implemented with "pixel-by-pixel" methods - The performances should be good if no rotation is implied for some formats I also created some helpers for conversions between formats to avoid code duplication between pixel and line algorithms (and also between argb and xrgb variants). The only flaw with this, is that most of the read_line functions will look like: void read_line(...) { int increment = x_start < x_stop ? 1: -1; while(x_start != x_stop) { out += 1; [...] /* color conversion */ x_start += increment; } } But as Pekka explained, it's probably the most efficient way to do it. Is there a way to save the output of vkms to a folder (something like "one image per frame")? It's a bit complex to debug graphics without seeing them. I have something which (I think) should work, but some tests are failing and I don't find why in my code (I don't find the reason why the they are failing and the hexdump I added to debug seems normal). I think my issue is a simple mistake in the "translation managment" or maybe just a wrong offset, but I don't see my error in the code. I think a quick look on the final image would help me a lot. [...] Have a nice day, Louis Chauvet -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH 2/2] drm/vkms: Use a simpler composition function

2024-02-07 Thread Louis Chauvet
t > > will be ready for revision. > > Awesome, thank you very much for doing that! > pq I also think it's a good benchmarks for classic configurations. The odd size is a very nice idea to verify the corner cases of line-by-line algorithms. When this is ready, please share the test, so I can check if my patch is as performant as before. Thank you for this work. Have a nice day, Louis Chauvet -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 4/7] drm/vkms: Add chroma subsampling

2024-02-01 Thread Louis Chauvet
es. In the series [1] I proposed to change the pattern to detect this kind of issue. [...] [1]: https://lore.kernel.org/dri-devel/20240201-yuv-v1-0-3ca376f27...@bootlin.com/T/#t -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 7/7] drm/vkms: Create KUnit tests for YUV conversions

2024-02-01 Thread Louis Chauvet
{ > + {"white", {0xeb, 0x80, 0x80}, {0x, 0x, 0x, > 0x}}, > + {"gray", {0x7e, 0x80, 0x80}, {0x, 0x8000, 0x8000, > 0x8000}}, > + {"black", {0x10, 0x80, 0x80}, {0x, 0x, 0x, > 0x}}, > + {"red", {0x4a, 0x61, 0xf0}, {0x, 0x, 0x, > 0x}}, > + {"green", {0xa4, 0x2f, 0x19}, {0x, 0x, 0x, > 0x}}, > + {"blue", {0x1d, 0xf0, 0x77}, {0x, 0x, 0x, > 0x}}, > + }, > + }, > +}; [...] -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 6/7] drm/vkms: Drop YUV formats TODO

2024-02-01 Thread Louis Chauvet
he legacy >cursor api). > > -- > 2.43.0 > (Sorry Arthur for the double mail, I miss the reply-all in the previous mail) Reviewed-by: Louis Chauvet

[PATCH 2/2] drm/vkms: Use a simpler composition function

2024-02-01 Thread Louis Chauvet
@multiplane-rotation-cropping-* - See [1] [1]: https://lore.kernel.org/igt-dev/20240201-kms_tests-v1-0-bc34c5d28...@bootlin.com/T/#t Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 97 +- drivers/gpu/drm/vkms/vkms_drv.h | 21 ++- drivers/gpu/drm/vkms

[PATCH 0/2] Better support for complex pixel formats

2024-02-01 Thread Louis Chauvet
e in different places and instead of copy/pasting rotation formula I used drm_rect_* helpers. [1]: https://lore.kernel.org/dri-devel/20240110-vkms-yuv-v2-0-952fcaa5a...@riseup.net/ [2]: https://lore.kernel.org/igt-dev/20240201-kms_tests-v1-0-bc34c5d28...@bootlin.com/T/#t Signed-off-by: Louis Chau

[PATCH 1/2] drm/vkms: Create a type to check a function pointer validity

2024-02-01 Thread Louis Chauvet
Add the pixel_read_t type to check function prototype in structures and functions. It avoids casting to (void *) and at the same occasion allows the compiler to check the type properly. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 17 +++-- drivers/gpu/drm

Re: [PATCH v2 5/7] drm/vkms: Add YUV support

2024-02-01 Thread Louis Chauvet
get_pixel_conversion_function(u32 format); > > void *get_pixel_write_function(u32 format); > > +struct pixel_yuv_u8 { > + u8 y, u, v; > +}; > + > #endif /* _VKMS_FORMATS_H_ */ > diff --git a/drivers/gpu/drm/vkms/vkms_plane.c > b/drivers/gpu/drm/vkms/vkms_plane.c > index e87c80575b7d..932736fc3ee9 100644 > --- a/drivers/gpu/drm/vkms/vkms_plane.c > +++ b/drivers/gpu/drm/vkms/vkms_plane.c > @@ -17,7 +17,19 @@ static const u32 vkms_formats[] = { > DRM_FORMAT_XRGB, > DRM_FORMAT_XRGB16161616, > DRM_FORMAT_ARGB16161616, > - DRM_FORMAT_RGB565 > + DRM_FORMAT_RGB565, > + DRM_FORMAT_NV12, > + DRM_FORMAT_NV16, > + DRM_FORMAT_NV24, > + DRM_FORMAT_NV21, > + DRM_FORMAT_NV61, > + DRM_FORMAT_NV42, > + DRM_FORMAT_YUV420, > + DRM_FORMAT_YUV422, > + DRM_FORMAT_YUV444, > + DRM_FORMAT_YVU420, > + DRM_FORMAT_YVU422, > + DRM_FORMAT_YVU444 > }; > > static struct drm_plane_state * > > -- > 2.43.0 > Reviewed-by: Louis Chauvet

Re: [PATCH v2 3/7] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-01 Thread Louis Chauvet
E_ROTATE_MASK | > DRM_MODE_REFLECT_MASK); > > + drm_plane_create_color_properties(>base, > + BIT(DRM_COLOR_YCBCR_BT601) | > + BIT(DRM_COLOR_YCBCR_BT709) | > + BIT(DRM_COLOR_YCBCR_BT2020), > + BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | > + BIT(DRM_COLOR_YCBCR_FULL_RANGE), > + DRM_COLOR_YCBCR_BT601, > + DRM_COLOR_YCBCR_FULL_RANGE); > + > return plane; > } > > -- > 2.43.0 > Reviewed-by: Louis Chauvet

Re: [PATCH v2 2/7] drm/vkms: Add support for multy-planar framebuffers

2024-02-01 Thread Louis Chauvet
. In the future, if performance is actally critical, the whole composition loop will have to be specialized for each pixel formats: some can be treated line by line (as it's done today), but with blocks or packed pixels it's more complex. > + for (size_t i = 0; i < frame_format->num_planes; i++) > + src_pixels[i] += frame_format->cpp[i]; This is likely working with format with block_w != 1, see explanation above. [...] [1]: https://lore.kernel.org/dri-devel/20240201-yuv-v1-0-3ca376f27...@bootlin.com/T/#t -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 1/7] drm/vkms: Use drm_frame directly

2024-02-01 Thread Louis Chauvet
pu/drm/vkms/vkms_writeback.c > +++ b/drivers/gpu/drm/vkms/vkms_writeback.c > @@ -149,11 +149,6 @@ static void vkms_wb_atomic_commit(struct drm_connector > *conn, > crtc_state->active_writeback = active_wb; > crtc_state->wb_pending = true; > spin_unlock_irq(>composer_lock); > - > - wb_frame_info->offset = fb->offsets[0]; > - wb_frame_info->pitch = fb->pitches[0]; > - wb_frame_info->cpp = fb->format->cpp[0]; > - > drm_writeback_queue_job(wb_conn, connector_state); > active_wb->pixel_write = get_pixel_write_function(wb_format); > drm_rect_init(_frame_info->src, 0, 0, crtc_width, crtc_height); > > -- > 2.43.0 > Reviewed-by: Louis Chauvet

Re: [PATCH 0/2] Better support for complex pixel formats

2024-02-02 Thread Louis Chauvet
the whole YUV [1] series or should I extract and make my two patches independent? [1]: https://lore.kernel.org/dri-devel/20240110-vkms-yuv-v2-0-952fcaa5a...@riseup.net/ Best regards, Louis Chauvet > On 2/1/24 14:31, Louis Chauvet wrote: > > This patchset aims to solve issues I f

[PATCH v2 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-23 Thread Louis Chauvet
From: Arthur Grillo Create range and encoding properties. This should be noop, as none of the conversion functions need those properties. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 9

[PATCH v2 9/9] drm/vkms: Create KUnit tests for YUV conversions

2024-02-23 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. Signed-off-by: Arthur Grillo [Louis Chauvet: fix minor formating issues (whitespace, double line)] Signed-off-by: Louis Chauvet --- drivers

[PATCH v3 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-26 Thread Louis Chauvet
ixel conversion functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 219 +++--- drivers/gpu/drm/vkms/vkms_drv.h | 24 +++- drivers/gpu/drm/vkms/v

[PATCH v3 2/9] drm/vkms: Use drm_frame directly

2024-02-26 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 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 12

[PATCH v3 6/9] drm/vkms: Add YUV support

2024-02-26 Thread Louis Chauvet
^8. This is done to avoid the use of fixed point operations. Signed-off-by: Arthur Grillo [Louis Chauvet: Adapted Arthur's work and implemented the read_line_t callbacks for yuv formats] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm/vkms

[PATCH v3 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-26 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 | 4 +++ drivers/gpu/drm/vkms/vkms_drv.h | 13 drivers/gpu/drm/vkms/vkms_formats.c | 58

[PATCH v3 8/9] drm/vkms: Drop YUV formats TODO

2024-02-26 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 v3 9/9] drm/vkms: Create KUnit tests for YUV conversions

2024-02-26 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. Signed-off-by: Arthur Grillo [Louis Chauvet: fix minor formating issues (whitespace, double line)] Signed-off-by: Louis Chauvet --- drivers

[PATCH v3 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-02-26 Thread Louis Chauvet
to avoid using a nullptr as a function. Document for those typedefs. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 23 +-- drivers/gpu/drm/vkms/vkms_formats.c | 8 drivers/gpu/drm/vkms/vkms_formats.h | 4 ++-- drivers/gpu/drm/vkms

[PATCH v3 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-26 Thread Louis Chauvet
From: Arthur Grillo Create range and encoding properties. This should be noop, as none of the conversion functions need those properties. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 9

[PATCH v3 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-02-26 Thread Louis Chauvet
etazz...@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, it was maybe already the case): - kms_cursor_legacy@flip-vs-cursor-atomic - kms_

[PATCH v3 1/9] drm/vkms: Code formatting

2024-02-26 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. 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 | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c| 9

Re: [PATCH v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-27 Thread Louis Chauvet
upported pixel formats. The caller > > must ensure that the > > + * pointer is valid before using it in a vkms_writeback_job. > > + * > > + * @format: 4cc of the format > > This too. Ack, I will use the same as above > > + */ > > void *get_pixel_write_function(u32 format) > > { > > switch (format) { > > > > I couldn't check if the docs are correct since the patch context is not > wide enough, but they all sound plausible to me. I checked again, I don't see other errors than your first comment. > > Thanks, > pq Kind regards, Louis Chauvet -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v3 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-27 Thread Louis Chauvet
Le 26/02/24 - 10:07, Arthur Grillo a écrit : > > > On 26/02/24 05:46, Louis Chauvet wrote: > > Add some documentation on pixel conversion functions. > > Update of outdated comments for pixel_write functions. > > > > Signed-off-by: Louis Chauvet > > --- &g

Re: [PATCH] drm/vkms: Add information on how to benchmark

2024-02-27 Thread Louis Chauvet
unning multiple cases. And reviewers do not need to ask to re-run with > the correct options. > > I suppose rotations might get added, too. > > Or maybe you'd provide a script that covers all the standard > performance test cases? I agree with Pekka, it would be nice to have

Re: [PATCH v2 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-02-27 Thread Louis Chauvet
Le 26/02/24 - 13:36, Pekka Paalanen a écrit : > On Fri, 23 Feb 2024 12:37:24 +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 v3 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-02-27 Thread Louis Chauvet
RM_WARN("Pixel format is not supported by VKMS planes. State > > is inchanged\n"); > > s/inchanged/unchanged/ Thanks for this correction. See my answer to [1], I changed the message a bit. [1]: https://lore.kernel.org/dri-devel/20240226133646.174d3fb2.pekka.paala.

Re: [PATCH v3 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-27 Thread Louis Chauvet
Le 26/02/24 - 11:14, Arthur Grillo a écrit : > > > On 26/02/24 05:46, Louis Chauvet wrote: > > Re-introduce a line-by-line composition algorithm for each pixel format. > > This allows more performance by not requiring an indirection per pixel > > read. This patc

Re: [PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-27 Thread Louis Chauvet
; > - * They are used in the `vkms_compose_row` function to handle multiple > > formats. > > + * They are used in the `read_line`s functions to avoid duplicate work for > > some pixel formats. > > */ > > > > -static void ARGB_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 > > *out_pixel) > > +static void ARGB_to_argb_u16(struct pixel_argb_u16 *out_pixel, int a, > > int r, int g, int b) > > The function name ARGB_to_argb_u16() is confusing. It's not taking > in ARGB pixels but separate a,r,g,b ints. The only assumption it > needs from the pixel format is the part. I don't realy know how to name it. What I like with ARGB is that it's clear that the values are 8 bits and in argb format. Do you think that `argb_u8_to_argb_u16`, with a new structure pixel_argb_u8 will be better? (like PATCH 6/9 with pixel_yuv_u8). If so, I will introduce the argb_u8 structure in an other commit. [...] > > + * The following functions are read_line function for each pixel format > > supported by VKMS. > > * > > - * This function composes a single row of a plane. It gets the source > > pixels > > - * through the y coordinate (see get_packed_src_addr()) and goes linearly > > - * through the source pixel, reading the pixels and converting it to > > - * ARGB16161616 (see the pixel_read() callback). For rotate-90 and > > rotate-270, > > - * the source pixels are not traversed linearly. The source pixels are > > queried > > - * on each iteration in order to traverse the pixels vertically. > > + * They read a line starting at the point @x_start,@y_start following the > > @direction. The result > > + * is stored in @out_pixel and in the format ARGB16161616. > > + * > > + * Those function are very similar, but it is required for performance > > reason. In the past, some > > + * experiment were done, and with a generic loop the performance are very > > reduced [1]. > > + * > > + * [1]: > > https://lore.kernel.org/dri-devel/d258c8dc-78e9-4509-9037-a98f7f33b...@riseup.net/ > > */ > > -void vkms_compose_row(struct line_buffer *stage_buffer, struct > > vkms_plane_state *plane, int y) > > + > > +static void ARGB_read_line(struct vkms_frame_info *frame_info, int > > x_start, int y_start, > > + enum pixel_read_direction direction, int count, > > + struct pixel_argb_u16 out_pixel[]) > > +{ > > + u8 *src_pixels = packed_pixels_addr(frame_info, x_start, y_start, 0); > > + > > + int step = get_step_1x1(frame_info->fb, direction, 0); > > + > > + while (count) { > > + u8 *px = (u8 *)src_pixels; > > + > > + ARGB_to_argb_u16(out_pixel, px[3], px[2], px[1], px[0]); > > + out_pixel += 1; > > + src_pixels += step; > > + count--; > > btw. you could eliminate decrementing 'count' if you computed end > address and used while (out_pixel < end). Yes, you are right, but after thinking about it, neither out_pixel < end and while (count) are conveying "this loop will copy `count` pixels. I think a for-loop here is more understandable. There is no ambiguity in the number of pixels written and less error-prone. I will replace while (count) by for(int i = 0; i < count; i++) Kind regards, Louis Chauvet [...] -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-02-27 Thread Louis Chauvet
(same as for PATCHv2 6/9, I took the patch from Arthur with no modifications) Le 26/02/24 - 14:23, Pekka Paalanen a écrit : > On Fri, 23 Feb 2024 12:37:27 +0100 > Louis Chauvet wrote: > > > From: Arthur Grillo > > > > Create range and encoding properties. T

Re: [PATCH v2 6/9] drm/vkms: Add YUV support

2024-02-27 Thread Louis Chauvet
Hi Pekka, For all the comment related to the conversion part, maybe Arthur have an opinion on it, I took his patch as a "black box" (I did not want to break (and debug) it). Le 26/02/24 - 14:19, Pekka Paalanen a écrit : > On Fri, 23 Feb 2024 12:37:26 +0100 > Louis Chauvet wr

Re: [PATCH v2 9/9] drm/vkms: Create KUnit tests for YUV conversions

2024-02-27 Thread Louis Chauvet
Le 26/02/24 - 13:39, Arthur Grillo a écrit : > > > On 23/02/24 08:37, 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 color

[PATCH v2 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-02-23 Thread Louis Chauvet
to avoid using a nullptr as a function. Document for those typedefs. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 23 +-- drivers/gpu/drm/vkms/vkms_formats.c | 8 drivers/gpu/drm/vkms/vkms_formats.h | 4 ++-- drivers/gpu/drm/vkms

[PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-02-23 Thread Louis Chauvet
functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 219 +++--- drivers/gpu/drm/vkms/vkms_drv.h | 25 +++- drivers/gpu/drm/vkms/v

[PATCH v2 8/9] drm/vkms: Drop YUV formats TODO

2024-02-23 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 v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-02-23 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 | 4 +++ drivers/gpu/drm/vkms/vkms_drv.h | 13 drivers/gpu/drm/vkms/vkms_formats.c | 58

[PATCH v2 6/9] drm/vkms: Add YUV support

2024-02-23 Thread Louis Chauvet
^8. This is done to avoid the use of fixed point operations. Signed-off-by: Arthur Grillo [Louis Chauvet: Adapted Arthur's work and implemented the read_line_t callbacks for yuv formats] Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- drivers/gpu/drm/vkms

[PATCH v2 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-02-23 Thread Louis Chauvet
n Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: arthurgri...@riseup.net To: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Cc: linux-ker...@vger.kernel.org Cc: jeremie.dautheri...@bootlin.com Cc: miquel.ray...@bootlin.com Cc: thomas.petazz...@bootlin.com Signed-off-by:

[PATCH v2 1/9] drm/vkms: Code formatting

2024-02-23 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. 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 | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c| 9

[PATCH v2 2/9] drm/vkms: Use drm_frame directly

2024-02-23 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 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 12

Re: [PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-03-04 Thread Louis Chauvet
Le 29/02/24 - 12:21, Pekka Paalanen a écrit : > On Tue, 27 Feb 2024 16:02:09 +0100 > Louis Chauvet wrote: > > > [...] > > > > > > -static void pre_mul_alpha_blend(struct vkms_frame_info *frame_info, > > > > -

Re: [PATCH v2 4/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-03-04 Thread Louis Chauvet
Le 29/02/24 - 11:07, Pekka Paalanen a écrit : > On Tue, 27 Feb 2024 16:02:13 +0100 > Louis Chauvet wrote: > > > Le 26/02/24 - 13:36, Pekka Paalanen a écrit : > > > On Fri, 23 Feb 2024 12:37:24 +0100 > > > Louis Chauvet wrote: > > > &g

Re: [PATCH v2 6/9] drm/vkms: Add YUV support

2024-03-04 Thread Louis Chauvet
Le 29/02/24 - 14:12, Pekka Paalanen a écrit : > On Wed, 28 Feb 2024 22:52:09 -0300 > Arthur Grillo wrote: > > > On 27/02/24 17:01, Arthur Grillo wrote: > > > > > > > > > On 27/02/24 12:02, Louis Chauvet wrote: > > >> Hi Pekka, > >

Re: [PATCH v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-03-04 Thread Louis Chauvet
Le 29/02/24 - 10:48, Pekka Paalanen a écrit : > On Tue, 27 Feb 2024 16:02:10 +0100 > Louis Chauvet wrote: > > > [...] > > > > > > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c > > > > b/drivers/gpu/drm/vkms/vkms_formats.c > > > > inde

[PATCH v4 14/14] drm/vkms: Create KUnit tests for YUV conversions

2024-03-04 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. Signed-off-by: Arthur Grillo [Louis Chauvet: fix minor formating issues (whitespace, double line), change expected alpha from 0x to 0x

[PATCH v4 11/14] drm/vkms: Add YUV support

2024-03-04 Thread Louis Chauvet
, 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 - remove struct pixel_yuv_u8 - update the commit message] Signed-off

[PATCH v4 10/14] drm/vkms: Re-introduce line-per-line composition algorithm

2024-03-04 Thread Louis Chauvet
ixel conversion functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 169 --- drivers/gpu/drm/vkms/vkms_drv.h | 27 +++-- drivers/gpu/drm/vkms/v

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

2024-03-04 Thread Louis Chauvet
devel@lists.freedesktop.org Cc: linux-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 t

[PATCH v4 01/14] drm/vkms: Code formatting

2024-03-04 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. 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 | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c| 8

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

2024-03-04 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 append. Document for those typedefs. Signed-off-by: Louis Chauvet --- drivers/gpu/drm

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

2024-03-04 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 | 13 drivers/gpu/drm/vkms/vkms_formats.c | 62

[PATCH v4 02/14] drm/vkms: Use drm_frame directly

2024-03-04 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 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 12

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

2024-03-04 Thread Louis Chauvet
As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 24 2 files changed, 14 insertions(+), 14

Re: [PATCH v2 7/9] drm/vkms: Add range and encoding properties to pixel_read function

2024-03-04 Thread Louis Chauvet
Le 29/02/24 - 14:24, Pekka Paalanen a écrit : > On Tue, 27 Feb 2024 16:02:10 +0100 > Louis Chauvet wrote: > > > (same as for PATCHv2 6/9, I took the patch from Arthur with no > > modifications) > > > > Le 26/02/24 - 14:23, Pekka Paalanen a écrit : > &g

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

2024-03-04 Thread Louis Chauvet
-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 42 +++-- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index 393c73caad72..29ca403827a6 100644 --- a/drivers

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

2024-03-04 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 | 59 + 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/vkms

[PATCH v4 08/14] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

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

[PATCH v4 09/14] drm/vkms: Introduce pixel_read_direction enum

2024-03-04 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 | 36 drivers/gpu/drm/vkms/vkms_drv.h | 11 +++ drivers/gpu/drm/vkms/vkms_formats.c

[PATCH v4 12/14] drm/vkms: Add range and encoding properties to the plane

2024-03-04 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 v4 13/14] drm/vkms: Drop YUV formats TODO

2024-03-04 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

Re: [PATCH v2 6/9] drm/vkms: Add YUV support

2024-03-04 Thread Louis Chauvet
everything on the line-by-line work. Kind regards, Louis Chauvet > Best Regards, > ~Arthur Grillo > > > > > Kind regards, > > Louis Chauvet > > > > [...] > > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 3/9] drm/vkms: write/update the documentation for pixel conversion and pixel write functions

2024-03-06 Thread Louis Chauvet
r non-1x1 blocks until you > have code handling at least one such format. > > All of the YUV formats that patch 6 adds support for use 1x1 blocks all > all their planes. Yes, none of the supported format have block_h != block_w != 1, so there is no need to drm_format_info_block*() helpers. I wrote the code for DRM_FORMAT_R*. They are packed, with block_w != 1. I will add this patch in the next revision. I also wrote the IGT test for DRM_FORMAT_R1 [1]. Everything will be in the v5 (I will send it when you have the time to review the v4). For information, I also have a series ready for adding more RGB variants (I introduced a macro to make it easier and avoid copy/pasting the same loop). I don't send them yet, because I realy want this series merged first. I also have the work for the writeback "line-by-line" algorithm ready (I just need to rebase it, but it will be fast). [1]: https://lore.kernel.org/igt-dev/20240306-b4-kms_tests-v1-0-8fe451efd...@bootlin.com Kind regards, Louis Chauvet [...] -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 5/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-03-06 Thread Louis Chauvet
Le 05/03/24 - 12:10, Pekka Paalanen a écrit : > On Mon, 4 Mar 2024 16:28:33 +0100 > Louis Chauvet wrote: > > > Le 29/02/24 - 12:21, Pekka Paalanen a écrit : > > > On Tue, 27 Feb 2024 16:02:09 +0100 > > > Louis Chauvet wrote: > > > > &g

Re: [PATCH v2 6/9] drm/vkms: Add YUV support

2024-03-06 Thread Louis Chauvet
Le 06/03/24 - 17:09, Arthur Grillo a écrit : > > > On 04/03/24 13:51, Arthur Grillo wrote: > > > > > > On 04/03/24 12:48, Louis Chauvet wrote: > [...] > >>> > >>>> Regarding the YUV part, I don't feel confortable adressing Pekka's

Re: [PATCH 4/7] drm/vkms: Fix compilation issues

2024-03-06 Thread Louis Chauvet
format we have to create a new structure". > + > struct line_buffer { > size_t n_pixels; > struct pixel_argb_u16 *pixels; > > -- > 2.43.0 > -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

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

2024-03-14 Thread Louis Chauvet
Le 13/03/24 - 12:20, Randy Dunlap a écrit : > Hi, > > On 3/13/24 10:45, Louis Chauvet wrote: > > From: Arthur Grillo > > > > > > > Signed-off-by: Arthur Grillo > > [Louis Chauvet: > > - Adapted Arthur's work > > - Implemen

[PATCH v5 13/16] drm/vkms: Drop YUV formats TODO

2024-03-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 v5 14/16] drm/vkms: Create KUnit tests for YUV conversions

2024-03-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. Signed-off-by: Arthur Grillo [Louis Chauvet: - fix minor formating

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

2024-03-13 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 v5 15/16] drm/vkms: Add how to run the Kunit tests

2024-03-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 v5 09/16] drm/vkms: Introduce pixel_read_direction enum

2024-03-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 | 36 drivers/gpu/drm/vkms/vkms_drv.h | 11 +++ drivers/gpu/drm/vkms/vkms_formats.c

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

2024-03-13 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 v5 11/16] drm/vkms: Add YUV support

2024-03-13 Thread Louis Chauvet
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 - remove struct pixel_yuv_u8 - update

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

2024-03-13 Thread Louis Chauvet
functionality") https://lore.kernel.org/all/20230418130525.128733-2-mca...@igalia.com/ [3]: Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 167 +++-- drivers/gpu/drm/vkms/vkms_drv.h | 27 ++-- drivers/gpu/drm/vkms/v

[PATCH v5 12/16] drm/vkms: Add range and encoding properties to the plane

2024-03-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] Signed-off-by: Louis Chauvet --- drivers

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

2024-03-13 Thread Louis Chauvet
-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 43 +++-- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c index 55a4365d21a4..b57d85b8b935 100644 --- a/drivers

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

2024-03-13 Thread Louis Chauvet
...@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, it was maybe already the case

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

2024-03-13 Thread Louis Chauvet
As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 24 2 files changed, 14 insertions(+), 14

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

2024-03-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 append. Document for those typedefs. Signed-off-by: Louis Chauvet --- drivers/gpu/drm

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

2024-03-13 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 | 13 drivers/gpu/drm/vkms/vkms_formats.c | 62

[PATCH v5 01/16] drm/vkms: Code formatting

2024-03-13 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. 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 | 3 +-- drivers/gpu/drm/vkms/vkms_plane.c| 8

[PATCH v5 02/16] drm/vkms: Use drm_frame directly

2024-03-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 Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 3 --- drivers/gpu/drm/vkms/vkms_formats.c | 12

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

2024-03-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 | 76 + 1 file changed, 52 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/vkms

Re: [PATCH 0/7] Additions to "Reimplement line-per-line pixel conversion for plane reading" series

2024-03-09 Thread Louis Chauvet
YUV part, it was easier for Arthur to send a "real" series over [1]. I've already merged everything, and it'll all be in v5 (probably Monday or Tuesday). Kind regards, Louis Chauvet > I don't see a reason to submit fixes to a series that it is still > on review. > > Best Regar

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: > > > > >

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: > > > > > >

[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

[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 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 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

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

[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 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 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 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 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

  1   2   >