All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Ilia Mirkin" <imirkin@alum.mit.edu>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Daniel Vetter" <daniel@ffwll.ch>
Cc: dri-devel <dri-devel@lists.freedesktop.org>, Jyri Sarha <jsarha@ti.com>
Subject: Re: [PATCH 4/7] drm/omap: Implement CTM property for CRTC using OVL managers CPR matrix
Date: Mon, 21 Sep 2020 14:08:48 +0300	[thread overview]
Message-ID: <5beadfb2-86a5-a782-ff88-ce77c727ecfe@ti.com> (raw)
In-Reply-To: <CAKb7Uvhcvi5AQZq21ky8V07wjeNfdpV0y+5j=O=S1PTp=4o5Bw@mail.gmail.com>

Hi,

On 04/09/2019 23:20, Ilia Mirkin wrote:

>>>>>> Implement CTM color management property for OMAP CRTC using DSS
>>>>>> overlay manager's Color Phase Rotation matrix. The CPR matrix does not
>>>>>> exactly match the CTM property documentation. On DSS the CPR matrix is
>>>>>> applied after gamma table look up. However, it seems stupid to add a
>>>>>> custom property just for that.
>>>>>
>>>>> In that case the DRM documentation should be updated to mention that
>>>>> both options are allowed.
>>>>
>>>> Ok, if that is alright. But if we do that, then I guess all the drivers
>>>> implementing CTM should document the point where it is applied in the
>>>> pipeline.
>>>
>>> Whatever solution we end up picking, I think it should at least be
>>> discussed with a broader upstream audience and not just swept under the
>>> omapdrm carpet :-)
>>>
>>
>> I'll try to write something and send the next series to wider audience.
>> Let's see what jury says.
> 
> In case it's useful ... the pipeline normally goes degamma -> ctm ->
> gamma. If your ctm is applied after gamma, perhaps you can just rename
> "gamma" to "degamma" and be done? (There's the unfortunate case of
> legacy gamma which does end up in "GAMMA" when using atomic helpers.
> But in such a case, you won't have a CTM.)

Waking up old thread, as I started looking at these patches again. So the problem was that DRM
defines the output color transformations as:

degamma -> ctm -> gamma -> out

whereas OMAP DSS has

gamma -> ctm -> out

The omapdrm driver could declare the gamma table as degamma, as suggested by Ilia, and for the
legacy drmModeCrtcSetGamma, the omapdrm driver could implement its own version, and use the degamma
table internally (with no ctm).

For legacy, that would work fine and as expected, but I think the atomic version would be a bit odd,
with only degamma, and no gamma.

Quick grep for drm_crtc_enable_color_mgmt shows that there are other drivers that have CTM and
gamma, but no degamma. I wonder if all those have ctm -> gamma -> out, or are they similar to OMAP DSS.

Any thoughts on how to proceed with this?

Should we have a property that describes the order? Or new property name for gamma before ctm
(PREGAMMA)? Or just have it as degamma, and let the userspace deal with it (i.e. figure out there's
no gamma, but there's degamma, so use degamma)?

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-09-21 11:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 12:53 [PATCH 0/7] drm/omap: misc improvements Tomi Valkeinen
2019-09-02 12:53 ` [PATCH 1/7] drm/omap: drop unneeded locking from mgr_fld_write() Tomi Valkeinen
2019-09-03 14:14   ` Laurent Pinchart
2019-09-02 12:53 ` [PATCH 2/7] drm/omap: tweak HDMI DDC timings Tomi Valkeinen
2019-09-03 14:23   ` Laurent Pinchart
2019-09-26 12:54     ` Tomi Valkeinen
2019-09-26 14:40       ` Alejandro Hernandez
2019-09-02 12:53 ` [PATCH 3/7] drm/omap: fix missing scaler pixel fmt limitations Tomi Valkeinen
2019-09-03 15:12   ` Laurent Pinchart
2019-09-26 12:55     ` Tomi Valkeinen
2019-09-02 12:53 ` [PATCH 4/7] drm/omap: Implement CTM property for CRTC using OVL managers CPR matrix Tomi Valkeinen
2019-09-03 15:24   ` Laurent Pinchart
     [not found]     ` <b44372e2-1bb7-ddb8-d121-ae096b38d918@ti.com>
2019-09-04 11:11       ` Laurent Pinchart
2019-09-04 20:08         ` Jyri Sarha
2019-09-04 20:20           ` Ilia Mirkin
2020-09-21 11:08             ` Tomi Valkeinen [this message]
2020-09-21 11:49               ` Pekka Paalanen
2020-09-22  7:44                 ` Tomi Valkeinen
2020-09-22  9:48                   ` Pekka Paalanen
2020-09-22 10:02                   ` Daniel Stone
2019-09-04 21:52           ` Laurent Pinchart
2019-09-05 10:00             ` Jyri Sarha
2019-09-05 10:05               ` Laurent Pinchart
2019-09-05 13:48                 ` Jyri Sarha
2019-09-02 12:53 ` [PATCH 5/7] drm/omap: Enable COLOR_ENCODING and COLOR_RANGE properties for planes Tomi Valkeinen
2019-09-03 15:32   ` Laurent Pinchart
2019-09-05  9:24     ` Jyri Sarha
2019-09-05  9:43       ` Laurent Pinchart
2019-09-02 12:53 ` [PATCH 6/7] drm/omap: dss: platform_register_drivers() to dss.c and remove core.c Tomi Valkeinen
2019-09-03 15:34   ` Laurent Pinchart
2019-09-04  6:47     ` Jyri Sarha
2019-09-02 12:53 ` [PATCH 7/7] drm/omap: hdmi5: automatically choose limited/full range output Tomi Valkeinen
2019-09-03 15:38   ` Laurent Pinchart

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=5beadfb2-86a5-a782-ff88-ce77c727ecfe@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=jsarha@ti.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=ville.syrjala@linux.intel.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.