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: Thu, 9 Nov 2023 11:20:05 +0200 [thread overview]
Message-ID: <20231109112005.7b55917e@eldfell> (raw)
In-Reply-To: <43a56f81-ed15-4f44-ba38-2896df405f84@amd.com>
[-- Attachment #1: Type: text/plain, Size: 5029 bytes --]
On Wed, 8 Nov 2023 11:27:35 -0500
Harry Wentland <harry.wentland@amd.com> wrote:
> On 2023-11-08 11:19, Pekka Paalanen wrote:
> > On Wed, 8 Nov 2023 09:31:17 -0500
> > Harry Wentland <harry.wentland@amd.com> wrote:
> >
> >> On 2023-11-08 06:40, Sebastian Wick wrote:
> >>> On Wed, Nov 8, 2023 at 11:16 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
...
> >>>> An incremental UAPI development approach is fine by me, meaning that
> >>>> pipelines might not be complete at first, but I believe that requires
> >>>> telling userspace whether the driver developers consider the pipeline
> >>>> complete (no undescribed operations that would significantly change
> >>>> results from the expected results given the UAPI exposed pipeline).
> >>>>
> >>>> The prime example of what I would like to know is that if a FB
> >>>> contains PQ-encoded image and I use a color pipeline to scale that
> >>>> image up, will the interpolation happen before or after the non-linear
> >>>> colorop that decodes PQ. That is a significant difference as pointed
> >>>> out by Joshua.
> >>>>
> >>
> >> That's fair and I want to give that to you. My concern stems from
> >> the sentiment that I hear that any pipeline that doesn't explicitly
> >> advertise this is useless. I don't agree there. Let's not let perfect
> >> be the enemy of good.
> >
> > It's up to the use case. The policy of what is sufficient should reside
> > in userspace.
> >
> > What about matching compositor shader composition with KMS?
> >
> > Can we use that as a rough precision threshold? If userspace implements
> > the exact same color pipeline as the KMS UAPI describes, then that and
> > the KMS composited result should be indistinguishable in side-by-side
> > or alternating visual inspection on any monitor in isolation.
> >
> > Did this whole effort not start from wanting to off-load things to
> > display hardware but still maintain visual equivalence to software/GPU
> > composition?
> >
>
> I agree with you and I want all that as well.
>
> All I'm saying is that every userspace won't have the same policy of
> what is sufficient. Just because Weston has a very high threshold
> doesn't mean we can't move forward with a workable solution for other
> userspace, as long as we don't do something that prevents us from
> doing the perfect solution eventually.
>
> And yes, I do want a solution that works for Weston and hear your
> comments on what that requires.
I totally agree.
How will that be reflected in the UAPI? If some pipelines are different
from others in correctness/strictness perspective, how will userspace
tell them apart?
Is the current proposal along the lines of: userspace creates a
software pipeline first, and if it cannot map all operations on it to
KMS color pipeline colorops, then the KMS pipeline is not sufficient?
The gist being, if the software pipeline is scaling the image for
example, then it must find a scaling colorop in the KMS pipeline if it
cares about the scaling correctness.
Another example is YUV pixel format on an FB that magically turns into
some kind of RGB when sampled, but there is no colorop to tell what
happens. I suppose userspace cannot assume that the lack of colorop
there means an identity YUV->RGB matrix either? How to model
that? I guess the already mentioned pixel format requirements on a
pipeline would help, making it impossible to use a pipeline without a
YUV->RGB colorop on a YUV FB unless the lack of colorop does indeed
mean an identity matrix.
The same with sub-sampled YUV which probably needs to always(?) be
expanded into fully sampled at the beginning of a pipeline? Chroma
siting.
This is in addition to the previously discussed userspace policy that
if a KMS color pipeline contains colorops the userspace does not
recognise, userspace probably should not pick that pipeline under any
conditions, because it might do something completely unexpected.
I think the above could work, but I feel it requires documenting several
examples like scaling that might not exist in the colorop definitions
at first. Otherwise particularly userspace developers might not come to
think of them, whether they care about those operations. I haven't read
the latest doc yet, so I'm not sure if it's already there.
There is still a gap though: what if the hardware does something
significant that is not modelled in the KMS pipeline with colorops? For
example, always using a hard-wired sRGB curve to decode before blending
and encode after blending. Or that cursor plane always uses the color
pipeline set on the primary plane. How to stop userspace from being
surprised?
Your comments sounded to me like you are letting go of the original
design goals. I'm happy to hear that's not the case. Even if you were,
that is a decision you can make since you are doing the work, and if I
knew you're doing that intentionally I would stop complaining.
Thanks,
pq
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-11-09 9:21 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
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 [this message]
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=20231109112005.7b55917e@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.