]> git.baikalelectronics.ru Git - kernel.git/commit
drm/modeset-lock: Take the modeset BKL for legacy drivers
authorDaniel Vetter <daniel.vetter@intel.com>
Fri, 14 Aug 2020 09:38:42 +0000 (11:38 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 17 Aug 2020 17:41:50 +0000 (13:41 -0400)
commit7be2858f73116c0b8d83c3919d2d6f16a1372c23
treec066b4063eda0350fddbe01e42777e9b09b23f70
parent47acbcf3bccd65dc6f9f007f614bad98c7045b14
drm/modeset-lock: Take the modeset BKL for legacy drivers

This fell off in the conversion in

commit e6f3daf562da701a56c49ea9789932886b702d46
Author: Michal Orzel <michalorzel.eng@gmail.com>
Date:   Tue Apr 28 19:10:04 2020 +0200

    drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers

but it's caught by the drm_warn_on_modeset_not_all_locked() that the
legacy modeset code uses. Since this is the bkl and it's unclear
what's all protected, play it safe and grab it again for legacy
drivers.

Unfortunately this means we need to sprinkle a few more #includes
around.

Also we need to add the drm_device as a parameter to the _END macro.

Finally remove the mute_lock() from setcrtc, since that's now done by
the macro.

Cc: Alex Deucher <alexdeucher@gmail.com>
References: https://gitlab.freedesktop.org/drm/amd/-/issues/1224
Fixes: e6f3daf562da ("drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers")
Cc: Michal Orzel <michalorzel.eng@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.8+
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200814093842.3048472-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_color_mgmt.c
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_mode_object.c
drivers/gpu/drm/drm_plane.c
include/drm/drm_modeset_lock.h