dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
Cc: airlied@linux.ie, linux-rpi-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org,
	Stefan Schake <stschake@gmail.com>
Subject: Re: [PATCH 1/3] drm/vc4: Set premultiplied for alpha formats
Date: Tue, 06 Mar 2018 11:35:36 -0800	[thread overview]
Message-ID: <87k1updmk7.fsf@anholt.net> (raw)
In-Reply-To: <1520300919-103427-2-git-send-email-stschake@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1357 bytes --]

Stefan Schake <stschake@gmail.com> writes:

> Alpha formats in DRM are assumed to be premultiplied, so we should be
> setting the PREMULT bit in the plane configuration for HVS.
>
> Signed-off-by: Stefan Schake <stschake@gmail.com>
> ---
>  drivers/gpu/drm/vc4/vc4_plane.c | 3 ++-
>  drivers/gpu/drm/vc4/vc4_regs.h  | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index c4c7af1..3d0c8a2 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -618,13 +618,14 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
>  					      SCALER_POS1_SCL_HEIGHT));
>  	}
>  
> -	/* Position Word 2: Source Image Size, Alpha Mode */
> +	/* Position Word 2: Source Image Size, Alpha */
>  	vc4_state->pos2_offset = vc4_state->dlist_count;
>  	vc4_dlist_write(vc4_state,
>  			VC4_SET_FIELD(fb->format->has_alpha ?
>  				      SCALER_POS2_ALPHA_MODE_PIPELINE :
>  				      SCALER_POS2_ALPHA_MODE_FIXED,
>  				      SCALER_POS2_ALPHA_MODE) |
> +			(format->has_alpha ? SCALER_POS2_ALPHA_PREMULT : 0) |

Looks like you meant fb->format->has_alpha here.  I can fix that up when
applying -- everything else looks good to me.  I'll let this sit on the
list for a day or two in case anyone else has feedback.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-03-06 19:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  1:48 [PATCH 0/3] drm/vc4: Improve alpha format plane support Stefan Schake
2018-03-06  1:48 ` [PATCH 1/3] drm/vc4: Set premultiplied for alpha formats Stefan Schake
2018-03-06 19:35   ` Eric Anholt [this message]
2018-03-06 19:43     ` Stefan Schake
2018-03-06  1:48 ` [PATCH 2/3] drm/vc4: Check if plane requires background fill Stefan Schake
2018-03-06 19:43   ` Ville Syrjälä
2018-03-07  0:10     ` Eric Anholt
2018-03-07 15:05       ` Ville Syrjälä
2018-03-07 15:50         ` Eric Anholt
2018-03-06  1:48 ` [PATCH 3/3] drm/vc4: Enable background color fill when necessary Stefan Schake

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=87k1updmk7.fsf@anholt.net \
    --to=eric@anholt.net \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=stschake@gmail.com \
    /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