tilcdc: vblank wait timed out

Jyri Sarha jsarha at ti.com
Mon Dec 12 11:26:46 UTC 2016

On 12/05/16 19:07, Bartosz Golaszewski wrote:
> 2016-12-05 12:01 GMT+01:00 Bartosz Golaszewski <bgolaszewski at baylibre.com>:
>> Hi Jyri,
>> I pulled your recent tilcdc pull request on top of v4.9 and Sekhar's
>> davinci branch (+ vga dac DT)[1].
>> I'm getting "vblank wait timed out" errors when running simple modetest[2].
>> This error happened before with the drm_bridge series[3], but went
>> away at one of the subsequent patch versions.
>> Could you please verify that you see the same error and advise on what
>> could be the reason? I'm investigating on my own as well.
>> Best regards,
>> Bartosz Golaszewski
>> [1] https://github.com/brgl/linux/tree/tilcdc/modetest_error
>> [2] http://pastebin.com/rCM44Uds
>> [3] http://www.spinics.net/lists/dri-devel/msg123732.html

Sorry, I almost forgot about this problem.

> This seems like some END_OF_FRAME0 interrupt-related race condition.

I can not see any race related to vblank event sending. The
drm_modeset_lock_crtc() is there exactly for all ongoing operations to
complete before shutting down the crtc.

I think the problem is a missing END_OF_FRAME0 interrupt when sync lost
interrupt flood happens.

> Increasing the timeout in drm_atomic_helper_wait_for_vblanks() from 50
> to 100 and dropping drm_modeset_lock_crtc()/drm_modeset_unlock_crtc()

Not taking the lock causes drm_crtc_vblank_off() to be called in
tilcdc_crtc_disable(), before the time out happens. However, this is
racy because there is a pending commit still on going and executing in
parallel with the recovery work.

> in tilcdc_crtc_recover_work() makes the warning disappear. Also:
> calling drm_crtc_vblank_off() additionally before locking the crtc in
> tilcdc_crtc_recover_work() also seems to fix the issue 90% of times. I

I wonder what happens in that 10% off the times when when that does not

> have been unable to figure out a reliable solution today though.

Does the attached patch help with the issue?

Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-tilcdc-Send-pendig-vblank-event-before-recovery-.patch
Type: text/x-patch
Size: 1489 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161212/b3f8c50b/attachment.bin>

More information about the dri-devel mailing list