AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: Harry Wentland <harry.wentland@amd.com>,
	dri-devel@lists.freedesktop.org,  amd-gfx@lists.freedesktop.org
Subject: Re: [RFC PATCH v2 2/9] drm/colorop: Add limited-range YUV-to-RGB CSC FF enum values
Date: Tue, 21 Apr 2026 15:22:50 -0600	[thread overview]
Message-ID: <605bc833-43bd-459b-aac9-c9ea5714fd84@amd.com> (raw)
In-Reply-To: <20260330153451.99472-3-harry.wentland@amd.com>



On 3/30/26 09:34, Harry Wentland wrote:
> Add three new limited-range YUV-to-RGB conversion presets to the
> CSC Fixed-Function colorop enum:
> 
>    - DRM_COLOROP_CSC_FF_YUV601_LIMITED_RGB601
>    - DRM_COLOROP_CSC_FF_YUV709_LIMITED_RGB709
>    - DRM_COLOROP_CSC_FF_YUV2020_LIMITED_RGB2020
> 
> The existing full-range enums (YUV601_RGB601, YUV709_RGB709,
> YUV2020_RGB2020) are kept as-is. The limited-range variants are
> inserted after their corresponding full-range entries.
> 
> This gives drivers the ability to advertise support for both full
> and limited range YCbCr framebuffers via the color pipeline,
> replacing the need for separate COLOR_ENCODING and COLOR_RANGE
> properties on the CSC colorop.
> 
> Assisted-by Claude:claude-opus-4.6

Missing ":" after Assisted-by above

