From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Sebastian Wick <sebastian.wick@redhat.com>
Cc: dri-devel@lists.freedesktop.org,
Pekka Paalanen <ppaalanen@gmail.com>,
Uma Shankar <uma.shankar@intel.com>,
amd-gfx@lists.freedesktop.org,
Harry Wentland <harry.wentland@amd.com>,
Joshua Ashton <joshua@froggi.es>,
Vitaly.Prosyak@amd.com
Subject: Re: [PATCH v3 03/17] drm/connector: Deprecate split for BT.2020 in drm_colorspace enum
Date: Thu, 9 Mar 2023 03:10:07 +0200 [thread overview]
Message-ID: <ZAkx76OhkmtY+6Ob@intel.com> (raw)
In-Reply-To: <CA+hFU4y3ekw3wAP2CJaKGF3A-a5hk+rSGZFOsUeZgErvzyf4iQ@mail.gmail.com>
On Thu, Mar 09, 2023 at 02:05:55AM +0100, Sebastian Wick wrote:
> On Wed, Mar 8, 2023 at 10:09 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
> >
> > On Tue, 7 Mar 2023 10:10:53 -0500
> > Harry Wentland <harry.wentland@amd.com> wrote:
> >
> > > From: Joshua Ashton <joshua@froggi.es>
> > >
> > > Userspace has no way of controlling or knowing the pixel encoding
> > > currently, so there is no way for it to ever get the right values here.
> > >
> > > When we do add pixel_encoding control from userspace,we can pick the
> > > right value for the colorimetry packet based on the
> > > pixel_encoding + the colorspace.
> > >
> > > Let's deprecate these values, and have one BT.2020 colorspace entry
> > > that userspace can use.
> > >
> > > v2:
> > > - leave CYCC alone for now; it serves a purpose
> > > - leave BT2020_RGB the new default BT2020
> > >
> > > Signed-off-by: Joshua Ashton <joshua@froggi.es>
> > > Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> > > Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> > >
> > > Cc: Pekka Paalanen <ppaalanen@gmail.com>
> > > Cc: Sebastian Wick <sebastian.wick@redhat.com>
> > > Cc: Vitaly.Prosyak@amd.com
> > > Cc: Uma Shankar <uma.shankar@intel.com>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Cc: Joshua Ashton <joshua@froggi.es>
> > > Cc: dri-devel@lists.freedesktop.org
> > > Cc: amd-gfx@lists.freedesktop.org
> > > ---
> > > drivers/gpu/drm/display/drm_hdmi_helper.c | 7 +++----
> > > drivers/gpu/drm/drm_connector.c | 8 ++++----
> > > drivers/gpu/drm/i915/display/intel_dp.c | 14 +++++++-------
> > > include/drm/drm_connector.h | 15 +++++++++------
> > > 4 files changed, 23 insertions(+), 21 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/display/drm_hdmi_helper.c b/drivers/gpu/drm/display/drm_hdmi_helper.c
> > > index faf5e9efa7d3..05a0d03ffcda 100644
> > > --- a/drivers/gpu/drm/display/drm_hdmi_helper.c
> > > +++ b/drivers/gpu/drm/display/drm_hdmi_helper.c
> > > @@ -97,8 +97,7 @@ EXPORT_SYMBOL(drm_hdmi_infoframe_set_hdr_metadata);
> > > #define HDMI_COLORIMETRY_OPYCC_601 (C(3) | EC(3) | ACE(0))
> > > #define HDMI_COLORIMETRY_OPRGB (C(3) | EC(4) | ACE(0))
> > > #define HDMI_COLORIMETRY_BT2020_CYCC (C(3) | EC(5) | ACE(0))
> > > -#define HDMI_COLORIMETRY_BT2020_RGB (C(3) | EC(6) | ACE(0))
> > > -#define HDMI_COLORIMETRY_BT2020_YCC (C(3) | EC(6) | ACE(0))
> > > +#define HDMI_COLORIMETRY_BT2020 (C(3) | EC(6) | ACE(0))
> > > #define HDMI_COLORIMETRY_DCI_P3_RGB_D65 (C(3) | EC(7) | ACE(0))
> > > #define HDMI_COLORIMETRY_DCI_P3_RGB_THEATER (C(3) | EC(7) | ACE(1))
> > >
> > > @@ -112,8 +111,8 @@ static const u32 hdmi_colorimetry_val[] = {
> > > [DRM_MODE_COLORIMETRY_OPYCC_601] = HDMI_COLORIMETRY_OPYCC_601,
> > > [DRM_MODE_COLORIMETRY_OPRGB] = HDMI_COLORIMETRY_OPRGB,
> > > [DRM_MODE_COLORIMETRY_BT2020_CYCC] = HDMI_COLORIMETRY_BT2020_CYCC,
> > > - [DRM_MODE_COLORIMETRY_BT2020_RGB] = HDMI_COLORIMETRY_BT2020_RGB,
> > > - [DRM_MODE_COLORIMETRY_BT2020_YCC] = HDMI_COLORIMETRY_BT2020_YCC,
> > > + [DRM_MODE_COLORIMETRY_BT2020_DEPRECATED] = HDMI_COLORIMETRY_BT2020,
> > > + [DRM_MODE_COLORIMETRY_BT2020] = HDMI_COLORIMETRY_BT2020,
> > > };
> > >
> > > #undef C
> > > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> > > index 61c29ce74b03..fe7eab15f727 100644
> > > --- a/drivers/gpu/drm/drm_connector.c
> > > +++ b/drivers/gpu/drm/drm_connector.c
> > > @@ -1031,9 +1031,9 @@ static const struct drm_prop_enum_list hdmi_colorspaces[] = {
> > > /* Colorimetry based on ITU-R BT.2020 */
> > > { DRM_MODE_COLORIMETRY_BT2020_CYCC, "BT2020_CYCC" },
> > > /* Colorimetry based on ITU-R BT.2020 */
> > > - { DRM_MODE_COLORIMETRY_BT2020_RGB, "BT2020_RGB" },
> > > + { DRM_MODE_COLORIMETRY_BT2020, "BT2020" },
> > > /* Colorimetry based on ITU-R BT.2020 */
> > > - { DRM_MODE_COLORIMETRY_BT2020_YCC, "BT2020_YCC" },
> > > + { DRM_MODE_COLORIMETRY_BT2020_DEPRECATED, "BT2020_DEPRECATED" },
> > > /* Added as part of Additional Colorimetry Extension in 861.G */
> > > { DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65, "DCI-P3_RGB_D65" },
> > > { DRM_MODE_COLORIMETRY_DCI_P3_RGB_THEATER, "DCI-P3_RGB_Theater" },
> > > @@ -1054,7 +1054,7 @@ static const struct drm_prop_enum_list dp_colorspaces[] = {
> > > /* Colorimetry based on SMPTE RP 431-2 */
> > > { DRM_MODE_COLORIMETRY_DCI_P3_RGB_D65, "DCI-P3_RGB_D65" },
> > > /* Colorimetry based on ITU-R BT.2020 */
> > > - { DRM_MODE_COLORIMETRY_BT2020_RGB, "BT2020_RGB" },
> > > + { DRM_MODE_COLORIMETRY_BT2020, "BT2020" },
> > > { DRM_MODE_COLORIMETRY_BT601_YCC, "BT601_YCC" },
> > > { DRM_MODE_COLORIMETRY_BT709_YCC, "BT709_YCC" },
> > > /* Standard Definition Colorimetry based on IEC 61966-2-4 */
> > > @@ -1068,7 +1068,7 @@ static const struct drm_prop_enum_list dp_colorspaces[] = {
> > > /* Colorimetry based on ITU-R BT.2020 */
> > > { DRM_MODE_COLORIMETRY_BT2020_CYCC, "BT2020_CYCC" },
> > > /* Colorimetry based on ITU-R BT.2020 */
> > > - { DRM_MODE_COLORIMETRY_BT2020_YCC, "BT2020_YCC" },
> > > + { DRM_MODE_COLORIMETRY_BT2020_DEPRECATED, "BT2020_DEPRECATED" },
> >
> > Let's hope no-one complains about missing the old string names in UABI. :-)
> >
> > Actually, you should write in the commit message why removing old names
> > is fine.
>
> Uhm, yeah, I'm just going to do that. This breaks my code! Mutter
> actually uses the strings and not the values.
>
> It's still not clear to me if we want to break backwards compatibility
> or not. This patch definitely does break backwards compatibility but
> it also doesn't get rid of all the other crap, so it's the worst of
> both worlds.
Yeah, why are people still massaging this same turd? Wasn't the
earlier conclusion just to define a new property that controls
both the infoframes/msa/sdp stuff and RGB->YCbCr conversion
(if necessary)?
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-03-09 1:11 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 15:10 [PATCH v3 00/17] Enable Colorspace connector property in amdgpu Harry Wentland
2023-03-07 15:10 ` [PATCH v3 01/17] drm/connector: Convert DRM_MODE_COLORIMETRY to enum Harry Wentland
2023-03-07 15:13 ` Simon Ser
2023-03-07 15:29 ` [PATCH v4 " Harry Wentland
2023-03-08 8:21 ` Pekka Paalanen
2023-03-07 15:10 ` [PATCH v3 02/17] drm/connector: Add enum documentation to drm_colorspace Harry Wentland
2023-03-08 8:59 ` Pekka Paalanen
2023-03-09 0:56 ` Sebastian Wick
2023-03-09 10:03 ` Pekka Paalanen
2023-03-09 20:23 ` Sebastian Wick
2023-05-24 17:00 ` Harry Wentland
2023-03-07 15:10 ` [PATCH v3 03/17] drm/connector: Deprecate split for BT.2020 in drm_colorspace enum Harry Wentland
2023-03-08 9:09 ` Pekka Paalanen
2023-03-09 1:05 ` Sebastian Wick
2023-03-09 1:10 ` Ville Syrjälä [this message]
2023-05-24 17:01 ` Harry Wentland
2023-03-07 15:10 ` [PATCH v3 04/17] drm/connector: Pull out common create_colorspace_property code Harry Wentland
2023-03-07 15:10 ` [PATCH v3 05/17] drm/connector: Use common colorspace_names array Harry Wentland
2023-03-08 9:15 ` Pekka Paalanen
2023-03-09 1:39 ` Sebastian Wick
2023-03-07 15:10 ` [PATCH v3 06/17] drm/connector: Print connector colorspace in state debugfs Harry Wentland
2023-03-08 9:19 ` Pekka Paalanen
2023-03-07 15:10 ` [PATCH v3 07/17] drm/connector: Allow drivers to pass list of supported colorspaces Harry Wentland
2023-03-07 15:10 ` [PATCH v3 08/17] drm/amd/display: Always pass connector_state to stream validation Harry Wentland
2023-03-07 15:10 ` [PATCH v3 09/17] drm/amd/display: Register Colorspace property for DP and HDMI Harry Wentland
2023-03-08 9:24 ` Pekka Paalanen
2023-05-24 18:16 ` Harry Wentland
2023-03-16 0:37 ` Sebastian Wick
2023-03-16 9:50 ` Ville Syrjälä
2023-03-16 10:07 ` Pekka Paalanen
2023-03-16 10:47 ` Ville Syrjälä
2023-03-16 11:34 ` Pekka Paalanen
2023-03-16 12:35 ` Ville Syrjälä
2023-03-16 21:13 ` Sebastian Wick
2023-03-16 23:01 ` Ville Syrjälä
2023-03-17 8:53 ` Pekka Paalanen
2023-03-17 12:50 ` Ville Syrjälä
2023-03-17 13:35 ` Pekka Paalanen
2023-03-17 13:53 ` Joshua Ashton
2023-05-24 19:51 ` Harry Wentland
2023-03-17 14:14 ` Ville Syrjälä
2023-03-17 15:37 ` Pekka Paalanen
2023-03-17 16:33 ` Ville Syrjälä
2023-03-17 17:40 ` Sebastian Wick
2023-03-17 18:38 ` Ville Syrjälä
2023-03-17 18:47 ` Sebastian Wick
2023-03-17 19:13 ` Ville Syrjälä
2023-03-07 15:11 ` [PATCH v3 10/17] drm/amd/display: Signal mode_changed if colorspace changed Harry Wentland
2023-03-07 15:11 ` [PATCH v3 11/17] drm/amd/display: Send correct DP colorspace infopacket Harry Wentland
2023-03-09 1:58 ` Sebastian Wick
2023-03-07 15:11 ` [PATCH v3 12/17] drm/amd/display: Always set crtcinfo from create_stream_for_sink Harry Wentland
2023-03-07 15:11 ` [PATCH v3 13/17] drm/amd/display: Add support for explicit BT601_YCC Harry Wentland
2023-03-07 15:11 ` [PATCH v3 14/17] drm/amd/display: Add debugfs for testing output colorspace Harry Wentland
2023-03-08 9:30 ` Pekka Paalanen
2023-03-09 2:05 ` Sebastian Wick
2023-03-07 15:11 ` [PATCH v3 15/17] drm/amd/display: Add default case for output_color_space switch Harry Wentland
2023-03-08 9:35 ` Pekka Paalanen
2023-03-07 15:11 ` [PATCH v3 16/17] drm/amd/display: Fallback to 2020_YCBCR if the pixel encoding is not RGB Harry Wentland
2023-03-07 15:11 ` [PATCH v3 17/17] drm/amd/display: Refactor avi_info_frame colorimetry determination Harry Wentland
2023-03-08 9:38 ` [PATCH v3 00/17] Enable Colorspace connector property in amdgpu Pekka Paalanen
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=ZAkx76OhkmtY+6Ob@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Vitaly.Prosyak@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=joshua@froggi.es \
--cc=ppaalanen@gmail.com \
--cc=sebastian.wick@redhat.com \
--cc=uma.shankar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox