From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Fei Shao <fshao@chromium.org>
Cc: chunkuang.hu@kernel.org, p.zabel@pengutronix.de,
airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com,
dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH 3/4] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge()
Date: Thu, 13 Jul 2023 13:13:30 +0200 [thread overview]
Message-ID: <0b45eae2-4081-febe-d062-6475d67a59cf@collabora.com> (raw)
In-Reply-To: <CAC=S1nhePNeKY=q3XofzPcbwvyonz-bSuSLDNgsKx088qB3ZJA@mail.gmail.com>
Il 13/07/23 10:24, Fei Shao ha scritto:
> Hi Angelo,
>
> On Wed, Apr 12, 2023 at 7:53 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Function drm_of_find_panel_or_bridge() is marked as deprecated: since
>> the usage of that in this driver exactly corresponds to the new function
>> devm_drm_of_get_bridge(), switch to it.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> ---
>> drivers/gpu/drm/mediatek/mtk_dpi.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
>> index 6be65ea21f8f..9025111013d3 100644
>> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
>> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
>> @@ -1063,10 +1063,9 @@ static int mtk_dpi_probe(struct platform_device *pdev)
>> if (dpi->irq <= 0)
>> return -EINVAL;
>>
>> - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
>> - NULL, &dpi->next_bridge);
>> - if (ret)
>> - return ret;
>> + dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
>> + if (IS_ERR(dpi->next_bridge))
>> + return PTR_ERR(dpi->next_bridge);
>
> The original code doesn't print any log so it's probably fine, but
> given you're already at it, perhaps you want to also make use of
> dev_err_probe() here?
> devm_drm_of_get_bridge() can also pass -EPROBE_DEFER from its wrapped
> drm_of_find_panel_or_bridge(). Furthermore, that will make the code
> visually align with your previous patch.
>
> But that's just optional, and since this patch works anyway,
>
> Reviewed-by: Fei Shao <fshao@chromium.org>
>
Thanks. Yeah it's a good idea to add an error print... since I will have
to anyway send a v2, I'll add it.
Cheers,
Angelo
>>
>> dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge->of_node);
>>
>> --
>> 2.40.0
>>
>>
>
next prev parent reply other threads:[~2023-07-13 11:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 11:52 [PATCH 0/4] drm/mediatek: Small mtk-dpi cleanups AngeloGioacchino Del Regno
2023-04-12 11:52 ` [PATCH 1/4] drm/mediatek: mtk_dpi: Simplify with devm_drm_bridge_add() AngeloGioacchino Del Regno
2023-07-13 7:55 ` Fei Shao
2023-07-13 11:14 ` AngeloGioacchino Del Regno
2023-04-12 11:52 ` [PATCH 2/4] drm/mediatek: mtk_dpi: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2023-07-13 7:59 ` Fei Shao
2023-04-12 11:52 ` [PATCH 3/4] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge() AngeloGioacchino Del Regno
2023-07-13 8:24 ` Fei Shao
2023-07-13 11:13 ` AngeloGioacchino Del Regno [this message]
2023-04-12 11:52 ` [PATCH 4/4] drm/mediatek: mtk_dpi: Use devm_platform_get_and_ioremap_resource() AngeloGioacchino Del Regno
2023-07-13 8:34 ` Fei Shao
2023-07-13 11:14 ` AngeloGioacchino Del Regno
2023-07-13 7:31 ` [PATCH 0/4] drm/mediatek: Small mtk-dpi cleanups AngeloGioacchino Del Regno
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=0b45eae2-4081-febe-d062-6475d67a59cf@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=airlied@gmail.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fshao@chromium.org \
--cc=kernel@collabora.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=p.zabel@pengutronix.de \
/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®