dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Stone <daniel@fooishbar.org>
To: Simon Ser <contact@emersion.fr>
Cc: Alex Hung <alex.hung@amd.com>,
	dri-devel@lists.freedesktop.org,  amd-gfx@lists.freedesktop.org,
	wayland-devel@lists.freedesktop.org,  harry.wentland@amd.com,
	leo.liu@amd.com, ville.syrjala@linux.intel.com,
	 pekka.paalanen@collabora.com, mwen@igalia.com,
	jadahl@redhat.com,  sebastian.wick@redhat.com,
	shashank.sharma@amd.com, agoins@nvidia.com,  joshua@froggi.es,
	mdaenzer@redhat.com, aleixpol@kde.org, xaver.hugl@gmail.com,
	 victoria@system76.com, daniel@ffwll.ch, uma.shankar@intel.com,
	 quic_naseer@quicinc.com, quic_cbraga@quicinc.com,
	quic_abhinavk@quicinc.com,  marcan@marcan.st,
	Liviu.Dudau@arm.com, sashamcintosh@google.com,
	 chaitanya.kumar.borah@intel.com, louis.chauvet@bootlin.com
Subject: Re: [PATCH V8 06/43] drm/colorop: Add 1D Curve subtype
Date: Tue, 8 Apr 2025 17:40:31 +0100	[thread overview]
Message-ID: <CAPj87rOpp8CE_kmcJmp69pM5NhxBkLOGp-BKdALX4F8GL5-29Q@mail.gmail.com> (raw)
In-Reply-To: <46R4JuwCeyu56R2FsAN-j6n0Pu5VSeLdju8KUycQ3PF5cVQrlUO3C5SX8CgpRJ-QL5_-XS2ds94pPjhzEl6hOo3iyLl0y_d0Syzinn7BxSY=@emersion.fr>

Hi there,

On Tue, 1 Apr 2025 at 20:53, Simon Ser <contact@emersion.fr> wrote:
> On Tuesday, April 1st, 2025 at 17:14, Daniel Stone <daniel@fooishbar.org> wrote:
> > 'plane' seems really incongruous here. The colorop can be created for
> > any number of planes, but we're setting it to always be bound to a
> > single plane at init, and that can only be changed later.
>
> I don't think the current design allows a single colorop to be re-used
> between planes? I think as-is, drivers create one set of colorops per
> plane and never share them between different planes?

OK, Harry's reply cleared that up perfectly - the flexibility that's
there at the moment is about being able to reuse colorops for CRTCs in
post-blend ops (great!), not shared between planes.

> > 1. Is it guaranteed that, if any plane on a device supports the
> > COLOR_PIPELINE property, all planes will support COLOR_PIPELINE?
> > (Given the amdgpu cursor-plane discussion, it looks like no, which is
> > unfortunate but oh well.)
>
> I don't think so. (They could all expose a COLOR_PIPELINE with the only
> choice as the zero bypass pipeline, but that sounds silly.)

Works for me: so any planes could not have colour pipelines, and the
result would be undefined (well, less defined) colour.

> > 2. Is it guaranteed that, if a COLOR_PIPELINE property exists on a
> > plane, that BYPASS will be one of the supported values? (The current
> > implementation does this, which seems sensible, but if the plan is to
> > not make this a uAPI invariant, e.g. to support planes with mandatory
> > CM steps, this should probably be explicitly documented.)
>
> Yes. This is a hard requirement, mentioned in the design doc IIRC.

Nice. I guess that's kind of implicit given pre-colorop behaviour
expectations. We'd probably need a client cap analogous to universal
planes to expose planes with mandatory colorop steps. This should
probably be enforced with igt.

> > 3. Can a given color pipeline potentially be used on different planes,
> > i.e. a colorop used to represent a separate hardware processing block
> > which may be used on any plane but only one plane at a time? (This
> > should be documented either way, and if they are unique per plane, igt
> > should enforce this.)
>
> Right now, I don't think so. Could be a future extension I suppose, but
> I think we need to properly sit down and think about all of the possible
> consequences. Maybe using the same pipeline ID isn't the best uAPI here.

I'm with you on this. I think if we were trying to express a single
color-transformation block which was shared between multiple planes
(MTK is probably the closest to this conceptually from what I've
seen), having an immutable COLOR_PIPELINE_SHARED = { ids... } property
would be the best way to achieve this.

