* [PATCH] drm/of: Consider the state in which the ep is disabled
@ 2020-07-06 7:59 Sandy Huang
2020-07-06 9:47 ` Heiko Stübner
0 siblings, 1 reply; 3+ messages in thread
From: Sandy Huang @ 2020-07-06 7:59 UTC (permalink / raw)
To: heiko, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter
Cc: huangtao, linux-kernel, dri-devel, kever.yang, Sandy Huang, andy.yan
don't mask possible_crtcs if remote-point is disabled.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
---
drivers/gpu/drm/drm_of.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index fdb05fbf72a0..f5f250435add 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -66,6 +66,11 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
uint32_t possible_crtcs = 0;
for_each_endpoint_of_node(port, ep) {
+ if (!of_device_is_available(ep)) {
+ of_node_put(ep);
+ continue;
+ }
+
remote_port = of_graph_get_remote_port(ep);
if (!remote_port) {
of_node_put(ep);
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/of: Consider the state in which the ep is disabled
2020-07-06 7:59 [PATCH] drm/of: Consider the state in which the ep is disabled Sandy Huang
@ 2020-07-06 9:47 ` Heiko Stübner
2020-07-07 11:29 ` Huang Jiachai
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stübner @ 2020-07-06 9:47 UTC (permalink / raw)
To: Sandy Huang
Cc: huangtao, Thomas Zimmermann, David Airlie, kever.yang,
linux-kernel, dri-devel, andy.yan
Hi Sandy,
Am Montag, 6. Juli 2020, 09:59:44 CEST schrieb Sandy Huang:
> don't mask possible_crtcs if remote-point is disabled.
>
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> ---
> drivers/gpu/drm/drm_of.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index fdb05fbf72a0..f5f250435add 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -66,6 +66,11 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
> uint32_t possible_crtcs = 0;
>
> for_each_endpoint_of_node(port, ep) {
> + if (!of_device_is_available(ep)) {
> + of_node_put(ep);
You'd only need the of_node_put here, if you were exiting the loop.
With the "continue" below, the next iteration of for_each_endpoint_of_node
will do the put on "ep"
Heiko
> + continue;
> + }
> +
> remote_port = of_graph_get_remote_port(ep);
> if (!remote_port) {
> of_node_put(ep);
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/of: Consider the state in which the ep is disabled
2020-07-06 9:47 ` Heiko Stübner
@ 2020-07-07 11:29 ` Huang Jiachai
0 siblings, 0 replies; 3+ messages in thread
From: Huang Jiachai @ 2020-07-07 11:29 UTC (permalink / raw)
To: Heiko Stübner
Cc: huangtao, Thomas Zimmermann, David Airlie, kever.yang,
linux-kernel, dri-devel, andy.yan
[-- Attachment #1.1: Type: text/plain, Size: 1418 bytes --]
Hi heiko
在 2020/7/6 17:47, Heiko Stübner 写道:
> Hi Sandy,
>
> Am Montag, 6. Juli 2020, 09:59:44 CEST schrieb Sandy Huang:
>> don't mask possible_crtcs if remote-point is disabled.
>>
>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
>> ---
>> drivers/gpu/drm/drm_of.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
>> index fdb05fbf72a0..f5f250435add 100644
>> --- a/drivers/gpu/drm/drm_of.c
>> +++ b/drivers/gpu/drm/drm_of.c
>> @@ -66,6 +66,11 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev,
>> uint32_t possible_crtcs = 0;
>>
>> for_each_endpoint_of_node(port, ep) {
>> + if (!of_device_is_available(ep)) {
>> + of_node_put(ep);
> You'd only need the of_node_put here, if you were exiting the loop.
>
> With the "continue" below, the next iteration of for_each_endpoint_of_node
> will do the put on "ep"
Just as we communicate on the google talk, the v2 patch will delete
of_node_put(ep) and leave continue, thanks.
>
> Heiko
>
>> + continue;
>> + }
>> +
>> remote_port = of_graph_get_remote_port(ep);
>> if (!remote_port) {
>> of_node_put(ep);
>>
>
>
>
>
>
--
Best Regard
黄家钗
Sandy Huang
Addr: 福州市鼓楼区铜盘路软件大道89号福州软件园A区21号楼(350003)
No. 21 Building, A District, No.89,software Boulevard Fuzhou,Fujian,PRC
Tel:+86 0591-87884919 8690
E-mail:hjc@rock-chips.com
[-- Attachment #1.2: Type: text/html, Size: 2845 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-08 7:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 7:59 [PATCH] drm/of: Consider the state in which the ep is disabled Sandy Huang
2020-07-06 9:47 ` Heiko Stübner
2020-07-07 11:29 ` Huang Jiachai
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).