All of lore.kernel.org
 help / color / mirror / Atom feed
From: Werner Sembach <wse@tuxedocomputers.com>
To: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v5 17/17] drm/amd/display: Add handling for new "Broadcast RGB" property
Date: Wed, 14 Jul 2021 19:49:02 +0200	[thread overview]
Message-ID: <db3fefc8-5148-06bd-9273-065a1639494f@tuxedocomputers.com> (raw)
In-Reply-To: <20210630151018.330354-18-wse@tuxedocomputers.com>


Am 30.06.21 um 17:10 schrieb Werner Sembach:
> This commit implements the "Broadcast RGB" drm property for the AMD GPU
> driver.
>
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 14 +++++++++++---
>   .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |  4 ++++
>   2 files changed, 15 insertions(+), 3 deletions(-)
>
> 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 02a5809d4993..80d5a11fb0c5 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5247,7 +5247,8 @@ get_aspect_ratio(const struct drm_display_mode *mode_in)
>   }
>   
>   static enum dc_color_space
> -get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing)
> +get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing,
> +		       enum drm_mode_color_range preferred_color_range)
>   {
>   	enum dc_color_space color_space = COLOR_SPACE_SRGB;
>   
> @@ -5278,7 +5279,10 @@ get_output_color_space(const struct dc_crtc_timing *dc_crtc_timing)
>   	}
>   	break;
>   	case PIXEL_ENCODING_RGB:
> -		color_space = COLOR_SPACE_SRGB;
> +		if (preferred_color_range == DRM_MODE_COLOR_RANGE_LIMITED_16_235)
> +			color_space = COLOR_SPACE_SRGB_LIMITED;
> +		else
> +			color_space = COLOR_SPACE_SRGB;
>   		break;

After some testing I found out, that what I did here, was useless.

amdgpu actually never sets the quantization_range range in the 
hdmi_avi_infoframe and from that I guess any quantization range, besides 
the default one, is not implemented in multiple places.

Until limited RGB is properly implemented in amdgpu there kind of is no 
purpose of generalizing the Broadcast RGB switch.

>   
>   	default:
> @@ -5424,7 +5428,10 @@ static void fill_stream_properties_from_drm_display_mode(
>   
>   	timing_out->aspect_ratio = get_aspect_ratio(mode_in);
>   
> -	stream->output_color_space = get_output_color_space(timing_out);
> +	stream->output_color_space = get_output_color_space(timing_out,
> +							    connector_state ?
> +							    connector_state->preferred_color_range :
> +							    DRM_MODE_COLOR_RANGE_UNSET);
>   
>   	stream->out_transfer_func->type = TF_TYPE_PREDEFINED;
>   	stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB;
> @@ -7775,6 +7782,7 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
>   		drm_connector_attach_active_bpc_property(&aconnector->base, 8, 16);
>   		drm_connector_attach_preferred_color_format_property(&aconnector->base);
>   		drm_connector_attach_active_color_format_property(&aconnector->base);
> +		drm_connector_attach_preferred_color_range_property(&aconnector->base);
>   		drm_connector_attach_active_color_range_property(&aconnector->base);
>   	}
>   
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 2563788ba95a..80e1389fd0ec 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -421,6 +421,10 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>   	if (connector->active_color_format_property)
>   		drm_connector_attach_active_color_format_property(&aconnector->base);
>   
> +	connector->preferred_color_range_property = master->base.preferred_color_range_property;
> +	if (connector->preferred_color_range_property)
> +		drm_connector_attach_preferred_color_range_property(&aconnector->base);
> +
>   	connector->active_color_range_property = master->base.active_color_range_property;
>   	if (connector->active_color_range_property)
>   		drm_connector_attach_active_color_range_property(&aconnector->base);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-07-14 17:49 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30 15:10 [PATCH v5 00/17] New uAPI drm properties for color management Werner Sembach
2021-06-30 15:10 ` Werner Sembach
2021-06-30 15:10 ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 01/17] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 02/17] drm/amd/display: Add missing cases convert_dc_color_depth_into_bpc Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 03/17] drm/uAPI: Add "active bpc" as feedback channel for "max bpc" drm property Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-07-01  3:21   ` kernel test robot
2021-06-30 15:10 ` [PATCH v5 04/17] drm/amd/display: Add handling for new "active bpc" property Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 05/17] drm/i915/display: " Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 06/17] drm/uAPI: Add "active color format" drm property as feedback for userspace Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 07/17] drm/amd/display: Add handling for new "active color format" property Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 08/17] drm/i915/display: " Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 09/17] drm/uAPI: Add "active color range" drm property as feedback for userspace Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 10/17] drm/amd/display: Add handling for new "active color range" property Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 11/17] drm/i915/display: " Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 12/17] drm/uAPI: Add "preferred color format" drm property as setting for userspace Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 13/17] drm/amd/display: Add handling for new "preferred color format" property Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 14/17] drm/i915/display: " Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 15/17] drm/uAPI: Move "Broadcast RGB" property from driver specific to general context Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 16/17] drm/i915/display: Use the general "Broadcast RGB" implementation Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-06-30 15:10 ` [PATCH v5 17/17] drm/amd/display: Add handling for new "Broadcast RGB" property Werner Sembach
2021-06-30 15:10   ` Werner Sembach
2021-06-30 15:10   ` [Intel-gfx] " Werner Sembach
2021-07-14 17:49   ` Werner Sembach [this message]
2021-07-14 18:20   ` Werner Sembach
2021-07-14 18:20     ` Werner Sembach
2021-07-14 18:20     ` [Intel-gfx] " Werner Sembach
2021-06-30 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for New uAPI drm properties for color management (rev3) Patchwork
2021-06-30 18:39 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-06-30 19:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-07-01  2:21 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-07-02 21:38 [PATCH v5 03/17] drm/uAPI: Add "active bpc" as feedback channel for "max bpc" drm property kernel test robot
2021-07-03 12:48 ` Dan Carpenter
2021-07-03 12:12 [PATCH v5 12/17] drm/uAPI: Add "preferred color format" drm property as setting for userspace kernel test robot
2021-07-03 13:24 ` Dan Carpenter
2021-07-05 15:51 ` Werner Sembach

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=db3fefc8-5148-06bd-9273-065a1639494f@tuxedocomputers.com \
    --to=wse@tuxedocomputers.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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.