All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: fix deferred endpoint management
@ 2018-04-17 11:34 ` Philippe Cornu
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Cornu @ 2018-04-17 11:34 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, dri-devel, linux-kernel
  Cc: Alexandre Torgue

When a driver related to one of the endpoints is deferred
due to probe dependencies (i2c, spi...) but the other one
is ready, ltdc probe continues and the deferred driver
will never be probed again.

The fix consists in waiting for all deferred endpoints before
continuing the ltdc probe.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index e3121d9e4230..014cef8cef37 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev)
 						  &bridge[i]);
 
 		/*
-		 * If at least one endpoint is ready, continue probing,
-		 * else if at least one endpoint is -EPROBE_DEFER and
-		 * there is no previous ready endpoints, defer probing.
+		 * If at least one endpoint is -EPROBE_DEFER, defer probing,
+		 * else if at least one endpoint is ready, continue probing.
 		 */
-		if (!ret)
+		if (ret == -EPROBE_DEFER)
+			return ret;
+		else if (!ret)
 			endpoint_not_ready = 0;
-		else if (ret == -EPROBE_DEFER && endpoint_not_ready)
-			endpoint_not_ready = -EPROBE_DEFER;
 	}
 
 	if (endpoint_not_ready)
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] drm/stm: ltdc: fix deferred endpoint management
@ 2018-04-17 11:34 ` Philippe Cornu
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Cornu @ 2018-04-17 11:34 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, dri-devel, linux-kernel
  Cc: Alexandre Torgue

When a driver related to one of the endpoints is deferred
due to probe dependencies (i2c, spi...) but the other one
is ready, ltdc probe continues and the deferred driver
will never be probed again.

The fix consists in waiting for all deferred endpoints before
continuing the ltdc probe.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index e3121d9e4230..014cef8cef37 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev)
 						  &bridge[i]);
 
 		/*
-		 * If at least one endpoint is ready, continue probing,
-		 * else if at least one endpoint is -EPROBE_DEFER and
-		 * there is no previous ready endpoints, defer probing.
+		 * If at least one endpoint is -EPROBE_DEFER, defer probing,
+		 * else if at least one endpoint is ready, continue probing.
 		 */
-		if (!ret)
+		if (ret == -EPROBE_DEFER)
+			return ret;
+		else if (!ret)
 			endpoint_not_ready = 0;
-		else if (ret == -EPROBE_DEFER && endpoint_not_ready)
-			endpoint_not_ready = -EPROBE_DEFER;
 	}
 
 	if (endpoint_not_ready)
-- 
2.15.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/stm: ltdc: fix deferred endpoint management
  2018-04-17 11:34 ` Philippe Cornu
  (?)
@ 2018-04-25  7:12 ` Yannick FERTRE
  2018-04-27 12:59     ` Philippe CORNU
  -1 siblings, 1 reply; 5+ messages in thread
From: Yannick FERTRE @ 2018-04-25  7:12 UTC (permalink / raw)
  To: Philippe CORNU, Benjamin Gaignard, Vincent ABRIOU, David Airlie,
	dri-devel, linux-kernel
  Cc: Alexandre TORGUE

Hi Philippe,

Reviewed-by: Yannick Fertré <yannick.fertre@st.com>


On 04/17/2018 01:34 PM, Philippe Cornu wrote:
> When a driver related to one of the endpoints is deferred
> due to probe dependencies (i2c, spi...) but the other one
> is ready, ltdc probe continues and the deferred driver
> will never be probed again.
> 
> The fix consists in waiting for all deferred endpoints before
> continuing the ltdc probe.
> 
> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index e3121d9e4230..014cef8cef37 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev)
>   						  &bridge[i]);
>   
>   		/*
> -		 * If at least one endpoint is ready, continue probing,
> -		 * else if at least one endpoint is -EPROBE_DEFER and
> -		 * there is no previous ready endpoints, defer probing.
> +		 * If at least one endpoint is -EPROBE_DEFER, defer probing,
> +		 * else if at least one endpoint is ready, continue probing.
>   		 */
> -		if (!ret)
> +		if (ret == -EPROBE_DEFER)
> +			return ret;
> +		else if (!ret)
>   			endpoint_not_ready = 0;
> -		else if (ret == -EPROBE_DEFER && endpoint_not_ready)
> -			endpoint_not_ready = -EPROBE_DEFER;
>   	}
>   
>   	if (endpoint_not_ready)
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/stm: ltdc: fix deferred endpoint management
  2018-04-25  7:12 ` Yannick FERTRE
