@@ -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)