From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: 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 2/3] drm/vc4: Check if plane requires background fill
Date: Wed, 7 Mar 2018 17:05:39 +0200 [thread overview]
Message-ID: <20180307150539.GO5453@intel.com> (raw)
In-Reply-To: <877eqoiw3q.fsf@anholt.net>
On Tue, Mar 06, 2018 at 04:10:33PM -0800, Eric Anholt wrote:
> Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
>
> > On Tue, Mar 06, 2018 at 02:48:38AM +0100, Stefan Schake wrote:
> >> Considering a single plane only, we have to enable background color
> >> when the plane has an alpha format and could be blending from the
> >> background or when it doesn't cover the entire screen.
> >>
> >> Signed-off-by: Stefan Schake <stschake@gmail.com>
> >> ---
> >> drivers/gpu/drm/vc4/vc4_drv.h | 6 ++++++
> >> drivers/gpu/drm/vc4/vc4_plane.c | 15 ++++++++++++++-
> >> 2 files changed, 20 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
> >> index fefa166..7cc6390 100644
> >> --- a/drivers/gpu/drm/vc4/vc4_drv.h
> >> +++ b/drivers/gpu/drm/vc4/vc4_drv.h
> >> @@ -302,6 +302,12 @@ struct vc4_hvs {
> >>
> >> struct vc4_plane {
> >> struct drm_plane base;
> >> +
> >> + /* Set when the plane has per-pixel alpha content or does not cover
> >> + * the entire screen. This is a hint to the CRTC that it might need
> >> + * to enable background color fill.
> >> + */
> >> + bool needs_bg_fill;
> >
> > Looks to me like that should really be a bitmask (or something similar)
> > in the crtc state.
>
> Why?
>
> In particular, VC4 really doesn't have a fixed number of planes, and the
> fact that we're exposing just a handful so far is probably a bug.
The problem is that this seems to clobber the device state from the
.atomic_check() hook. So if you do a CHECK_ONLY atomic ioctl (or
some later check simply fails and the operation is aborted) you've
already modified the state of the device, and some later operation
may then end up doing the wrong thing.
I guess you could track this in the plane struct like here, but as
with the actual hardware state that shouldn't get modified until
we're sure the checked state is really meant to be commited to the
hardware.
--
Ville Syrjälä
Intel OTC
_______________________________________________
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-07 15:05 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
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ä [this message]
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=20180307150539.GO5453@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--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.