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] drm/vc4: Ignore alpha on primary plane
Date: Mon, 05 Mar 2018 13:15:39 -0800 [thread overview]
Message-ID: <87tvtuusuc.fsf@anholt.net> (raw)
In-Reply-To: <1519950760-68447-1-git-send-email-stschake@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1306 bytes --]
Stefan Schake <stschake@gmail.com> writes:
> We allow alpha formats on the primary plane but a partially transparent
> framebuffer will cause a corrupted display. With this change black pixels
> are output instead, in line with the behavior for other DRM drivers.
>
> Signed-off-by: Stefan Schake <stschake@gmail.com>
> ---
> Test program is available at https://github.com/stschake/vc4-alpha-test
How about this as a suggestion for a patch series:
vc4_plane_mode_set() sets ALPHA_PREMULT (POS2 bit 29) if alpha is
enabled.
vc4_plane_mode_set() sets a new vc4_plane->needs_bg_fill boolean to
(format->has_alpha || !covers_screen) where covers_screenis the
can_position logic from drm_atomic_helper.c
vc4_crtc_atomic_flush() updates DISPBKGND to enable background fill
(before vc4_crtc_update_dlist()) if the first plane has needs_bg_fill
set.
vc4_plane_mode_set() strips off the alpha blend bits if
!vc4_plane->needs_bg_fill.
This lets us keep avoiding the background fill cost in the normal case,
and fixes the case where the "primary" plane doesn't cover the screen.
It doesn't get the background fill turned back off if you transition
away from primary not covering the screen, but that seems unlikely and
harder to handle (since you would need to wait for the flip to be done
before disabling).
[-- 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
next prev parent reply other threads:[~2018-03-05 21:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 0:32 [PATCH] drm/vc4: Ignore alpha on primary plane Stefan Schake
2018-03-02 14:39 ` Ville Syrjälä
2018-03-02 14:43 ` Ville Syrjälä
2018-03-02 15:06 ` Stefan Schake
2018-03-02 15:21 ` Ville Syrjälä
2018-03-02 15:48 ` Stefan Schake
2018-03-02 16:04 ` Ville Syrjälä
2018-03-02 17:13 ` Eric Anholt
2018-03-02 17:58 ` Ville Syrjälä
2018-03-05 21:15 ` Eric Anholt [this message]
2018-03-06 1:55 ` 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=87tvtuusuc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.