Add documentation around vkms_output and its initialization.
Signed-off-by: Louis Chauvet
---
This series does not introduce functionnal changes, only some
documentation and renaming to clarify the code.
---
Changes in v2:
- Dropped already applied patches
- Dropped useless patch as its content
Le 15/08/24 - 11:07, Maíra Canal a écrit :
> On 8/14/24 05:46, Louis Chauvet wrote:
> > The meaning of index was not clear. Replace them with crtc_index to
> > clearly indicate its usage.
> >
> > Signed-off-by: Louis Chauvet
>
> IMHO no need for this patch, es
o use drm and device managed helpers.
> >
> > Signed-off-by: Louis Chauvet
>
> I think that this patch is doing different things that we could split in
> simpler
> diffs.
>
> Moving the code from vkms_output.c to vkms_drv.c be its own patch.
I agree, but for the v2
gt; is not an issue yet, but in order to support multiple devices easily,
> > convert this code to use drm and device managed helpers.
> >
> > Signed-off-by: Louis Chauvet
>
> Reviewed-by: José Expósito
Thanks! I will test my v2 and send it tomorrow!
> >
elpers.
> >
> > Signed-off-by: Louis Chauvet
>
> Reviewed-by: José Expósito
Thanks!
> > ---
> > drivers/gpu/drm/vkms/vkms_drv.h| 1 -
> > drivers/gpu/drm/vkms/vkms_output.c | 21 +
> > 2 files changed, 9 insertions(+),
r the
vkms_output/vkms_crtc structure. when one of those series is merged, I
will rebase the other.
[1]:
https://lore.kernel.org/all/20240826-google-clarifications-v2-1-2574655b0...@bootlin.com/
Signed-off-by: Louis Chauvet
---
Changes in v2:
- Applied comments from José
- Extract the rename vkms_o
The current VKMS driver uses non-managed function to create connectors. It
is not an issue yet, but in order to support multiple devices easily,
convert this code to use drm and device managed helpers.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_drv.h| 1 -
drivers/gpu/drm
To avoid confusion in macro, rename to_vkms_crtc_state to a more explicit
name drm_crtc_state_to_vkms_crtc_state
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_crtc.c | 6 +++---
drivers/gpu/drm/vkms/vkms_drv.c | 2 +-
drivers/gpu/drm/vkms/vkms_drv.h | 2 +-
3 files changed, 5
The current vkms_output structure only contains crtc-related members. In
preparation of the migration to drmm for crtc and to avoid confusion,
rename this structure and all its usage to vkms_crtc.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_composer.c | 30
CRTC initialization call drm_mode_crtc_set_gamma_size without the proper
checks, introduce this check.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_crtc.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm
The current VKMS driver uses non-managed function to create encoders. It
is not an issue yet, but in order to support multiple devices easily,
convert this code to use drm and device managed helpers.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_drv.h| 1 -
drivers/gpu/drm
The current VKMS driver uses non-managed function to create CRTCs. It
is not an issue yet, but in order to support multiple devices easily,
convert this code to use drm and device managed helpers.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_crtc.c | 40
Le 27/08/24 - 15:15, Maxime Ripard a écrit :
> Hi,
>
> On Tue, Aug 27, 2024 at 11:57:36AM GMT, Louis Chauvet wrote:
> > The current VKMS driver uses non-managed function to create connectors. It
> > is not an issue yet, but in order to support multiple devices easily,
> &g
Le 27/08/24 - 16:39, Maxime Ripard a écrit :
> On Tue, Aug 27, 2024 at 03:24:10PM GMT, Louis Chauvet wrote:
> > Le 27/08/24 - 15:15, Maxime Ripard a écrit :
> > > Hi,
> > >
> > > On Tue, Aug 27, 2024 at 11:57:36AM GMT, Louis Chauvet wrote:
> > > > T
Le 27/08/24 - 16:33, Maxime Ripard a écrit :
> Hi,
>
> On Wed, Aug 14, 2024 at 04:36:33PM GMT, Louis Chauvet wrote:
> > Currently drm_writeback_connector are created by
> > drm_writeback_connector_init or drm_writeback_connector_init_with_encoder.
> > Both of the funct
r identity, and sRGB, and replace
> them with fixed-point math instead.
Hi!
I reviewed your VKMS patches and added a few comments in your series. This
series looks very good.
Thanks for this work,
Louis Chauvet
> There are plenty of things that I would like to see, but they could
>
u16 a, u16 b, s64 t)
>
> s64 delta = drm_fixp_mul(b_fp - a_fp, t);
>
> - return drm_fixp2int(a_fp + delta);
> + return drm_fixp2int_round(a_fp + delta);
> }
>
> static s64 get_lut_index(const struct vkms_color_lut *lut, u16 channel_value)
> --
> 2.46.0
>
Reviewed-by: Louis Chauvet
Le 19/08/24 - 16:56, Harry Wentland a écrit :
> Certain operations require us to preserve values below 0.0 and
> above 1.0 (0x0 and 0x respectively in 16 bpc unorm). One
> such operation is a BT709 encoding operation followed by its
> decoding operation, or the reverse.
>
> We'll use s32 value
a_blend(plane[i]->frame_info, stage_buffer,
> output_buffer);
> }
[...]
> diff --git a/drivers/gpu/drm/vkms/vkms_luts.c
> b/drivers/gpu/drm/vkms/vkms_luts.c
> new file mode 100644
> index ..6553d6d442b4
> --- /dev/null
> +++ b/drivers/gpu/drm/vkms/vkms_luts.c
> @@ -0,0 +1,802 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +
> +#include
> +
> +#include "vkms_drv.h"
> +#include "vkms_luts.h"
> +
> +static struct drm_color_lut linear_array[LUT_SIZE] = {
> + { 0x0, 0x0, 0x0, 0 },
> + { 0x101, 0x101, 0x101, 0 },
> + { 0x202, 0x202, 0x202, 0 },
> + { 0x303, 0x303, 0x303, 0 },
> + { 0x404, 0x404, 0x404, 0 },
For this LUT and the other, can you add a comment to explain how the
values were generated/found?
[...]
Thanks,
Louis Chauvet
Le 19/08/24 - 16:57, Harry Wentland a écrit :
> Not all HW will be able to do bypass on all color
> operations. Introduce an 'allow_bypass' boolean for
> all colorop init functions and only create the BYPASS
> property when it's true.
You did not change the documentation of struct drm_colorop_stat
Le 19/08/24 - 16:56, Harry Wentland a écrit :
> We add two 3x4 matrices into the VKMS color pipeline. The reason
> we're adding matrices is so that we can test that application
> of a matrix and its inverse yields an output equal to the input
> image.
>
> One complication with the matrix implement
drm_colorop_state *state;
> +
> + /* colorop properties */
Maybe the same kind of comment here?
> + /** @properties: property tracking for this colorop */
> + struct drm_object_properties properties;
> +
> +};
> +
[...]
Louis Chauvet
Le 19/08/24 - 16:56, Harry Wentland a écrit :
[...]
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c
> b/drivers/gpu/drm/vkms/vkms_composer.c
> index 3d6785d081f2..3ecda70c2b55 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -435,3 +435,7
Le 28/08/24 - 11:35, Jani Nikula a écrit :
> On Tue, 27 Aug 2024, Louis Chauvet wrote:
> > Le 27/08/24 - 16:33, Maxime Ripard a écrit :
> >> Hi,
> >>
> >> On Wed, Aug 14, 2024 at 04:36:33PM GMT, Louis Chauvet wrote:
> >> >
Le 19/08/24 - 17:07, José Expósito a écrit :
> Hi Louis,
>
> Thanks for this patch, adding some minor review comments:
>
> > Add documentation around vkms_output and its initialization.
> >
> > Signed-off-by: Louis Chauvet
> > ---
> >
Le 27/08/24 - 19:49, José Expósito a écrit :
> Hi Louis,
>
> > Add documentation around vkms_output and its initialization.
> >
> > Signed-off-by: Louis Chauvet
> > ---
> > This series does not introduce functionnal changes, only some
> > docu
Add documentation around vkms_output and its initialization.
Add some documentation on pixel conversion functions.
Update of outdated comments for pixel_write functions.
Signed-off-by: Louis Chauvet
---
This series does not introduce functionnal changes, only some
documentation and renaming to
; Add some documentation on pixel conversion functions.
> > Update of outdated comments for pixel_write functions.
> >
> > Signed-off-by: Louis Chauvet
>
> With the suggested changes, feel free to add:
> Reviewed-by: José Expósito
Thanks, the v4 is in your inbox!
&g
Add documentation around vkms_output and its initialization.
Add some documentation on pixel conversion functions.
Update of outdated comments for pixel_write functions.
Reviewed-by: José Expósito
Signed-off-by: Louis Chauvet
---
This series does not introduce functionnal changes, only some
CRTC initialization call drm_mode_crtc_set_gamma_size without the proper
checks, introduce this check to avoid issues.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_crtc.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b
turns BIT(0), and the VKMS CRTC
always have this id.
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_drv.c| 2 +-
drivers/gpu/drm/vkms/vkms_drv.h| 4 ++--
drivers/gpu/drm/vkms/vkms_output.c | 42 +-
drivers/gpu/drm/vkms/vkms_plane.c
ensure that the writeback connector is
properly cleaned.
This patch introduce drmm_writeback_connector_init, an helper to initialize
a writeback connector using drm managed helpers. This function allows the
caller to use its own encoder.
Signed-off-by: Louis Chauvet
---
Hi Maxime, Jani,
I tried
n works for 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
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
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 Pekk
of 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
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.
>
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
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
-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
eremie.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, it was maybe a
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
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
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
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
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
- updat
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
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
`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
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
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
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
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
, 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
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
> > - Imp
Le 25/03/24 - 10:20, Maíra Canal a écrit :
> On 3/13/24 14:44, Louis Chauvet wrote:
> > From: Arthur Grillo
> >
> > Remove intermidiary variables and access the variables directly from
> > drm_frame. These changes should be noop.
> >
> > Signed-off-by:
Le 25/03/24 - 10:56, Maíra Canal a écrit :
> On 3/13/24 14:44, 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 typedefs will help ensuring consis
Le 25/03/24 - 11:15, Maíra Canal a écrit :
> On 3/13/24 14:45, 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 patch is focused on re
Le 25/03/24 - 14:05, Pekka Paalanen a écrit :
> On Wed, 13 Mar 2024 18:44:59 +0100
> 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
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_
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
> > practic
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
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
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 &ARGB_to_argb_u16;
> > + return &ARGB_read_line;
> > case DRM_FORMAT_XRGB:
> > - return &XRGB_to_argb_u16;
> > + return &XRGB_read_line;
> > case DRM_FORMAT_ARGB16161616:
> > - return &ARGB16161616_to_argb_u16;
> > + return &ARGB16161616_read_line;
> > case DRM_FORMAT_XRGB16161616:
> > - return &XRGB16161616_to_argb_u16;
> > + return &XRGB16161616_read_line;
> > case DRM_FORMAT_RGB565:
> > - return &RGB565_to_argb_u16;
> > + return &RGB565_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(&frame_info->src, &new_state->src, sizeof(struct drm_rect));
> > memcpy(&frame_info->dst, &new_state->dst, sizeof(struct drm_rect));
> > - memcpy(&frame_info->rotated, &new_state->dst, sizeof(struct drm_rect));
> > frame_info->fb = fb;
> > memcpy(&frame_info->map, &shadow_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(&frame_info->rotated,
> > drm_rect_width(&frame_info->rotated),
> > - drm_rect_height(&frame_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
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 with
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.
> >
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
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
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
lore.kernel.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 -
Le 13/07/24 - 11:38, Maíra Canal a écrit :
> On 5/16/24 10:04, 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 typedefs will help ensuring consis
Le 13/07/24 - 11:35, Maíra Canal a écrit :
> On 5/16/24 10:04, Louis Chauvet wrote:
> > Add some documentation on pixel conversion functions.
> > Update of outdated comments for pixel_write functions.
> >
> > Signed-off-by: Louis Chauvet
> > Acked-by: Pekka Pa
-188,9 +188,9 @@ static void argb_u16_to_ARGB16161616(u8 *dst_pixels,
> struct pixel_argb_u16 *in_p
>
> static void argb_u16_to_XRGB16161616(u8 *dst_pixels, struct pixel_argb_u16
> *in_pixel)
> {
> - u16 *pixels = (u16 *)dst_pixels;
> + __le16 *pixels = (__force __le16
el.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 (I
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
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
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
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
-by: Pekka Paalanen
Signed-off-by: Louis Chauvet
---
drivers/gpu/drm/vkms/vkms_formats.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_formats.c
b/drivers/gpu/drm/vkms/vkms_formats.c
index 5ebc691656bc..ecbe79f8dfdc 100644
--- a/drivers
`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
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 | 20
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
, 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
/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
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
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
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-by
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
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
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
-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
el.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 (I
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
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
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
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
`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
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 | 20
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
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
1 - 100 of 347 matches
Mail list logo