summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2021-10-02 17:45:33 +0200
committerSean Paul <seanpaul@chromium.org>2021-10-04 15:34:56 +0200
commit7a154d5bbcd725e80f45266e05ce8b010aec086a (patch)
treeb916d76e164e594ae0131ef5f8314047e4e11083
parentRevert "drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEG... (diff)
downloadlinux-7a154d5bbcd725e80f45266e05ce8b010aec086a.tar.xz
linux-7a154d5bbcd725e80f45266e05ce8b010aec086a.zip
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
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/disp.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 86e18a844953..d7b9f7f8c9e3 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -42,7 +42,6 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_scdc_helper.h>
#include <drm/drm_vblank.h>
-#include <drm/drm_drv.h>
#include <nvif/push507c.h>
@@ -668,18 +667,16 @@ nv50_audio_component_bind(struct device *kdev, struct device *hda_kdev,
struct drm_device *drm_dev = dev_get_drvdata(kdev);
struct nouveau_drm *drm = nouveau_drm(drm_dev);
struct drm_audio_component *acomp = data;
- struct drm_modeset_acquire_ctx ctx;
- int ret;
if (WARN_ON(!device_link_add(hda_kdev, kdev, DL_FLAG_STATELESS)))
return -ENOMEM;
- DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret);
+ drm_modeset_lock_all(drm_dev);
acomp->ops = &nv50_audio_component_ops;
acomp->dev = kdev;
drm->audio.component = acomp;
- DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret);
- return ret;
+ drm_modeset_unlock_all(drm_dev);
+ return 0;
}
static void
@@ -689,14 +686,12 @@ nv50_audio_component_unbind(struct device *kdev, struct device *hda_kdev,
struct drm_device *drm_dev = dev_get_drvdata(kdev);
struct nouveau_drm *drm = nouveau_drm(drm_dev);
struct drm_audio_component *acomp = data;
- struct drm_modeset_acquire_ctx ctx;
- int ret;
- DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret);
+ drm_modeset_lock_all(drm_dev);
drm->audio.component = NULL;
acomp->ops = NULL;
acomp->dev = NULL;
- DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret);
+ drm_modeset_unlock_all(drm_dev);
}
static const struct component_ops nv50_audio_component_bind_ops = {