From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rob Clark <robdclark@gmail.com>
Cc: Jessica Zhang <quic_jesszhan@quicinc.com>,
daniel.vetter@ffwll.ch, quic_abhinavk@quicinc.com,
dri-devel@lists.freedesktop.org, swboyd@chromium.org,
seanpaul@chromium.org, laurent.pinchart@ideasonboard.com,
linux-arm-msm@vger.kernel.org, dmitry.baryshkov@linaro.org,
freedreno@lists.freedesktop.org
Subject: Re: [Freedreno] [RFC PATCH 0/3] Support for Solid Fill Planes
Date: Tue, 8 Nov 2022 10:52:29 +0200 [thread overview]
Message-ID: <Y2oYzdHKuSDKogkj@intel.com> (raw)
In-Reply-To: <CAF6AEGtJcz6dK-vgnYuJsBqm2tDRUYB7Tg2jtQm1-KuTi+z8ZA@mail.gmail.com>
On Mon, Nov 07, 2022 at 07:34:43PM -0800, Rob Clark wrote:
> On Mon, Nov 7, 2022 at 4:22 PM Jessica Zhang <quic_jesszhan@quicinc.com> wrote:
> >
> >
> >
> > On 11/7/2022 2:09 PM, Rob Clark wrote:
> > > On Mon, Nov 7, 2022 at 1:32 PM Jessica Zhang <quic_jesszhan@quicinc.com> wrote:
> > >>
> > >>
> > >>
> > >> On 11/7/2022 11:37 AM, Ville Syrjälä wrote:
> > >>> On Fri, Oct 28, 2022 at 03:59:49PM -0700, Jessica Zhang wrote:
> > >>>> Introduce and add support for COLOR_FILL and COLOR_FILL_FORMAT
> > >>>> properties. When the color fill value is set, and the framebuffer is set
> > >>>> to NULL, memory fetch will be disabled.
> > >>>
> > >>> Thinking a bit more universally I wonder if there should be
> > >>> some kind of enum property:
> > >>>
> > >>> enum plane_pixel_source {
> > >>> FB,
> > >>> COLOR,
> > >>> LIVE_FOO,
> > >>> LIVE_BAR,
> > >>> ...
> > >>> }
> > >>
> > >> Hi Ville,
> > >>
> > >> Makes sense -- this way, we'd also lay some groundwork for cases where
> > >> drivers want to use other non-FB sources.
> > >>
> > >>>
> > >>>> In addition, loosen the NULL FB checks within the atomic commit callstack
> > >>>> to allow a NULL FB when color_fill is nonzero and add FB checks in
> > >>>> methods where the FB was previously assumed to be non-NULL.
> > >>>>
> > >>>> Finally, have the DPU driver use drm_plane_state.color_fill and
> > >>>> drm_plane_state.color_fill_format instead of dpu_plane_state.color_fill,
> > >>>> and add extra checks in the DPU atomic commit callstack to account for a
> > >>>> NULL FB in cases where color_fill is set.
> > >>>>
> > >>>> Some drivers support hardware that have optimizations for solid fill
> > >>>> planes. This series aims to expose these capabilities to userspace as
> > >>>> some compositors have a solid fill flag (ex. SOLID_COLOR in the Android
> > >>>> hardware composer HAL) that can be set by apps like the Android Gears
> > >>>> app.
> > >>>>
> > >>>> Userspace can set the color_fill value by setting COLOR_FILL_FORMAT to a
> > >>>> DRM format, setting COLOR_FILL to a color fill value, and setting the
> > >>>> framebuffer to NULL.
> > >>>
> > >>> Is there some real reason for the format property? Ie. why not
> > >>> just do what was the plan for the crttc background color and
> > >>> specify the color in full 16bpc format and just pick as many
> > >>> msbs from that as the hw can use?
> > >>
> > >> The format property was added because we can't assume that all hardware
> > >> will support/use the same color format for solid fill planes. Even for
> > >> just MSM devices, the hardware supports different variations of RGB
> > >> formats [1].
> > >
> > > Sure, but the driver can convert the format into whatever the hw
> > > wants. A 1x1 color conversion is not going to be problematic ;-)
> >
> > Hi Rob,
> >
> > Hm... that's also a fair point. Just wondering, is there any advantage
> > of having the driver convert the format, other than not having to
> > implement an extra format property?
> >
> > (In case we end up wrapping everything into a prop blob or something)
> >
>
> It keeps the uabi simpler.. for obvious reasons you don't want the
> driver to do cpu color conversion for an arbitrary size plane, which
> is why we go to all the complexity to expose formats and modifiers for
> "real" planes, but we are dealing with a single pixel value here,
> let's not make the uabi more complex than we need to. I'd propose
> making it float32[4] if float weren't a pita for kernel/uabi, but
> u16[4] or u32[4] should be fine, and drivers can translate that easily
> into whatever weird formats their hw wants for solid-fill.
u16[4] fits into a single u64 property value.
That was the plan for the background prop as well:
https://lore.kernel.org/all/20190703125442.GW5942@intel.com/T/
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-11-08 8:52 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 22:59 [RFC PATCH 0/3] Support for Solid Fill Planes Jessica Zhang
2022-10-28 22:59 ` [RFC PATCH 1/3] drm: Introduce color fill properties for drm plane Jessica Zhang
2022-10-29 11:23 ` Dmitry Baryshkov
2022-10-31 21:58 ` Jessica Zhang
2022-11-08 18:25 ` Simon Ser
2022-11-09 13:52 ` Daniel Vetter
2022-11-09 13:53 ` Dmitry Baryshkov
2022-11-09 13:59 ` Daniel Vetter
2022-11-10 1:44 ` Jessica Zhang
2022-11-11 9:45 ` Daniel Vetter
2022-11-18 19:15 ` Jessica Zhang
2022-10-29 12:08 ` Dmitry Baryshkov
2022-10-31 22:24 ` Jessica Zhang
2022-11-01 0:11 ` Dmitry Baryshkov
2022-11-01 17:35 ` Jessica Zhang
2022-11-08 18:50 ` Simon Ser
2022-11-08 22:01 ` Sebastian Wick
2022-11-09 9:18 ` Pekka Paalanen
2022-11-23 23:27 ` Jessica Zhang
2022-11-24 8:50 ` Pekka Paalanen
2022-11-29 18:53 ` [Freedreno] " Jessica Zhang
2022-10-28 22:59 ` [RFC PATCH 2/3] drm: Adjust atomic checks for solid fill color Jessica Zhang
2022-10-29 11:38 ` Dmitry Baryshkov
2022-10-31 20:41 ` Jessica Zhang
2022-10-28 22:59 ` [RFC PATCH 3/3] drm/msm/dpu: Use color_fill property for DPU planes Jessica Zhang
2022-10-29 11:40 ` Dmitry Baryshkov
2022-10-31 22:14 ` Jessica Zhang
2022-11-07 19:37 ` [RFC PATCH 0/3] Support for Solid Fill Planes Ville Syrjälä
2022-11-07 21:32 ` Jessica Zhang
2022-11-07 22:09 ` [Freedreno] " Rob Clark
2022-11-08 0:22 ` Jessica Zhang
2022-11-08 3:34 ` Rob Clark
2022-11-08 8:52 ` Ville Syrjälä [this message]
2022-11-22 23:20 ` Jessica Zhang
2022-11-07 23:06 ` Laurent Pinchart
2023-06-26 23:02 ` Jessica Zhang
2023-06-27 0:06 ` Dmitry Baryshkov
2023-06-27 0:45 ` Jessica Zhang
2023-06-27 1:46 ` Dmitry Baryshkov
2023-06-27 7:58 ` Pekka Paalanen
2023-06-27 21:27 ` Jessica Zhang
2023-06-27 21:59 ` Dmitry Baryshkov
2023-06-27 22:10 ` Abhinav Kumar
2023-06-28 7:34 ` Pekka Paalanen
2023-06-28 16:40 ` Jessica Zhang
2023-06-29 7:29 ` Pekka Paalanen
2023-06-29 18:53 ` [Freedreno] " Jessica Zhang
2023-06-29 18:52 ` Jessica Zhang
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=Y2oYzdHKuSDKogkj@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=robdclark@gmail.com \
--cc=seanpaul@chromium.org \
--cc=swboyd@chromium.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).