mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: "Louis Chauvet" <louis.chauvet@bootlin.com>,
	"Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>,
	"Melissa Wen" <melissa.srw@gmail.com>,
	"Maíra Canal" <mairacanal@riseup.net>,
	"Haneen Mohammed" <hamohammed.sa@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Simona Vetter" <simona@ffwll.ch>,
	arthurgrillo@riseup.net, pekka.paalanen@haloniitty.fi,
	"Simona Vetter" <simona.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, thomas.petazzoni@bootlin.com,
	jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com,
	seanpaul@google.com, marcheu@google.com,
	nicolejadeyee@google.com,
	Pekka Paalanen <pekka.paalanen@collabora.com>
Subject: Re: [PATCH v11 06/15] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend
Date: Tue, 1 Oct 2024 20:54:41 -0700	[thread overview]
Message-ID: <30573f5a-d3dd-4aa4-ac5a-cf6df77b79dc@infradead.org> (raw)
In-Reply-To: <20240930-yuv-v11-6-4b1a26bcfc96@bootlin.com>

Hi--

On 9/30/24 8:31 AM, 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_limit and x_dst computation outside of this helper.
> It also increases the maintainability by grouping the computation related
> to coordinates in the same place: the loop in `blend`.
> 
> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
>  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 931e214b225c..4d220bbb023c 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -24,34 +24,30 @@ static u16 pre_mul_blend_channel(u16 src, u16 dst, u16 alpha)
>  
>  /**
>   * pre_mul_alpha_blend - alpha blending equation
> - * @frame_info: Source framebuffer's metadata
>   * @stage_buffer: The line with the pixels from src_plane
>   * @output_buffer: A line buffer that receives all the blends output
> + * @x_start: The start offset
> + * @pixel_count: The number of pixels to blend

so is this actually pixel count + 1; or

>   *
> - * Using the information from the `frame_info`, this blends only the
> - * necessary pixels from the `stage_buffer` to the `output_buffer`
> - * using premultiplied blend formula.
> + * The pixels 0..@pixel_count in stage_buffer are blended at @x_start..@x_start+@pixel_count in

should these ranges include a "- 1"?
Else please explain.

> + * output_buffer.


  reply	other threads:[~2024-10-02  3:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 15:31 [PATCH v11 00/15] drm/vkms: Reimplement line-per-line pixel conversion for plane reading Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 01/15] drm/vkms: Code formatting Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 02/15] drm/vkms: Use drm_frame directly Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 03/15] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions Louis Chauvet
2024-10-02  3:49   ` Randy Dunlap
2024-09-30 15:31 ` [PATCH v11 04/15] drm/vkms: Use const for input pointers in pixel_read an " Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 05/15] drm/vkms: Update pixels accessor to support packed and multi-plane formats Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 06/15] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend Louis Chauvet
2024-10-02  3:54   ` Randy Dunlap [this message]
2024-10-02  8:57     ` Louis Chauvet
2024-10-02 15:49       ` Randy Dunlap
2024-10-02 16:11         ` Louis Chauvet
2024-10-02 16:37           ` Randy Dunlap
2024-09-30 15:31 ` [PATCH v11 07/15] drm/vkms: Introduce pixel_read_direction enum Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 08/15] drm/vkms: Re-introduce line-per-line composition algorithm Louis Chauvet
2024-10-02  4:02   ` Randy Dunlap
2024-09-30 15:31 ` [PATCH v11 09/15] drm/vkms: Remove useless drm_rotation_simplify Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 10/15] drm/vkms: Add YUV support Louis Chauvet
2024-10-02 15:55   ` Randy Dunlap
2024-09-30 15:31 ` [PATCH v11 11/15] drm/vkms: Add range and encoding properties to the plane Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 12/15] drm/vkms: Drop YUV formats TODO Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 13/15] drm/vkms: Create KUnit tests for YUV conversions Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 14/15] drm/vkms: Add how to run the Kunit tests Louis Chauvet
2024-09-30 15:31 ` [PATCH v11 15/15] drm/vkms: Add support for DRM_FORMAT_R* Louis Chauvet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30573f5a-d3dd-4aa4-ac5a-cf6df77b79dc@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=airlied@gmail.com \
    --cc=arthurgrillo@riseup.net \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=jeremie.dautheribes@bootlin.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mairacanal@riseup.net \
    --cc=marcheu@google.com \
    --cc=melissa.srw@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mripard@kernel.org \
    --cc=nicolejadeyee@google.com \
    --cc=pekka.paalanen@collabora.com \
    --cc=pekka.paalanen@haloniitty.fi \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=seanpaul@google.com \
    --cc=simona.vetter@ffwll.ch \
    --cc=simona@ffwll.ch \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®