Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "drm/nouveau: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()"

This reverts commit 6aa2daae589b63e8b39fe6f7f2b59fb3063efa05.

This patchset breaks on intel platforms and was previously NACK'd by
Ville.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Fernando Ramos <greenfoo@u92.eu>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211002154542.15800-7-sean@poorly.run

+5 -10
+5 -10
drivers/gpu/drm/nouveau/dispnv50/disp.c
··· 42 42 #include <drm/drm_probe_helper.h> 43 43 #include <drm/drm_scdc_helper.h> 44 44 #include <drm/drm_vblank.h> 45 - #include <drm/drm_drv.h> 46 45 47 46 #include <nvif/push507c.h> 48 47 ··· 667 668 struct drm_device *drm_dev = dev_get_drvdata(kdev); 668 669 struct nouveau_drm *drm = nouveau_drm(drm_dev); 669 670 struct drm_audio_component *acomp = data; 670 - struct drm_modeset_acquire_ctx ctx; 671 - int ret; 672 671 673 672 if (WARN_ON(!device_link_add(hda_kdev, kdev, DL_FLAG_STATELESS))) 674 673 return -ENOMEM; 675 674 676 - DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret); 675 + drm_modeset_lock_all(drm_dev); 677 676 acomp->ops = &nv50_audio_component_ops; 678 677 acomp->dev = kdev; 679 678 drm->audio.component = acomp; 680 - DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret); 681 - return ret; 679 + drm_modeset_unlock_all(drm_dev); 680 + return 0; 682 681 } 683 682 684 683 static void ··· 686 689 struct drm_device *drm_dev = dev_get_drvdata(kdev); 687 690 struct nouveau_drm *drm = nouveau_drm(drm_dev); 688 691 struct drm_audio_component *acomp = data; 689 - struct drm_modeset_acquire_ctx ctx; 690 - int ret; 691 692 692 - DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret); 693 + drm_modeset_lock_all(drm_dev); 693 694 drm->audio.component = NULL; 694 695 acomp->ops = NULL; 695 696 acomp->dev = NULL; 696 - DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret); 697 + drm_modeset_unlock_all(drm_dev); 697 698 } 698 699 699 700 static const struct component_ops nv50_audio_component_bind_ops = {