[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgA+lcSNaQ2x4Wef@ravnborg.org>
Date: Sun, 6 Feb 2022 22:33:09 +0100
From: Sam Ravnborg <sam@...nborg.org>
To: Neil Armstrong <narmstrong@...libre.com>
Cc: robert.foss@...aro.org, jernej.skrabec@...il.com, jonas@...boo.se,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
kieran.bingham@...asonboard.com,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Laurent.pinchart@...asonboard.com, biju.das.jz@...renesas.com
Subject: Re: [PATCH v3] drm/bridge: dw-hdmi: use safe format when first in
bridge chain
Hi Neail,
On Fri, Feb 04, 2022 at 03:33:37PM +0100, Neil Armstrong wrote:
> When the dw-hdmi bridge is in first place of the bridge chain, this
> means there is no way to select an input format of the dw-hdmi HW
> component.
>
> Since introduction of display-connector, negotiation was broken since
> the dw-hdmi negotiation code only worked when the dw-hdmi bridge was
> in last position of the bridge chain or behind another bridge also
> supporting input & output format negotiation.
>
> Commit 7cd70656d128 ("drm/bridge: display-connector: implement bus fmts callbacks")
> was introduced to make negotiation work again by making display-connector
> act as a pass-through concerning input & output format negotiation.
>
> But in the case where the dw-hdmi is single in the bridge chain, for
> example on Renesas SoCs, with the display-connector bridge the dw-hdmi
> is no more single, breaking output format.
I have forgotten all the details during my leave from drm, so I
may miss something obvious.
This fix looks like it papers over some general thingy with the
format negotiation.
We do not want to see the below in all display drivers, so
I assume the right fix is to stuff it in somewhere in the framework.
Or do I miss something?
Sam
>
> Reported-by: Biju Das <biju.das.jz@...renesas.com>
> Bisected-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
> Tested-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
> Fixes: 7cd70656d128 ("drm/bridge: display-connector: implement bus fmts callbacks").
> Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
> Reviewed-by: Robert Foss <robert.foss@...aro.org>
> ---
> Changes since v2:
> - Add rob's r-b
> - Fix invalid Fixes commit hash
>
> Changes since v1:
> - Remove bad fix in dw_hdmi_bridge_atomic_get_input_bus_fmts
> - Fix typos in commit message
>
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 54d8fdad395f..97cdc61b57f6 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2551,8 +2551,9 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
> if (!output_fmts)
> return NULL;
>
> - /* If dw-hdmi is the only bridge, avoid negociating with ourselves */
> - if (list_is_singular(&bridge->encoder->bridge_chain)) {
> + /* If dw-hdmi is the first or only bridge, avoid negociating with ourselves */
> + if (list_is_singular(&bridge->encoder->bridge_chain) ||
> + list_is_first(&bridge->chain_node, &bridge->encoder->bridge_chain)) {
> *num_output_fmts = 1;
> output_fmts[0] = MEDIA_BUS_FMT_FIXED;
>
> --
> 2.25.1
Powered by blists - more mailing lists