From: Neil Armstrong <narmstrong@baylibre.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Robert Foss <robert.foss@linaro.org>,
Paul Boddie <paul@boddie.org.uk>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Paul Cercueil <paul@crapouillou.net>,
Maxime Ripard <maxime@cerno.tech>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: letux-kernel@openphoenux.org, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Jonas Karlman <jonas@kwiboo.se>
Subject: Re: [PATCH v16 4/4] drm/bridge: dw-hdmi: fix bus formats negotiation for 8 bit modes
Date: Tue, 1 Mar 2022 10:18:09 +0100 [thread overview]
Message-ID: <5da069b6-8a99-79c2-109c-c85715165857@baylibre.com> (raw)
In-Reply-To: <169afe64b4985c3f420177cd6f4e1e72feeb2449.1645895582.git.hns@goldelico.com>
Hi,
On 26/02/2022 18:13, H. Nikolaus Schaller wrote:
> Commit 7cd70656d1285b ("drm/bridge: display-connector: implement bus fmts callbacks")
>
> introduced a new mechanism to negotiate bus formats between hdmi connectors
> and bridges which is to be used e.g. for the jz4780 based CI20 board.
>
> In this case dw-hdmi sets up a list of formats in
> dw_hdmi_bridge_atomic_get_output_bus_fmts().
>
> This includes e.g. MEDIA_BUS_FMT_UYVY8_1X16 which is chosen for the CI20 but
> only produces a black screen.
>
> Analysis revealed an omission in
>
> Commit 6c3c719936dafe ("drm/bridge: synopsys: dw-hdmi: add bus format negociation")
>
> to check for 8 bit with when adding UYVY8 or YUV8 formats.
>
> This fix is based on the observation that max_bpc = 0 when running this
> function while info->bpc = 8.
In fact if bpc = 0, it should be considered as 8, so the issue is elsewhere.
>
> Adding the proposed patch makes the jz4780/CI20 panel work again with default
> MEDIA_BUS_FMT_RGB888_1X24 mode.
>
> Fixes: 7cd70656d1285b ("drm/bridge: display-connector: implement bus fmts callbacks")
> Fixes: 6c3c719936dafe ("drm/bridge: synopsys: dw-hdmi: add bus format negociation")
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 43e375da131e8..c08e2cc96584c 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2621,11 +2621,13 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
> output_fmts[i++] = MEDIA_BUS_FMT_RGB101010_1X30;
> }
>
> - if (info->color_formats & DRM_COLOR_FORMAT_YCBCR422)
> - output_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16;
> + if (max_bpc >= 8 && info->bpc >= 8) {
> + if (info->color_formats & DRM_COLOR_FORMAT_YCBCR422)
> + output_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16;
>
> - if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
> - output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;
> + if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444)
> + output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24;
> + }
It should not select YUV here if it's not possible, so something is wrong.
Can you check if https://lore.kernel.org/r/20220119123656.1456355-2-narmstrong@baylibre.com fixes this issue instead ?
Neil
>
> /* Default 8bit RGB fallback */
> output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
next prev parent reply other threads:[~2022-03-01 9:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 17:12 [PATCH v16 0/4] MIPS: JZ4780 and CI20 HDMI H. Nikolaus Schaller
2022-02-26 17:12 ` [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() H. Nikolaus Schaller
2022-03-03 16:23 ` Neil Armstrong
2022-03-03 16:30 ` H. Nikolaus Schaller
2022-03-03 16:43 ` [Letux-kernel] " H. Nikolaus Schaller
2022-03-03 16:51 ` Paul Cercueil
2022-03-03 17:09 ` H. Nikolaus Schaller
2022-03-03 17:20 ` Paul Cercueil
2022-03-03 17:59 ` H. Nikolaus Schaller
2022-03-04 13:30 ` Neil Armstrong
2022-03-04 16:47 ` Paul Cercueil
2022-03-04 17:51 ` H. Nikolaus Schaller
2022-03-04 18:04 ` Paul Cercueil
2022-03-04 18:15 ` H. Nikolaus Schaller
2022-03-04 18:33 ` Paul Cercueil
2022-03-04 18:41 ` H. Nikolaus Schaller
2022-03-05 7:49 ` H. Nikolaus Schaller
2022-03-03 16:46 ` Paul Cercueil
2022-03-03 17:05 ` H. Nikolaus Schaller
2022-02-26 17:13 ` [PATCH v16 2/4] drm/ingenic: Add dw-hdmi driver specialization for jz4780 H. Nikolaus Schaller
2022-02-26 17:13 ` [PATCH v16 3/4] drm/bridge: display-connector: add ddc-en gpio support H. Nikolaus Schaller
2022-02-26 17:13 ` [PATCH v16 4/4] drm/bridge: dw-hdmi: fix bus formats negotiation for 8 bit modes H. Nikolaus Schaller
2022-03-01 9:18 ` Neil Armstrong [this message]
2022-03-01 20:37 ` H. Nikolaus Schaller
2022-03-02 10:25 ` Neil Armstrong
2022-03-02 11:15 ` H. Nikolaus Schaller
2022-03-02 14:34 ` Neil Armstrong
2022-03-02 22:24 ` H. Nikolaus Schaller
2022-03-03 8:35 ` Neil Armstrong
2022-03-03 10:40 ` H. Nikolaus Schaller
2022-03-03 11:42 ` Neil Armstrong
2022-03-03 11:45 ` H. Nikolaus Schaller
2022-03-03 15:37 ` H. Nikolaus Schaller
2022-03-03 16:14 ` Neil Armstrong
2022-03-03 15:15 ` Paul Cercueil
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=5da069b6-8a99-79c2-109c-c85715165857@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hns@goldelico.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=letux-kernel@openphoenux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=paul@boddie.org.uk \
--cc=paul@crapouillou.net \
--cc=robert.foss@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®