@ 2018-04-27 12:59     ` Philippe CORNU
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe CORNU @ 2018-04-27 12:59 UTC (permalink / raw)
  To: Yannick FERTRE, Benjamin Gaignard, Vincent ABRIOU, David Airlie,
	dri-devel, linux-kernel
  Cc: Alexandre TORGUE


On 04/25/2018 09:12 AM, Yannick FERTRE wrote:
> Hi Philippe,
> 
> Reviewed-by: Yannick Fertré <yannick.fertre@st.com>

Applied on drm-misc-next.
Many thanks,
Philippe :-)


> 
> 
> On 04/17/2018 01:34 PM, Philippe Cornu wrote:
>> When a driver related to one of the endpoints is deferred
>> due to probe dependencies (i2c, spi...) but the other one
>> is ready, ltdc probe continues and the deferred driver
>> will never be probed again.
>>
>> The fix consists in waiting for all deferred endpoints before
>> continuing the ltdc probe.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
>> ---
>>    drivers/gpu/drm/stm/ltdc.c | 11 +++++------
>>    1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index e3121d9e4230..014cef8cef37 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev)
>>    						  &bridge[i]);
>>    
>>    		/*
>> -		 * If at least one endpoint is ready, continue probing,
>> -		 * else if at least one endpoint is -EPROBE_DEFER and
>> -		 * there is no previous ready endpoints, defer probing.
>> +		 * If at least one endpoint is -EPROBE_DEFER, defer probing,
>> +		 * else if at least one endpoint is ready, continue probing.
>>    		 */
>> -		if (!ret)
>> +		if (ret == -EPROBE_DEFER)
>> +			return ret;
>> +		else if (!ret)
>>    			endpoint_not_ready = 0;
>> -		else if (ret == -EPROBE_DEFER && endpoint_not_ready)
>> -			endpoint_not_ready = -EPROBE_DEFER;
>>    	}
>>    
>>    	if (endpoint_not_ready)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/stm: ltdc: fix deferred endpoint management
@ 2018-04-27 12:59     ` Philippe CORNU
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe CORNU @ 2018-04-27 12:59 UTC (permalink / raw)
  To: Yannick FERTRE, Benjamin Gaignard, Vincent ABRIOU, David Airlie,
	dri-devel, linux-kernel
  Cc: Alexandre TORGUE


On 04/25/2018 09:12 AM, Yannick FERTRE wrote:
> Hi Philippe,
> 
> Reviewed-by: Yannick Fertré <yannick.fertre@st.com>

Applied on drm-misc-next.
Many thanks,
Philippe :-)


> 
> 
> On 04/17/2018 01:34 PM, Philippe Cornu wrote:
>> When a driver related to one of the endpoints is deferred
>> due to probe dependencies (i2c, spi...) but the other one
>> is ready, ltdc probe continues and the deferred driver
>> will never be probed again.
>>
>> The fix consists in waiting for all deferred endpoints before
>> continuing the ltdc probe.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
>> ---
>>    drivers/gpu/drm/stm/ltdc.c | 11 +++++------
>>    1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index e3121d9e4230..014cef8cef37 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -987,14 +987,13 @@ int ltdc_load(struct drm_device *ddev)
>>    						  &bridge[i]);
>>    
>>    		/*
>> -		 * If at least one endpoint is ready, continue probing,
>> -		 * else if at least one endpoint is -EPROBE_DEFER and
>> -		 * there is no previous ready endpoints, defer probing.
>> +		 * If at least one endpoint is -EPROBE_DEFER, defer probing,
>> +		 * else if at least one endpoint is ready, continue probing.
>>    		 */
>> -		if (!ret)
>> +		if (ret == -EPROBE_DEFER)
>> +			return ret;
>> +		else if (!ret)
>>    			endpoint_not_ready = 0;
>> -		else if (ret == -EPROBE_DEFER && endpoint_not_ready)
>> -			endpoint_not_ready = -EPROBE_DEFER;
>>    	}
>>    
>>    	if (endpoint_not_ready)
_______________________________________________
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

end of thread, other threads:[~2018-04-27 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 11:34 [PATCH] drm/stm: ltdc: fix deferred endpoint management Philippe Cornu
2018-04-17 11:34 ` Philippe Cornu
2018-04-25  7:12 ` Yannick FERTRE
2018-04-27 12:59   ` Philippe CORNU
2018-04-27 12:59     ` Philippe CORNU

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.