diff options
author | Sean Paul <seanpaul@chromium.org> | 2021-10-02 11:45:40 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2021-10-04 09:34:57 -0400 |
commit | f505495d246a3c733f973d60c98f754890ddb962 (patch) | |
tree | 2f788591583dec705fc123b1adf92db235af1245 /drivers | |
parent | 76fd2c379e654aaa6ab3435a5c6bdd7dc4c1d28c (diff) | |
download | linux-f505495d246a3c733f973d60c98f754890ddb962.tar.bz2 |
Revert "drm/msm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()"
This reverts commit 4c048437ef7adb2d81fe4ddc5c04179126eefcf2.
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-14-sean@poorly.run
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c index abda52f09b09..cabe15190ec1 100644 --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c @@ -5,8 +5,6 @@ #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ -#include <drm/drm_drv.h> - #include "msm_disp_snapshot.h" static void msm_disp_state_dump_regs(u32 **reg, u32 aligned_len, void __iomem *base_addr) @@ -101,18 +99,20 @@ static void msm_disp_capture_atomic_state(struct msm_disp_state *disp_state) { struct drm_device *ddev; struct drm_modeset_acquire_ctx ctx; - int ret; disp_state->timestamp = ktime_get(); ddev = disp_state->drm_dev; - DRM_MODESET_LOCK_ALL_BEGIN(ddev, ctx, 0, ret); + drm_modeset_acquire_init(&ctx, 0); + + while (drm_modeset_lock_all_ctx(ddev, &ctx) != 0) + drm_modeset_backoff(&ctx); disp_state->atomic_state = drm_atomic_helper_duplicate_state(ddev, &ctx); - - DRM_MODESET_LOCK_ALL_END(ddev, ctx, ret); + drm_modeset_drop_locks(&ctx); + drm_modeset_acquire_fini(&ctx); } void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state) |