[PATCH 1/3] drm/vc4: Set premultiplied for alpha formats
Stefan Schake
stschake at gmail.com
Tue Mar 6 11:43:59 PST 2018
On Tue, Mar 6, 2018 at 8:35 PM, Eric Anholt <eric at anholt.net> wrote:
> Stefan Schake <stschake at 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 at 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.
I remember fixing that up, and I did - but in 2/3, where of course it
doesn't really belong. Sorry, I must have gotten my rebase mixed up.
Since that makes two patches that need fixups, would you prefer I send
a v2 instead?
Thanks,
Stefan
More information about the linux-rpi-kernel
mailing list