Re: Warnings with drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 13, 2020 at 11:17:11PM -0400, Alex Deucher wrote:
> The non-atomic modesetting code in amdgpu now spews warnings[1] with
> this patch applied.  I haven't really paged the legacy locking stuff
> into my head in quite a while.  Thoughts on how to proceed?

Uh that mess.

So the problem (and it's really the same for atomic as for legacy) is that
we have shared state between connector probe and modeset code. Generally
that's solved by just copying stuff (like drm_connector->display_info) and
hoping we don't race badly.

All the probe state is protected by dev->mode_config.mutex, while all the
modeset stuff is protected by the various drm_modeset_lock.

I think the simplest duct-tape is to reapply the old locking scheme to the
new macro, but only for non-atomic drivers. I'll type up something. But
I'll go on vacations for 2 weeks, so if it doesn't work out you have to
respin (and also merge).

Cheers, Daniel
> 
> Thanks,
> 
> Alex
> 
> commit 9bcaa3fe58ab7559e71df798bcff6e0795158695
> Author: Michal Orzel <michalorzel.eng@xxxxxxxxx>
> Date:   Tue Apr 28 19:10:04 2020 +0200
> 
>     drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers
> 
>     As suggested by the TODO list for the kernel DRM subsystem, replace
>     the deprecated functions that take/drop modeset locks with new helpers.
> 
>     Signed-off-by: Michal Orzel <michalorzel.eng@xxxxxxxxx>
>     Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
>     Link: https://patchwork.freedesktop.org/patch/msgid/1588093804-30446-1-git-send-email-michalorzel.eng@xxxxxxxxx
> 
> 
> [1] https://gitlab.freedesktop.org/drm/amd/-/issues/1224
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux