On 12/29/22 05:37, Maxime Ripard wrote:
On Wed, Dec 28, 2022 at 11:16:11PM +0100, Stefan Wahren wrote:
Hi Maíra,

Am 28.12.22 um 20:49 schrieb Maíra Canal:
Hi Stefan,

I was able to reproduce this error on drm-misc-next. I bisected,
and I got into commit 6bed2ea3cb38. I noticed that the crtc->mutex is
being locked twice, and this might be causing the problem. I wrote a
patch to try to fix this issue, and after applying the patch, I wasn't
able to reproduce the error anymore.

Let me know if you were able to reproduce the warning after applying
this patch.

the patch works as expected and avoid the warning. I tested it on top of
v6.1 with RPi 3 B+ and RPi 4 B.

In case you send the patch please add the Fixes tag so the patch get
backported to stable.

This isn't a proper fix, we do need to take the crtc mutex: it protects
the crtc->state pointer we dereference next, and vc4_hdmi_reset_link can
be called outside of a modeset through the interrupt handler.

Do you suggest calling drm_modeset_unlock after dereferencing crtc->state?

Best Regards,
- Maíra Canal


Maxime

Reply via email to