From: CK Hu <ck.hu@mediatek.com>
To: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Jitao Shi <jitao.shi@mediatek.com>,
David Airlie <airlied@linux.ie>, <linux-kernel@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
"Rex-BC Chen" <rex-bc.chen@mediatek.com>,
<linux-mediatek@lists.infradead.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/mediatek: mtk-dpi: Set out_fmt from config if not the last bridge
Date: Fri, 16 Jul 2021 13:46:52 +0800 [thread overview]
Message-ID: <1626414412.24603.0.camel@mtksdaap41> (raw)
In-Reply-To: <20210712094657.1159299-1-hsinyi@chromium.org>
Hi, Hsin-yi:
On Mon, 2021-07-12 at 17:46 +0800, Hsin-Yi Wang wrote:
> atomic_get_output_bus_fmts() is only called when the bridge is the last
> element in the bridge chain.
>
> If mtk-dpi is not the last bridge, the format of output_bus_cfg is
> MEDIA_BUS_FMT_FIXED, and mtk_dpi_dual_edge() will fail to write correct
> value to regs.
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Fixes: ec8747c52434 ("drm/mediatek: dpi: Add bus format negotiation")
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index bced555648b01..25c565f9179cc 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -610,6 +610,10 @@ static int mtk_dpi_bridge_atomic_check(struct drm_bridge *bridge,
>
> out_bus_format = bridge_state->output_bus_cfg.format;
>
> + if (out_bus_format == MEDIA_BUS_FMT_FIXED)
> + if (dpi->conf->num_output_fmts)
> + out_bus_format = dpi->conf->output_fmts[0];
> +
> dev_dbg(dpi->dev, "input format 0x%04x, output format 0x%04x\n",
> bridge_state->input_bus_cfg.format,
> bridge_state->output_bus_cfg.format);
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2021-07-16 5:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 9:46 [PATCH] drm/mediatek: mtk-dpi: Set out_fmt from config if not the last bridge Hsin-Yi Wang
2021-07-16 5:46 ` CK Hu [this message]
2021-07-22 14:50 ` Chun-Kuang Hu
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=1626414412.24603.0.camel@mtksdaap41 \
--to=ck.hu@mediatek.com \
--cc=airlied@linux.ie \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hsinyi@chromium.org \
--cc=jitao.shi@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=rex-bc.chen@mediatek.com \
/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;
as well as URLs for NNTP newsgroup(s).