> > 3. Can a given color pipeline be active on multiple planes at a time?
> > (If so, the implementation definitely needs rethinking: the colorop
> > would need to have a list of planes.)
>
> I don't think so.

Great. But probably needs igt.

> > 4. Can a given color pipeline be active on multiple planes on multiple
> > CRTCs at a time?
>
> Ditto.

Ditto.

> > 5. For a given colorop property, is it an invariant that the colorop
> > will only appear in one color pipeline at a time? (I believe so, but
> > this probably needs documenting and/or igt.)
>
> I don't really understand why that would matter to user-space.

Plane A: COLOR_PIPELINE@123 = { 1D_CURVE@456 }
Plane B: COLOR_PIPELINE@789 = { 1D_CURVE@456 }

If userspace wasn't defensive about this, it would program the curve
for 456 twice, and unless they were the same you'd get undesirable
results.

The existing implementation is fine here, I think it just needs better
igt to codify the expectations we all have.

> > Either way, I suspect that clorop->plane is the wrong thing to do, and
> > that it maybe wants to be a list of planes in the drm_colorop_state?
>
> I don't think so, for a given plane, there can only be a single pipeline
> active at a time.

Yeah, again that was just not having grasped that the colorop not
being derived from the plane was actually about allowing for it to be
attached to a single CRTC instead, rather than potentially multiple
planes. I have no concerns around this.

As it stands, I've gone through the implementation pretty thoroughly,
as well as our use of it in Weston. I'm happy with how it looks for
pre-blend, and I'm even happier that the implementation is written to
apply easily to apply to post-blend CRTC pipelines.

With the suggested uAPI doc fixes and igt additions, this series is:
Reviewed-by: Daniel Stone <daniels@collabora.com>

Thanks everyone for the immense amount of work that's gone into this. :)

