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

Louis Chauvet louis.chauvet at bootlin.com
Mon May 13 06:31:15 UTC 2024


Le 22/04/24 - 13:33, Pekka Paalanen a écrit :
> On Tue, 09 Apr 2024 15:25:21 +0200
> Louis Chauvet <louis.chauvet at bootlin.com> wrote:
> 
> > Add some documentation on pixel conversion functions.
> > Update of outdated comments for pixel_write functions.
> > 
> > Signed-off-by: Louis Chauvet <louis.chauvet at bootlin.com>
> > ---
> >  drivers/gpu/drm/vkms/vkms_composer.c |  7 ++++
> >  drivers/gpu/drm/vkms/vkms_drv.h      | 15 ++++++++-
> >  drivers/gpu/drm/vkms/vkms_formats.c  | 62 ++++++++++++++++++++++++++++++------
> >  3 files changed, 74 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> > index c6d9b4a65809..da0651a94c9b 100644
> > --- a/drivers/gpu/drm/vkms/vkms_composer.c
> > +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> > @@ -189,6 +189,13 @@ static void blend(struct vkms_writeback_job *wb,
> >  
> >  	size_t crtc_y_limit = crtc_state->base.crtc->mode.vdisplay;
> >  
> > +	/*
> > +	 * The planes are composed line-by-line to avoid heavy memory usage. It is a necessary
> > +	 * complexity to avoid poor blending performance.
> > +	 *
> > +	 * The function vkms_compose_row is used to read a line, pixel-by-pixel, into the staging
> > +	 * buffer.
> > +	 */
> >  	for (size_t y = 0; y < crtc_y_limit; y++) {
> >  		fill_background(&background_color, output_buffer);
> >  
> > diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
> > index b4b357447292..a86cb537d6aa 100644
> > --- a/drivers/gpu/drm/vkms/vkms_drv.h
> > +++ b/drivers/gpu/drm/vkms/vkms_drv.h
> > @@ -25,6 +25,17 @@
> >  
> >  #define VKMS_LUT_SIZE 256
> >  
> > +/**
> > + * struct vkms_frame_info - structure to store the state of a frame
> > + *
> > + * @fb: backing drm framebuffer
> > + * @src: source rectangle of this frame in the source framebuffer
> > + * @dst: destination rectangle in the crtc buffer
> 
> Are both src and dst using whole pixel units, or is src using 1/65536th
> pixel units?

dst is in whole pixels, src in 1/65536 yes, I will clarify.
 
> Asking because UAPI has src rect in 16.16 fixed-point, IIRC.
> 
> With that clarified:
> 
> Acked-by: Pekka Paalanen <pekka.paalanen at collabora.com>

[...]


-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the dri-devel mailing list