Stefan Schake <stsch...@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 <stsch...@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: signature.asc
Description: PGP signature

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

Reply via email to