From: Inki Dae <inki.dae@samsung.com>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: linux-samsung-soc@vger.kernel.org,
Shuah Khan <shuahkhan@gmail.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/exynos: dsi: do not try to find bridge
Date: Mon, 19 Jun 2017 11:12:37 +0900 [thread overview]
Message-ID: <59473315.5040802@samsung.com> (raw)
In-Reply-To: <7c884e71-9da3-2106-07e4-b0a717cbad66@osg.samsung.com>
Hi Shuah,
2017년 06월 17일 05:16에 Shuah Khan 이(가) 쓴 글:
> On 06/16/2017 08:16 AM, Shuah Khan wrote:
>> Hi Inki,
>>
>> On Fri, Jun 16, 2017 at 1:50 AM, Inki Dae <inki.dae@samsung.com> wrote:
>>> It doesn't need to try to find a bridge if bridge node doesn't exist.
>>>
>>> Signed-off-by: Inki Dae <inki.dae@samsung.com>
>>> ---
>>> drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 +++++---
>>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>> index d404de8..e337cd2 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>> @@ -1687,9 +1687,11 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
>>> return ret;
>>> }
>>>
>>> - bridge = of_drm_find_bridge(dsi->bridge_node);
>>
>> This is more of question than comment. I am seeing in some places,
>> such as mtk_dpi_probe(), of_node_put() is called right after
>> of_drm_find_bridge() whether or not bridge_node is found.
>>
>> In this case, of_node_put() is done from exynos_dsi_remove() which looks
>> correct to me.
>>
>> However, there is the discrepancy. One of these is incorrect perhaps?
>> When is the right time to call of_node_put()?
No problem but seems more reasonable to call of_node_put() right after of_drm_find_bridge() because there is no reason to keep bridge_node after binding it.
Could you clean up this?
Thanks,
Inki Dae
>>
>>> - if (bridge)
>>> - drm_bridge_attach(encoder, bridge, NULL);
>>> + if (dsi->bridge_node) {
>>> + bridge = of_drm_find_bridge(dsi->bridge_node);
>>> + if (bridge)
>>> + drm_bridge_attach(encoder, bridge, NULL);
>>> + }
>>>
>>> return mipi_dsi_host_register(&dsi->dsi_host);
>>> }
>>> --
>>> 1.9.1
>>
>> Looks good to me.
>>
>> Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
>>
>
> I tested this on odroid-xu4
>
> Tested-by: Shuah Khan <shuahkh@osg.samsung.com>
>
> thanks,
> -- Shuah
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-06-19 2:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170616075016epcas5p34938dd82d07390a03e7690f1634e9229@epcas5p3.samsung.com>
2017-06-16 7:50 ` [PATCH] drm/exynos: dsi: do not try to find bridge Inki Dae
2017-06-16 14:16 ` Shuah Khan
2017-06-16 20:16 ` Shuah Khan
2017-06-19 2:12 ` Inki Dae [this message]
2017-06-19 13:52 ` Shuah Khan
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=59473315.5040802@samsung.com \
--to=inki.dae@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=shuahkhan@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.