Cheers,
Daniel

  parent reply	other threads:[~2025-04-08 16:40 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 23:46 [PATCH V8 00/43] Color Pipeline API w/ VKMS Alex Hung
2025-03-26 23:46 ` [PATCH V8 01/43] drm: Add helper for conversion from signed-magnitude Alex Hung
2025-03-26 23:46 ` [PATCH V8 02/43] drm/vkms: Add kunit tests for VKMS LUT handling Alex Hung
2025-03-26 23:46 ` [PATCH V8 03/43] drm/doc/rfc: Describe why prescriptive color pipeline is needed Alex Hung
2025-03-29 15:26   ` Simon Ser
2025-04-01  0:10     ` Alex Hung
2025-04-01  7:26       ` Simon Ser
2025-03-31 16:24   ` Shengyu Qu
2025-03-31 16:41     ` Alex Hung
2025-03-31 16:54       ` Shengyu Qu
2025-03-26 23:46 ` [PATCH V8 04/43] drm/colorop: Introduce new drm_colorop mode object Alex Hung
2025-03-26 23:46 ` [PATCH V8 05/43] drm/colorop: Add TYPE property Alex Hung
2025-03-26 23:46 ` [PATCH V8 06/43] drm/colorop: Add 1D Curve subtype Alex Hung
2025-04-01 15:14   ` Daniel Stone
2025-04-01 19:53     ` Simon Ser
2025-04-01 21:02       ` Harry Wentland
2025-04-08 16:40       ` Daniel Stone [this message]
2025-04-08 17:30         ` Harry Wentland
2025-04-08 18:28           ` Daniel Stone
2025-04-10  7:53           ` Pipeline vs. no pipeline (Re: [PATCH V8 06/43] drm/colorop: Add 1D Curve subtype) Pekka Paalanen
2025-04-15 15:29             ` Harry Wentland
2025-04-16 14:39               ` Xaver Hugl
2025-04-17  8:28               ` Pekka Paalanen
2025-04-10 10:05         ` [PATCH V8 06/43] drm/colorop: Add 1D Curve subtype Simon Ser
2025-04-15 11:12         ` Borah, Chaitanya Kumar
2025-04-17 15:13           ` Simon Ser
2025-03-26 23:46 ` [PATCH V8 07/43] drm/colorop: Add BYPASS property Alex Hung
2025-03-26 23:46 ` [PATCH V8 08/43] drm/colorop: Add NEXT property Alex Hung
2025-03-27 23:26   ` Simon Ser
2025-03-26 23:46 ` [PATCH V8 09/43] drm/colorop: Add atomic state print for drm_colorop Alex Hung
2025-03-27 23:29   ` Simon Ser
2025-03-26 23:46 ` [PATCH V8 10/43] drm/plane: Add COLOR PIPELINE property Alex Hung
2025-03-29 14:33   ` Simon Ser
2025-03-26 23:46 ` [PATCH V8 11/43] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE Alex Hung
2025-03-29 14:37   ` Simon Ser
2025-04-01  1:42   ` Shengyu Qu
2025-03-26 23:46 ` [PATCH V8 12/43] Documentation/gpu: document drm_colorop Alex Hung
2025-03-29 14:40   ` Simon Ser
2025-03-26 23:46 ` [PATCH V8 13/43] drm/vkms: Add enumerated 1D curve colorop Alex Hung
2025-03-26 23:46 ` [PATCH V8 14/43] drm/vkms: Add kunit tests for linear and sRGB LUTs Alex Hung
2025-03-26 23:46 ` [PATCH V8 15/43] drm/colorop: Add 3x4 CTM type Alex Hung
2025-03-26 23:46 ` [PATCH V8 16/43] drm/vkms: Use s32 for internal color pipeline precision Alex Hung
2025-03-26 23:46 ` [PATCH V8 17/43] drm/vkms: add 3x4 matrix in color pipeline Alex Hung
2025-03-26 23:46 ` [PATCH V8 18/43] drm/tests: Add a few tests around drm_fixed.h Alex Hung
2025-03-26 23:47 ` [PATCH V8 19/43] drm/vkms: Add tests for CTM handling Alex Hung
2025-03-26 23:47 ` [PATCH V8 20/43] drm/colorop: pass plane_color_pipeline client cap to atomic check Alex Hung
2025-03-29 15:32   ` Simon Ser
2025-03-26 23:47 ` [PATCH V8 21/43] drm/colorop: define a new macro for_each_new_colorop_in_state Alex Hung
2025-03-26 23:47 ` [PATCH V8 22/43] drm/amd/display: Ignore deprecated props when plane_color_pipeline set Alex Hung
2025-03-26 23:47 ` [PATCH V8 23/43] drm/amd/display: Add bypass COLOR PIPELINE Alex Hung
2025-03-26 23:47 ` [PATCH V8 24/43] drm/amd/display: Skip color pipeline initialization for cursor plane Alex Hung
2025-03-30  9:48   ` Shengyu Qu
2025-03-30 12:59   ` Shengyu Qu
2025-03-31 14:28     ` Alex Hung
2025-03-31 15:43       ` Shengyu Qu
2025-03-31 16:06         ` Alex Hung
2025-03-31 16:12           ` Shengyu Qu
2025-03-31 16:26             ` Alex Hung
2025-03-31 16:31               ` Shengyu Qu
2025-03-31 16:34                 ` Alex Hung
2025-03-31 16:50                   ` Shengyu Qu
2025-03-31 17:04                     ` Shengyu Qu
2025-03-31 17:42                       ` Alex Hung
2025-03-31 18:53                         ` Xaver Hugl
2025-04-01  0:28                           ` Alex Hung
2025-04-01 15:04                             ` Xaver Hugl
2025-04-01 15:45                           ` Melissa Wen
2025-04-01 19:39                             ` Harry Wentland
2025-04-01  1:04                         ` Shengyu Qu
2025-04-01  1:24                           ` Alex Hung
2025-04-01  9:56                         ` Michel Dänzer
2025-04-01 12:32                           ` Shengyu Qu
2025-04-01 14:11                             ` Michel Dänzer
2025-04-01 15:45                               ` Shengyu Qu
2025-04-01 19:45                                 ` Harry Wentland
2025-04-02  3:47                                   ` Qu Shengyu
2025-04-01 16:24                               ` Shengyu Qu
2025-03-26 23:47 ` [PATCH V8 25/43] drm/amd/display: Add support for sRGB EOTF in DEGAM block Alex Hung
2025-03-26 23:47 ` [PATCH V8 26/43] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block Alex Hung
2025-03-26 23:47 ` [PATCH V8 27/43] drm/amd/display: Add support for sRGB EOTF in BLND block Alex Hung
2025-03-26 23:47 ` [PATCH V8 28/43] drm/colorop: Add PQ 125 EOTF and its inverse Alex Hung
2025-03-29 14:48   ` Simon Ser
2025-03-26 23:47 ` [PATCH V8 29/43] drm/amd/display: Enable support for PQ 125 EOTF and Inverse Alex Hung
2025-03-26 23:47 ` [PATCH V8 30/43] drm/colorop: add BT2020/BT709 OETF and Inverse OETF Alex Hung
2025-03-29 14:53   ` Simon Ser
2025-03-26 23:47 ` [PATCH V8 31/43] drm/amd/display: Add support for BT.709 and BT.2020 TFs Alex Hung
2025-03-26 23:47 ` [PATCH V8 32/43] drm/colorop: Add 1D Curve Custom LUT type Alex Hung
2025-03-29 14:55   ` Simon Ser
2025-04-15  6:09   ` Shankar, Uma
2025-04-15  6:16     ` Simon Ser
2025-04-15  6:40       ` Shankar, Uma
2025-04-15 15:05         ` Harry Wentland
2025-04-15 16:25           ` Simon Ser
2025-05-22 11:33             ` Shankar, Uma
2025-05-30 13:58               ` Pekka Paalanen
2025-06-03  8:30                 ` Shankar, Uma
2025-06-03 10:51                   ` Pekka Paalanen
2025-06-03 20:26                     ` Harry Wentland
2025-06-04 18:59                       ` Shankar, Uma
2025-06-05  7:30                         ` Pekka Paalanen
2025-03-26 23:47 ` [PATCH V8 33/43] drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT Alex Hung
2025-03-26 23:47 ` [PATCH V8 34/43] drm/amd/display: add 3x4 matrix colorop Alex Hung
2025-03-26 23:47 ` [PATCH V8 35/43] drm/colorop: Add mutliplier type Alex Hung
2025-03-26 23:47 ` [PATCH V8 36/43] drm/amd/display: add multiplier colorop Alex Hung
2025-03-26 23:47 ` [PATCH V8 37/43] drm/amd/display: Swap matrix and multiplier Alex Hung
2025-03-26 23:47 ` [PATCH V8 38/43] drm/colorop: Define LUT_1D interpolation Alex Hung
2025-03-26 23:47 ` [PATCH V8 39/43] drm/colorop: allow non-bypass colorops Alex Hung
2025-03-29 15:41   ` Simon Ser
2025-03-26 23:47 ` [PATCH V8 40/43] drm/colorop: Add 3D LUT support to color pipeline Alex Hung
2025-03-29 14:57   ` Simon Ser
2025-04-25 13:50   ` Leandro Ribeiro
2025-05-13  3:39     ` Alex Hung
2025-05-17  1:22   ` Xaver Hugl
2025-05-17 11:53     ` Simon Ser
2025-05-17 22:32       ` Xaver Hugl
2025-05-19 23:43         ` Simon Ser
2025-05-20 20:13           ` Harry Wentland
2025-05-21 19:18             ` Harry Wentland
2025-05-22 10:14               ` Simon Ser
2025-05-22 11:46                 ` Shankar, Uma
2025-05-17 17:36     ` Autumn Ashton
2025-03-26 23:47 ` [PATCH V8 41/43] drm/amd/display: add 3D LUT colorop Alex Hung
2025-03-26 23:47 ` [PATCH V8 42/43] drm/amd/display: Add AMD color pipeline doc Alex Hung
2025-03-26 23:47 ` [PATCH V8 43/43] drm/colorop: Add destroy functions for color pipeline Alex Hung
2025-03-29 15:48   ` Simon Ser
2025-04-01  2:42     ` Alex Hung
2025-04-10 16:18       ` Simon Ser
2025-03-29 15:51 ` [PATCH V8 00/43] Color Pipeline API w/ VKMS Simon Ser

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=CAPj87rOpp8CE_kmcJmp69pM5NhxBkLOGp-BKdALX4F8GL5-29Q@mail.gmail.com \
    --to=daniel@fooishbar.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=agoins@nvidia.com \
    --cc=aleixpol@kde.org \
    --cc=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=contact@emersion.fr \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jadahl@redhat.com \
    --cc=joshua@froggi.es \
    --cc=leo.liu@amd.com \
    --cc=louis.chauvet@bootlin.com \
    --cc=marcan@marcan.st \
    --cc=mdaenzer@redhat.com \
    --cc=mwen@igalia.com \
    --cc=pekka.paalanen@collabora.com \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_cbraga@quicinc.com \
    --cc=quic_naseer@quicinc.com \
    --cc=sashamcintosh@google.com \
    --cc=sebastian.wick@redhat.com \
    --cc=shashank.sharma@amd.com \
    --cc=uma.shankar@intel.com \
    --cc=victoria@system76.com \
    --cc=ville.syrjala@linux.intel.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 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).