* [PATCH] drm/exynos: dsi: do not try to find bridge
[not found] <CGME20170616075016epcas5p34938dd82d07390a03e7690f1634e9229@epcas5p3.samsung.com>
@ 2017-06-16 7:50 ` Inki Dae
2017-06-16 14:16 ` Shuah Khan
0 siblings, 1 reply; 5+ messages in thread
From: Inki Dae @ 2017-06-16 7:50 UTC (permalink / raw)
To: dri-devel; +Cc: airlied, linux-samsung-soc, Inki Dae
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);
- 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/exynos: dsi: do not try to find bridge
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
0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2017-06-16 14:16 UTC (permalink / raw)
To: Inki Dae; +Cc: dri-devel, airlied, linux-samsung-soc, shuahkh
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()?
> - 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>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/exynos: dsi: do not try to find bridge
2017-06-16 14:16 ` Shuah Khan
@ 2017-06-16 20:16 ` Shuah Khan
2017-06-19 2:12 ` Inki Dae
0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2017-06-16 20:16 UTC (permalink / raw)
To: Inki Dae; +Cc: Shuah Khan, dri-devel, airlied, linux-samsung-soc, 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()?
>
>> - 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/exynos: dsi: do not try to find bridge
2017-06-16 20:16 ` Shuah Khan
@ 2017-06-19 2:12 ` Inki Dae
2017-06-19 13:52 ` Shuah Khan
0 siblings, 1 reply; 5+ messages in thread
From: Inki Dae @ 2017-06-19 2:12 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-samsung-soc, Shuah Khan, dri-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/exynos: dsi: do not try to find bridge
2017-06-19 2:12 ` Inki Dae
@ 2017-06-19 13:52 ` Shuah Khan
0 siblings, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2017-06-19 13:52 UTC (permalink / raw)
To: Inki Dae; +Cc: Shuah Khan, dri-devel, airlied, linux-samsung-soc
Hi Inki,
On Sun, Jun 18, 2017 at 8:12 PM, Inki Dae <inki.dae@samsung.com> wrote:
> 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
Yes I will take care of cleaning this up.
thanks,
-- Shuah
>
>>>
>>>> - 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
>>
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-19 13:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
2017-06-19 13:52 ` Shuah Khan
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.