[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a19cae79-b50b-4faf-a81d-39e00d563053@linaro.org>
Date: Mon, 21 Oct 2024 11:55:53 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Andrzej Hajda <andrzej.hajda@...el.com>, Robert Foss <rfoss@...nel.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Rob Clark <robdclark@...il.com>, Abhinav Kumar <quic_abhinavk@...cinc.com>,
Sean Paul <sean@...rly.run>, Marijn Suijten <marijn.suijten@...ainline.org>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, freedreno@...ts.freedesktop.org
Subject: Re: [PATCH 1/6] drm/display: bridge_connector: handle
ycbcr_420_allowed
On 18/10/2024 23:49, Dmitry Baryshkov wrote:
> Follow the interlace_allowed example and calculate drm_connector's
> ycbcr_420_allowed flag as AND of all drm_bridge's ycbcr_420_allowed
> flags in a chain. This is one of the gaps between several
> bridge-specific connector implementations and drm_bridge_connector.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> ---
> drivers/gpu/drm/display/drm_bridge_connector.c | 6 ++++--
> include/drm/drm_bridge.h | 5 +++++
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c
> index 3da5b8bf8259..320c297008aa 100644
> --- a/drivers/gpu/drm/display/drm_bridge_connector.c
> +++ b/drivers/gpu/drm/display/drm_bridge_connector.c
> @@ -397,11 +397,11 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
> bridge_connector->encoder = encoder;
>
> /*
> - * TODO: Handle doublescan_allowed, stereo_allowed and
> - * ycbcr_420_allowed.
> + * TODO: Handle doublescan_allowed and stereo_allowed.
> */
> connector = &bridge_connector->base;
> connector->interlace_allowed = true;
> + connector->ycbcr_420_allowed = true;
>
> /*
> * Initialise connector status handling. First locate the furthest
> @@ -414,6 +414,8 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *drm,
> drm_for_each_bridge_in_chain(encoder, bridge) {
> if (!bridge->interlace_allowed)
> connector->interlace_allowed = false;
> + if (!bridge->ycbcr_420_allowed)
> + connector->ycbcr_420_allowed = false;
>
> if (bridge->ops & DRM_BRIDGE_OP_EDID)
> bridge_connector->bridge_edid = bridge;
> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index 75019d16be64..e8d735b7f6a4 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -802,6 +802,11 @@ struct drm_bridge {
> * modes.
> */
> bool interlace_allowed;
> + /**
> + * @ycbcr_420_allowed: Indicate that the bridge can handle YCbCr 420
> + * output.
> + */
> + bool ycbcr_420_allowed;
> /**
> * @pre_enable_prev_first: The bridge requires that the prev
> * bridge @pre_enable function is called before its @pre_enable,
>
Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>
Powered by blists - more mailing lists