drm: Fixup locking for universal cursor planes
Bunch of things amiss: - Updating crtc->cursor_x/y was done without any locking. Spotted by David Herrmann. - Dereferencing crtc->cursor->fb was using the wrong lock, should take the crtc lock. - Grabbing _all_ modeset locks torpedoes the reason why we added fine-grained locks originally: Cursor updates shouldn't stall on background stuff like probing outputs. Best is to just grab the crtc lock around everything and drop all the other locking. The only issue is that we can't switch planes between crtcs with that, so make sure that never happens when someone uses universal plane helpers. This shouldn't be a possible regression ever since legacy ioctls also only grabbed the crtc lock, so switching crtcs was never possible for the underlying plane object. And i915 (the only user of universal cursors thus far) has fixed cursor->crtc links. Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Pallavi G<pallavi.g@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: NMatt Roper <matthew.d.roper@intel.com> Tested-by: NMatt Roper <matthew.d.roper@intel.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
Showing
想要评论请 注册 或 登录