On Thu, Sep 11, 2025 at 04:07:35PM +0300, Marius Vlad wrote:
> This would please the compiler to have a enum transformation from one to
> another even though the values are the same. It should also make things
> obvious that we use different enums.
> 
> Signed-off-by: Marius Vlad <marius.v...@collabora.com>
> ---
>  .../gpu/drm/display/drm_hdmi_state_helper.c    |  4 +++-
>  drivers/gpu/drm/drm_connector.c                | 18 ++++++++++++++++++
>  include/drm/drm_connector.h                    |  3 +++
>  3 files changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c 
> b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> index f9aa922d25d3..dc2f32651cb9 100644
> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> @@ -653,9 +653,11 @@ hdmi_compute_config(const struct drm_connector 
> *connector,
>                                      conn_state->max_bpc,
>                                      8, connector->max_bpc);
>       int ret;
> +     enum hdmi_colorspace hdmi_colorspace =
> +             color_format_to_hdmi_colorspace(conn_state->color_format);
>  
>       ret = hdmi_compute_format_bpc(connector, conn_state, mode, max_bpc,
> -                                   HDMI_COLORSPACE_RGB);
> +                                   hdmi_colorspace);
>       if (ret) {
>               if (connector->ycbcr_420_allowed) {
>                       ret = hdmi_compute_format_bpc(connector, conn_state,

Does it really make sense to have the fallback to YUV420 here? I would
expect to get rid of it, or only use that for "auto".

Maxime

Attachment: signature.asc
Description: PGP signature

Reply via email to