On Tue, Mar 6, 2018 at 8:35 PM, Eric Anholt <e...@anholt.net> wrote:
> 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
>> 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,
>> - /* Position Word 2: Source Image Size, Alpha Mode */
>> + /* Position Word 2: Source Image Size, Alpha */
>> vc4_state->pos2_offset = vc4_state->dlist_count;
>> VC4_SET_FIELD(fb->format->has_alpha ?
>> SCALER_POS2_ALPHA_MODE_PIPELINE :
>> 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?
dri-devel mailing list