From: Pekka Paalanen <ppaalanen@gmail.com>
To: Joshua Ashton <joshua@froggi.es>
Cc: Sebastian Wick <sebastian.wick@redhat.com>,
Harry Wentland <harry.wentland@amd.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
Vitaly.Prosyak@amd.com
Subject: Re: [PATCH v2 18/21] drm/amd/display: Fallback to 2020_YCBCR if the pixel encoding is not RGB
Date: Tue, 7 Feb 2023 14:42:21 +0200 [thread overview]
Message-ID: <20230207144221.61eec592@eldfell> (raw)
In-Reply-To: <79ca3c26-11e8-0dad-641d-af21ec557d07@froggi.es>
[-- Attachment #1: Type: text/plain, Size: 3426 bytes --]
On Wed, 25 Jan 2023 12:59:53 +0000
Joshua Ashton <joshua@froggi.es> wrote:
> On 1/23/23 20:30, Sebastian Wick wrote:
> > A new property to control YCC and subsampling would be the more
> > complete path here. If we actually want to fix this in the short-term
> > though, we should handle the YCC and RGB Colorspace values as
> > equivalent, everywhere. Technically we're breaking the user space API
> > here so it should be documented on the KMS property and other drivers
> > must be adjusted accordingly as well.
>
> I am happy with treating 2020_YCC and 2020_RGB as the same.
>
> I think having the YCC/RGB split here in Colorspace is a mistake.
> Pixel encoding should be completely separate from colorspace from a uAPI
> perspective when we want to expose that.
> It's just a design flaw from when it was added as it just mirrors the
> values in the colorimetry packets 1:1. I understand why this happened,
> and I don't think it's a big deal for us to correct ourselves now:
>
> I suggest we deprecate the _YCC variants, treat them the same as the RGB
> enum to avoid any potential uAPI breakage and key the split entirely off
> the pixel_encoding value.
>
> That way when we do want to plumb more explicit pixel encoding down the
> line, userspace only has to manage one thing. There's no advantage for
> anything more here.
Sounds good to me!
Thanks,
pq
>
> - Joshie 🐸✨
>
> >
> > On Fri, Jan 13, 2023 at 5:26 PM Harry Wentland <harry.wentland@amd.com> wrote:
> >>
> >> From: Joshua Ashton <joshua@froggi.es>
> >>
> >> Userspace might not aware whether we're sending RGB or YCbCr
> >> data to the display. If COLOR_SPACE_2020_RGB_FULLRANGE is
> >> requested but the output encoding is YCbCr we should
> >> send COLOR_SPACE_2020_YCBCR.
> >>
> >> Signed-off-by: Joshua Ashton <joshua@froggi.es>
> >> Signed-off-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: Joshua Ashton <joshua@froggi.es>
> >> Cc: dri-devel@lists.freedesktop.org
> >> Cc: amd-gfx@lists.freedesktop.org
> >> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> >> ---
> >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> index f74b125af31f..16940ea61b59 100644
> >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> @@ -5184,7 +5184,10 @@ get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing,
> >> color_space = COLOR_SPACE_ADOBERGB;
> >> break;
> >> case DRM_MODE_COLORIMETRY_BT2020_RGB:
> >> - color_space = COLOR_SPACE_2020_RGB_FULLRANGE;
> >> + if (dc_crtc_timing->pixel_encoding == PIXEL_ENCODING_RGB)
> >> + color_space = COLOR_SPACE_2020_RGB_FULLRANGE;
> >> + else
> >> + color_space = COLOR_SPACE_2020_YCBCR;
> >> break;
> >> case DRM_MODE_COLORIMETRY_BT2020_YCC:
> >> color_space = COLOR_SPACE_2020_YCBCR;
> >> --
> >> 2.39.0
> >>
> >
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Joshua Ashton <joshua@froggi.es>
Cc: Sebastian Wick <sebastian.wick@redhat.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
Vitaly.Prosyak@amd.com
Subject: Re: [PATCH v2 18/21] drm/amd/display: Fallback to 2020_YCBCR if the pixel encoding is not RGB
Date: Tue, 7 Feb 2023 14:42:21 +0200 [thread overview]
Message-ID: <20230207144221.61eec592@eldfell> (raw)
In-Reply-To: <79ca3c26-11e8-0dad-641d-af21ec557d07@froggi.es>
[-- Attachment #1: Type: text/plain, Size: 3426 bytes --]
On Wed, 25 Jan 2023 12:59:53 +0000
Joshua Ashton <joshua@froggi.es> wrote:
> On 1/23/23 20:30, Sebastian Wick wrote:
> > A new property to control YCC and subsampling would be the more
> > complete path here. If we actually want to fix this in the short-term
> > though, we should handle the YCC and RGB Colorspace values as
> > equivalent, everywhere. Technically we're breaking the user space API
> > here so it should be documented on the KMS property and other drivers
> > must be adjusted accordingly as well.
>
> I am happy with treating 2020_YCC and 2020_RGB as the same.
>
> I think having the YCC/RGB split here in Colorspace is a mistake.
> Pixel encoding should be completely separate from colorspace from a uAPI
> perspective when we want to expose that.
> It's just a design flaw from when it was added as it just mirrors the
> values in the colorimetry packets 1:1. I understand why this happened,
> and I don't think it's a big deal for us to correct ourselves now:
>
> I suggest we deprecate the _YCC variants, treat them the same as the RGB
> enum to avoid any potential uAPI breakage and key the split entirely off
> the pixel_encoding value.
>
> That way when we do want to plumb more explicit pixel encoding down the
> line, userspace only has to manage one thing. There's no advantage for
> anything more here.
Sounds good to me!
Thanks,
pq
>
> - Joshie 🐸✨
>
> >
> > On Fri, Jan 13, 2023 at 5:26 PM Harry Wentland <harry.wentland@amd.com> wrote:
> >>
> >> From: Joshua Ashton <joshua@froggi.es>
> >>
> >> Userspace might not aware whether we're sending RGB or YCbCr
> >> data to the display. If COLOR_SPACE_2020_RGB_FULLRANGE is
> >> requested but the output encoding is YCbCr we should
> >> send COLOR_SPACE_2020_YCBCR.
> >>
> >> Signed-off-by: Joshua Ashton <joshua@froggi.es>
> >> Signed-off-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: Joshua Ashton <joshua@froggi.es>
> >> Cc: dri-devel@lists.freedesktop.org
> >> Cc: amd-gfx@lists.freedesktop.org
> >> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> >> ---
> >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> index f74b125af31f..16940ea61b59 100644
> >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> @@ -5184,7 +5184,10 @@ get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing,
> >> color_space = COLOR_SPACE_ADOBERGB;
> >> break;
> >> case DRM_MODE_COLORIMETRY_BT2020_RGB:
> >> - color_space = COLOR_SPACE_2020_RGB_FULLRANGE;
> >> + if (dc_crtc_timing->pixel_encoding == PIXEL_ENCODING_RGB)
> >> + color_space = COLOR_SPACE_2020_RGB_FULLRANGE;
> >> + else
> >> + color_space = COLOR_SPACE_2020_YCBCR;
> >> break;
> >> case DRM_MODE_COLORIMETRY_BT2020_YCC:
> >> color_space = COLOR_SPACE_2020_YCBCR;
> >> --
> >> 2.39.0
> >>
> >
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-02-07 12:42 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 16:24 [PATCH v2 00/21] Enable Colorspace connector property in amdgpu Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 01/21] drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 02/21] drm/connector: print max_requested_bpc in state debugfs Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 03/21] drm/connector: Drop COLORIMETRY_NO_DATA Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 04/21] drm/connector: Convert DRM_MODE_COLORIMETRY to enum Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 19:31 ` Simon Ser
2023-01-13 16:24 ` [PATCH v2 05/21] drm/connector: Pull out common create_colorspace_property code Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 06/21] drm/connector: Allow drivers to pass list of supported colorspaces Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 07/21] drm/connector: Print connector colorspace in state debugfs Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 08/21] drm/amd/display: Always pass connector_state to stream validation Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 09/21] drm/amd/display: Register Colorspace property for DP and HDMI Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 10/21] drm/amd/display: Signal mode_changed if colorspace changed Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-24 15:26 ` Leo Li
2023-01-24 15:26 ` Leo Li
2023-01-13 16:24 ` [PATCH v2 11/21] drm/amd/display: Send correct DP colorspace infopacket Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 12/21] drm/amd/display: Always set crtcinfo from create_stream_for_sink Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 13/21] drm/amd/display: Add support for explicit BT601_YCC Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 14/21] drm/amd/display: Add debugfs for testing output colorspace Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 15/21] drm/amd/display: Add default case for output_color_space switch Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 16/21] drm/amd/display: Don't restrict bpc to 8 bpc Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 17/21] drm/amd/display: Format input and output CSC matrix Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-24 15:12 ` Leo Li
2023-01-13 16:24 ` [PATCH v2 18/21] drm/amd/display: Fallback to 2020_YCBCR if the pixel encoding is not RGB Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-23 20:30 ` Sebastian Wick
2023-01-24 15:37 ` Harry Wentland
2023-01-24 18:57 ` Harry Wentland
2023-01-26 1:48 ` Sebastian Wick
2023-01-25 12:59 ` Joshua Ashton
2023-01-26 1:38 ` Sebastian Wick
2023-01-26 1:38 ` Sebastian Wick
2023-02-07 12:42 ` Pekka Paalanen [this message]
2023-02-07 12:42 ` Pekka Paalanen
2023-01-13 16:24 ` [PATCH v2 19/21] drm/amd/display: Refactor avi_info_frame colorimetry determination Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 20/21] drm/amd/display: Calculate output_color_space after pixel encoding adjustment Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-01-13 16:24 ` [PATCH v2 21/21] drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix Harry Wentland
2023-01-13 16:24 ` Harry Wentland
2023-02-07 12:47 ` [PATCH v2 00/21] Enable Colorspace connector property in amdgpu Pekka Paalanen
2023-02-07 12:47 ` Pekka Paalanen
2023-02-18 10:33 ` Hans Verkuil
2023-03-21 13:12 ` Sebastian Wick
2023-03-21 13:12 ` Sebastian Wick
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=20230207144221.61eec592@eldfell \
--to=ppaalanen@gmail.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=sebastian.wick@redhat.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.