Reviewed-by: Alex Hung <alex.hung@amd.com>
> 
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> ---
>   drivers/gpu/drm/drm_colorop.c | 11 +++++----
>   include/drm/drm_colorop.h     | 42 ++++++++++++++++++++++++++++++-----
>   2 files changed, 43 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
> index 6a345e2e8b15..f0d11cf7e3cd 100644
> --- a/drivers/gpu/drm/drm_colorop.c
> +++ b/drivers/gpu/drm/drm_colorop.c
> @@ -92,10 +92,13 @@ static const struct drm_prop_enum_list drm_colorop_lut3d_interpolation_list[] =
>   };
>   
>   static const char * const colorop_csc_ff_type_names[] = {
> -	[DRM_COLOROP_CSC_FF_YUV601_RGB601]   = "YUV601 to RGB601",
> -	[DRM_COLOROP_CSC_FF_YUV709_RGB709]   = "YUV709 to RGB709",
> -	[DRM_COLOROP_CSC_FF_YUV2020_RGB2020] = "YUV2020 to RGB2020",
> -	[DRM_COLOROP_CSC_FF_RGB709_RGB2020]  = "RGB709 to RGB2020",
> +	[DRM_COLOROP_CSC_FF_YUV601_RGB601]           = "YUV601 to RGB601",
> +	[DRM_COLOROP_CSC_FF_YUV601_LIMITED_RGB601]    = "YUV601 Limited to RGB601",
> +	[DRM_COLOROP_CSC_FF_YUV709_RGB709]            = "YUV709 to RGB709",
> +	[DRM_COLOROP_CSC_FF_YUV709_LIMITED_RGB709]    = "YUV709 Limited to RGB709",
> +	[DRM_COLOROP_CSC_FF_YUV2020_RGB2020]          = "YUV2020 to RGB2020",
> +	[DRM_COLOROP_CSC_FF_YUV2020_LIMITED_RGB2020]  = "YUV2020 Limited to RGB2020",
> +	[DRM_COLOROP_CSC_FF_RGB709_RGB2020]           = "RGB709 to RGB2020",
>   };
>   
>   /* Init Helpers */
> diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
> index 2cd8e0779c2a..c414b9070afb 100644
> --- a/include/drm/drm_colorop.h
> +++ b/include/drm/drm_colorop.h
> @@ -145,31 +145,61 @@ enum drm_colorop_csc_ff_type {
>   	 *
>   	 * enum string "YUV601 to RGB601"
>   	 *
> -	 * Selects the fixed-function CSC preset that converts YUV
> -	 * (BT.601) colorimetry to RGB (BT.601).
> +	 * Selects the fixed-function CSC preset that converts full-range
> +	 * YUV (BT.601) colorimetry to RGB (BT.601).
>   	 */
>   	DRM_COLOROP_CSC_FF_YUV601_RGB601,
>   
> +	/**
> +	 * @DRM_COLOROP_CSC_FF_YUV601_LIMITED_RGB601:
> +	 *
> +	 * enum string "YUV601 Limited to RGB601"
> +	 *
> +	 * Selects the fixed-function CSC preset that converts limited-range
> +	 * YUV (BT.601) colorimetry to RGB (BT.601).
> +	 */
> +	DRM_COLOROP_CSC_FF_YUV601_LIMITED_RGB601,
> +
>   	/**
>   	 * @DRM_COLOROP_CSC_FF_YUV709_RGB709:
>   	 *
>   	 * enum string "YUV709 to RGB709"
>   	 *
> -	 * Selects the fixed-function CSC preset that converts YUV
> -	 * (BT.709) colorimetry to RGB (BT.709).
> +	 * Selects the fixed-function CSC preset that converts full-range
> +	 * YUV (BT.709) colorimetry to RGB (BT.709).
>   	 */
>   	DRM_COLOROP_CSC_FF_YUV709_RGB709,
>   
> +	/**
> +	 * @DRM_COLOROP_CSC_FF_YUV709_LIMITED_RGB709:
> +	 *
> +	 * enum string "YUV709 Limited to RGB709"
> +	 *
> +	 * Selects the fixed-function CSC preset that converts limited-range
> +	 * YUV (BT.709) colorimetry to RGB (BT.709).
> +	 */
> +	DRM_COLOROP_CSC_FF_YUV709_LIMITED_RGB709,
> +
>   	/**
>   	 * @DRM_COLOROP_CSC_FF_YUV2020_RGB2020:
>   	 *
>   	 * enum string "YUV2020 to RGB2020"
>   	 *
> -	 * Selects the fixed-function CSC preset that converts YUV
> -	 * (BT.2020) colorimetry to RGB (BT.2020).
> +	 * Selects the fixed-function CSC preset that converts full-range
> +	 * YUV (BT.2020) colorimetry to RGB (BT.2020).
>   	 */
>   	DRM_COLOROP_CSC_FF_YUV2020_RGB2020,
>   
> +	/**
> +	 * @DRM_COLOROP_CSC_FF_YUV2020_LIMITED_RGB2020:
> +	 *
> +	 * enum string "YUV2020 Limited to RGB2020"
> +	 *
> +	 * Selects the fixed-function CSC preset that converts limited-range
> +	 * YUV (BT.2020) colorimetry to RGB (BT.2020).
> +	 */
> +	DRM_COLOROP_CSC_FF_YUV2020_LIMITED_RGB2020,
> +
>   	/**
>   	 * @DRM_COLOROP_CSC_FF_RGB709_RGB2020:
>   	 *


  reply	other threads:[~2026-04-21 21:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 15:34 [RFC PATCH v2 0/9] YUV conversion colorop with amdgpu and VKMS Harry Wentland
2026-03-30 15:34 ` [RFC PATCH v2 1/9] drm/colorop: Add DRM_COLOROP_CSC_FF Harry Wentland
2026-04-08 11:31   ` Borah, Chaitanya Kumar
2026-03-30 15:34 ` [RFC PATCH v2 2/9] drm/colorop: Add limited-range YUV-to-RGB CSC FF enum values Harry Wentland
2026-04-21 21:22   ` Alex Hung [this message]
2026-04-23  9:34   ` Borah, Chaitanya Kumar
2026-04-30 18:19     ` Harry Wentland
2026-05-05 10:17       ` Borah, Chaitanya Kumar
2026-03-30 15:34 ` [RFC PATCH v2 3/9] drm/vkms: Add CSC FF colorop to color pipeline Harry Wentland
2026-04-21 21:21   ` Alex Hung
2026-03-30 15:34 ` [RFC PATCH v2 4/9] drm/vkms: Add atomic check and matrix handling for CSC FF colorop Harry Wentland
2026-04-21 21:20   ` Alex Hung
2026-03-30 15:34 ` [RFC PATCH v2 5/9] drm/amd/display: Add CSC FF colorop to color pipeline Harry Wentland
2026-04-21 21:14   ` Alex Hung
2026-03-30 15:34 ` [RFC PATCH v2 6/9] drm/amd/display: Implement CSC FF colorop color space mapping Harry Wentland
2026-04-21 21:13   ` Alex Hung
2026-03-30 15:34 ` [RFC PATCH v2 7/9] drm/amd/display: Use GAMCOR for first TF if CSC is used Harry Wentland
2026-04-21 21:08   ` Alex Hung
2026-04-30 20:43     ` Harry Wentland
2026-04-24 14:48   ` Melissa Wen
2026-03-30 15:34 ` [RFC PATCH v2 8/9] drm/amd/display: Check actual state during commit_tail Harry Wentland
2026-04-21 21:12   ` Alex Hung
2026-05-01 16:03     ` Harry Wentland
2026-03-30 15:34 ` [RFC PATCH v2 9/9] drm/amd/display: Set color_space to plane_infos Harry Wentland
2026-04-21 21:23   ` Alex Hung
2026-04-22 21:40 ` [RFC PATCH v2 0/9] YUV conversion colorop with amdgpu and VKMS Melissa Wen

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=605bc833-43bd-459b-aac9-c9ea5714fd84@amd.com \
    --to=alex.hung@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.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