diff mbox series

drm/vc4: Fix with pm_runtime synchronization on DSI

Message ID 20190329012913.29538-1-hoegeun.kwon@samsung.com (mailing list archive)
State New, archived
Headers show
Series drm/vc4: Fix with pm_runtime synchronization on DSI | expand

Commit Message

Hoegeun Kwon March 29, 2019, 1:29 a.m. UTC
There is a problem when often dpms goes from off to on. pm idle is not
in sync and the problem occurs. Modify pm_runtime_put from
asynchronous to synchronous.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
---
 drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Anholt April 1, 2019, 5:48 p.m. UTC | #1
Hoegeun Kwon <hoegeun.kwon@samsung.com> writes:

> There is a problem when often dpms goes from off to on. pm idle is not
> in sync and the problem occurs. Modify pm_runtime_put from
> asynchronous to synchronous.

Why would we need the power domain to go to off before we try to come
back?  Any idea?  Also, please specify what "the problem" is.

>
> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
> ---
>  drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
> index 11702e1d9011..b0264c7b8bed 100644
> --- a/drivers/gpu/drm/vc4/vc4_dsi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
> @@ -822,7 +822,7 @@ static void vc4_dsi_encoder_disable(struct drm_encoder *encoder)
>  	clk_disable_unprepare(dsi->escape_clock);
>  	clk_disable_unprepare(dsi->pixel_clock);
>  
> -	pm_runtime_put(dev);
> +	pm_runtime_put_sync(dev);
>  }
>  
>  /* Extends the mode's blank intervals to handle BCM2835's integer-only
> -- 
> 2.17.1
Hoegeun Kwon April 8, 2019, 1:05 a.m. UTC | #2
On 4/2/19 2:48 AM, Eric Anholt wrote:
> Hoegeun Kwon <hoegeun.kwon@samsung.com> writes:
>
>> There is a problem when often dpms goes from off to on. pm idle is not
>> in sync and the problem occurs. Modify pm_runtime_put from
>> asynchronous to synchronous.
> Why would we need the power domain to go to off before we try to come
> back?  Any idea?  Also, please specify what "the problem" is.

Hi Eric,


First thank you for your review.

There is a problem failed to runtime PM enable on DSI when often dpms

goes from off to on. The cause of this problem is that when we put pm idle,

I think that there is a timing problem if I do not sync.


Best regards,

Hoegeun


>
>> Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
>> ---
>>   drivers/gpu/drm/vc4/vc4_dsi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
>> index 11702e1d9011..b0264c7b8bed 100644
>> --- a/drivers/gpu/drm/vc4/vc4_dsi.c
>> +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
>> @@ -822,7 +822,7 @@ static void vc4_dsi_encoder_disable(struct drm_encoder *encoder)
>>   	clk_disable_unprepare(dsi->escape_clock);
>>   	clk_disable_unprepare(dsi->pixel_clock);
>>   
>> -	pm_runtime_put(dev);
>> +	pm_runtime_put_sync(dev);
>>   }
>>   
>>   /* Extends the mode's blank intervals to handle BCM2835's integer-only
>> -- 
>> 2.17.1
Eric Anholt April 9, 2019, 4:24 p.m. UTC | #3
Hoegeun Kwon <hoegeun.kwon@samsung.com> writes:

> On 4/2/19 2:48 AM, Eric Anholt wrote:
>> Hoegeun Kwon <hoegeun.kwon@samsung.com> writes:
>>
>>> There is a problem when often dpms goes from off to on. pm idle is not
>>> in sync and the problem occurs. Modify pm_runtime_put from
>>> asynchronous to synchronous.
>> Why would we need the power domain to go to off before we try to come
>> back?  Any idea?  Also, please specify what "the problem" is.
>
> Hi Eric,
>
>
> First thank you for your review.
>
> There is a problem failed to runtime PM enable on DSI when often dpms

What do you mean by "failed to runtime PM enable"?  The
pm_runtime_enable() returned an error?  Have you investigated the source
that error, if so?
Hoegeun Kwon May 22, 2019, 10:24 a.m. UTC | #4
On 4/10/19 1:24 AM, Eric Anholt wrote:
> Hoegeun Kwon <hoegeun.kwon@samsung.com> writes:
>
>> On 4/2/19 2:48 AM, Eric Anholt wrote:
>>> Hoegeun Kwon <hoegeun.kwon@samsung.com> writes:
>>>
>>>> There is a problem when often dpms goes from off to on. pm idle is not
>>>> in sync and the problem occurs. Modify pm_runtime_put from
>>>> asynchronous to synchronous.
>>> Why would we need the power domain to go to off before we try to come
>>> back?  Any idea?  Also, please specify what "the problem" is.
>> Hi Eric,
>>
>>
>> First thank you for your review.
>>
>> There is a problem failed to runtime PM enable on DSI when often dpms
> What do you mean by "failed to runtime PM enable"?  The
> pm_runtime_enable() returned an error?  Have you investigated the source
> that error, if so?

I'm sorry for the late reply.

The pm_runtime_enable() is not returned because return value is void.

The problem is that if the error log is not output
and the DPMS off on is repeated, the screen will stop.

As a result of debugging the problem, I think that synchronization
is a problem caused by dsi pm_suspend and resume.

So when we entered the pm runtime idle state, if used with sync,
the problem does not occur.

Best regards,
Hoegeun
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 4/10/19 1:24 AM, Eric Anholt wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:87ftqrno2v.fsf@anholt.net">
      <pre class="moz-quote-pre" wrap="">Hoegeun Kwon <a class="moz-txt-link-rfc2396E" href="mailto:hoegeun.kwon@samsung.com">&lt;hoegeun.kwon@samsung.com&gt;</a> writes:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">On 4/2/19 2:48 AM, Eric Anholt wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Hoegeun Kwon <a class="moz-txt-link-rfc2396E" href="mailto:hoegeun.kwon@samsung.com">&lt;hoegeun.kwon@samsung.com&gt;</a> writes:

</pre>
          <blockquote type="cite">
            <pre class="moz-quote-pre" wrap="">There is a problem when often dpms goes from off to on. pm idle is not
in sync and the problem occurs. Modify pm_runtime_put from
asynchronous to synchronous.
</pre>
          </blockquote>
          <pre class="moz-quote-pre" wrap="">Why would we need the power domain to go to off before we try to come
back?  Any idea?  Also, please specify what "the problem" is.
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
Hi Eric,


First thank you for your review.

There is a problem failed to runtime PM enable on DSI when often dpms
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
What do you mean by "failed to runtime PM enable"?  The
pm_runtime_enable() returned an error?  Have you investigated the source
that error, if so?
</pre>
    </blockquote>
    <pre>I'm sorry for the late reply.

The pm_runtime_enable() is not returned because return value is void.

The problem is that if the error log is not output
and the DPMS off on is repeated, the screen will stop.

As a result of debugging the problem, I think that synchronization
is a problem caused by dsi pm_suspend and resume.

So when we entered the pm runtime idle state, if used with sync,
the problem does not occur.

Best regards,
Hoegeun


</pre>
  <table id=bannersignimg data-cui-lock="true" namo_lock><tr><td><p>&nbsp;</p>
</td></tr></table><table id=confidentialsignimg data-cui-lock="true" namo_lock><tr><td><p><img style="border: 0px solid currentColor; border-image: none; width: 520px; height: 144px; display: inline-block;" unselectable="on" data-cui-image="true" src="cid:cafe_image_0@s-core.co.kr">&nbsp;</p>
</td></tr></table></body>
</html>
<img src='http://ext.samsung.net/mail/ext/v1/external/status/update?userid=hoegeun.kwon&do=bWFpbElEPTIwMTkwNTIyMTAyNDQzZXBjYXMxcDMyMTJlODU3ZTA3NTljZDA2ZmU1MDRkMjU0MmVjNmU5YSZyZWNpcGllbnRBZGRyZXNzPWRyaS1kZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmc_' border=0 width=0 height=0 style='display:none'>
Daniel Vetter May 22, 2019, 11:32 a.m. UTC | #5
On Wed, May 22, 2019 at 12:24 PM Hoegeun Kwon <hoegeun.kwon@samsung.com>
wrote:

> On 4/10/19 1:24 AM, Eric Anholt wrote:
>
> Hoegeun Kwon <hoegeun.kwon@samsung.com> <hoegeun.kwon@samsung.com> writes:
>
>
> On 4/2/19 2:48 AM, Eric Anholt wrote:
>
> Hoegeun Kwon <hoegeun.kwon@samsung.com> <hoegeun.kwon@samsung.com> writes:
>
>
> There is a problem when often dpms goes from off to on. pm idle is not
> in sync and the problem occurs. Modify pm_runtime_put from
> asynchronous to synchronous.
>
> Why would we need the power domain to go to off before we try to come
> back?  Any idea?  Also, please specify what "the problem" is.
>
> Hi Eric,
>
>
> First thank you for your review.
>
> There is a problem failed to runtime PM enable on DSI when often dpms
>
> What do you mean by "failed to runtime PM enable"?  The
> pm_runtime_enable() returned an error?  Have you investigated the source
> that error, if so?
>
> I'm sorry for the late reply.
>
> The pm_runtime_enable() is not returned because return value is void.
>
> The problem is that if the error log is not output
> and the DPMS off on is repeated, the screen will stop.
>
> As a result of debugging the problem, I think that synchronization
> is a problem caused by dsi pm_suspend and resume.
>
> So when we entered the pm runtime idle state, if used with sync,
> the problem does not occur.
>
>
Sounds like not enough hystersis between disable/enable, i.e. some msleep
missing somewhere. That's at least my guess, we've had a bunch of these
with delayed runtime suspend of various things in i915.
-Daniel

>
> Best regards,
> Hoegeun
>
>
>
>
>
>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
index 11702e1d9011..b0264c7b8bed 100644
--- a/drivers/gpu/drm/vc4/vc4_dsi.c
+++ b/drivers/gpu/drm/vc4/vc4_dsi.c
@@ -822,7 +822,7 @@  static void vc4_dsi_encoder_disable(struct drm_encoder *encoder)
 	clk_disable_unprepare(dsi->escape_clock);
 	clk_disable_unprepare(dsi->pixel_clock);
 
-	pm_runtime_put(dev);
+	pm_runtime_put_sync(dev);
 }
 
 /* Extends the mode's blank intervals to handle BCM2835's integer-only