From: Pekka Paalanen <ppaalanen@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: "Sebastian Wick" <sebastian.wick@redhat.com>,
"Shashank Sharma" <shashank.sharma@amd.com>,
"Xaver Hugl" <xaver.hugl@gmail.com>,
dri-devel@lists.freedesktop.org,
wayland-devel@lists.freedesktop.org,
"Melissa Wen" <mwen@igalia.com>,
"Jonas Ådahl" <jadahl@redhat.com>,
"Uma Shankar" <uma.shankar@intel.com>,
"Michel Dänzer" <mdaenzer@redhat.com>,
"Victoria Brekenfeld" <victoria@system76.com>,
"Aleix Pol" <aleixpol@kde.org>,
"Naseer Ahmed" <quic_naseer@quicinc.com>,
"Christopher Braga" <quic_cbraga@quicinc.com>,
"Joshua Ashton" <joshua@froggi.es>
Subject: Re: [RFC PATCH 01/10] drm/doc/rfc: Describe why prescriptive color pipeline is needed
Date: Tue, 7 Nov 2023 11:55:43 +0200 [thread overview]
Message-ID: <20231107115543.7fa6e5f2@eldfell> (raw)
In-Reply-To: <bc7aa628-4d9b-4141-a001-535e67d173dd@amd.com>
[-- Attachment #1: Type: text/plain, Size: 4801 bytes --]
On Mon, 6 Nov 2023 11:19:27 -0500
Harry Wentland <harry.wentland@amd.com> wrote:
> On 2023-10-20 06:36, Pekka Paalanen wrote:
> > On Thu, 19 Oct 2023 10:56:40 -0400
> > Harry Wentland <harry.wentland@amd.com> wrote:
> >
> >> On 2023-10-10 12:13, Melissa Wen wrote:
> >>> O 09/08, Harry Wentland wrote:
> >>>> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> >
> > ...
> >
> >>> Also, with this new plane API in place, I understand that we will
> >>> already need think on how to deal with the mixing between old drm color
> >>> properties (color encoding and color range) and these new way of setting
> >>> plane color properties. IIUC, Pekka asked a related question about it
> >>> when talking about CRTC automatic RGB->YUV (?)
> >>>
> >>
> >> We'll still need to confirm whether we'll want to deprecate these
> >> existing properties. If we do that we'd want a client prop. Things
> >> should still work without deprecating them, if drivers just pick up
> >> after the initial encoding and range CSC.
> >>
> >> But realistically it might be better to deprecate them and turn them
> >> into explicit colorops.
> >
> > The existing properties would need to be explicitly reflected in the
> > new pipelines anyway, otherwise there would always be doubt at which
> > point of a pipeline the old properties apply, and they might even
> > need to change positions between pipelines.
> >
> > I think it is simply easier to just hide all old color related
> > properties when userspace sets the client-cap to enable pipelines. The
> > problem is to make sure to hide all old properties on all drivers that
> > support the client-cap.
> >
> > As a pipeline must be complete (describe everything that happens to
> > pixel values), it's going to be a flag day per driver.
> >
> > Btw. the plane FB YUV->RGB conversion needs a colorop in every pipeline
> > as well. Maybe it's purely informative and non-configurable, keyed by
> > FB pixel format, but still.
> >
> > We also need a colorop to represent sample filtering, e.g. bilinear,
> > like I think Sebastian may have mentioned in the past. Everything
> > before the sample filter happens "per tap" as Joshua Ashton put it, and
> > everything after it happens on the sample that was computed as a
> > weighted average of the filter tap inputs (texels).
> >
> > There could be colorops other than sample filtering that operate on
> > more than one sample at a time, like blur or sharpness. There could
> > even be colorops that change the image size like adding padding that
> > the following colorop hardware requires, and then yet another colorop
> > that clips that padding away. For an example, see
> > https://lists.freedesktop.org/archives/dri-devel/2023-October/427015.html
> >
> > If that padding and its color can affect the pipeline results of the
> > pixels near the padding (e.g. some convolution is applied with them,
> > which may be the reason why padding is necessary to begin with), then
> > it would be best to model it.
> >
>
> I hear you but I'm also somewhat shying away from defining this at this point.
Would you define them before the new UAPI is released though?
I agree there is no need to have them in this patch series, but I think
we'd hit the below problems if the UAPI is released without them.
> There are already too many things that need to happen and I will focus on the
> actual color blocks (LUTs, matrices) first. We'll always be able to add a new
> (read-only) colorop type to define scaling and tap behavior at any point and
> a client is free to ignore a color pipeline if it doesn't find any tap/scale
> info in it.
How would userspace know to look for tap/scale info, if there is no
upstream definition even on paper?
And the opposite case, if someone writes userspace without tap/scale
colorops, and then drivers add those, and there is no pipeline without
them, because they always exist. Would that userspace disregard all
those pipelines because it does not understand tap/scale colorops,
leaving no usable pipelines? Would that not be kernel regressing
userspace?
If the kernel keeps on exposing pipelines without the colorops, it
fails the basic promise of the whole design: that all pixel value
affecting operations are at least listed if not controllable.
How will we avoid painting ourselves in a corner?
Maybe we need a colorop for "here be dragons" documented as having
unknown and unreliable effects, until driver authors are sure that
everything has been modelled in the pipeline and there are no unknowns?
Or a flag on the pipelines, if we can have that. Then we can at least
tell when the pipeline does not fulfil the basic promise.
Thanks,
pq
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-11-07 9:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 15:02 [RFC PATCH 00/10] Color Pipeline API w/ VKMS Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 01/10] drm/doc/rfc: Describe why prescriptive color pipeline is needed Harry Wentland
2023-09-08 19:30 ` Sebastian Wick
2023-09-08 20:38 ` Harry Wentland
2023-09-13 11:53 ` Pekka Paalanen
2023-09-13 11:29 ` Pekka Paalanen
2023-10-19 14:56 ` Harry Wentland
2023-10-20 10:17 ` Pekka Paalanen
2023-11-06 16:24 ` Harry Wentland
2023-11-07 9:38 ` Pekka Paalanen
2023-11-07 15:39 ` Harry Wentland
2023-10-10 16:13 ` Melissa Wen
2023-10-11 10:20 ` Pekka Paalanen
2023-10-11 19:12 ` Sebastian Wick
2023-10-19 14:56 ` Harry Wentland
2023-10-20 10:36 ` Pekka Paalanen
2023-11-06 16:19 ` Harry Wentland
2023-11-07 9:55 ` Pekka Paalanen [this message]
2023-11-07 16:58 ` Harry Wentland
2023-11-08 10:16 ` Pekka Paalanen
2023-11-08 11:40 ` Sebastian Wick
2023-11-08 14:31 ` Harry Wentland
2023-11-08 16:19 ` Pekka Paalanen
2023-11-08 16:27 ` Harry Wentland
2023-11-09 9:20 ` Pekka Paalanen
2023-11-10 20:27 ` Harry Wentland
2023-11-13 10:01 ` Pekka Paalanen
2023-09-08 15:02 ` [RFC PATCH 02/10] drm/colorop: Introduce new drm_colorop mode object Harry Wentland
2023-10-10 16:19 ` Melissa Wen
2023-10-19 15:01 ` Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 03/10] drm/colorop: Add TYPE property Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 04/10] drm/color: Add 1D Curve subtype Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 05/10] drm/colorop: Add BYPASS property Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 06/10] drm/colorop: Add NEXT property Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 07/10] drm/colorop: Add atomic state print for drm_colorop Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 08/10] drm/colorop: Add new IOCTLs to retrieve drm_colorop objects Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 09/10] drm/plane: Add COLOR PIPELINE property Harry Wentland
2023-09-08 15:02 ` [RFC PATCH 10/10] drm/vkms: Add enumerated 1D curve colorop Harry Wentland
2023-10-10 16:27 ` Melissa Wen
2023-10-19 15:50 ` Harry Wentland
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=20231107115543.7fa6e5f2@eldfell \
--to=ppaalanen@gmail.com \
--cc=aleixpol@kde.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=jadahl@redhat.com \
--cc=joshua@froggi.es \
--cc=mdaenzer@redhat.com \
--cc=mwen@igalia.com \
--cc=quic_cbraga@quicinc.com \
--cc=quic_naseer@quicinc.com \
--cc=sebastian.wick@redhat.com \
--cc=shashank.sharma@amd.com \
--cc=uma.shankar@intel.com \
--cc=victoria@system76.com \
--cc=wayland-devel@lists.freedesktop.org \
--cc=xaver.hugl@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.