#include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h>
-#include <drm/drm_drv.h>
#include "display/intel_audio.h"
#include "display/intel_crt.h"
if (state)
state->acquire_ctx = &ctx;
- DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
+ drm_modeset_acquire_init(&ctx, 0);
- ret = __intel_display_resume(dev, state, &ctx);
+ while (1) {
+ ret = drm_modeset_lock_all_ctx(dev, &ctx);
+ if (ret != -EDEADLK)
+ break;
- intel_enable_ipc(dev_priv);
+ drm_modeset_backoff(&ctx);
+ }
+
+ if (!ret)
+ ret = __intel_display_resume(dev, state, &ctx);
- DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
+ intel_enable_ipc(dev_priv);
+ drm_modeset_drop_locks(&ctx);
+ drm_modeset_acquire_fini(&ctx);
if (ret)
drm_err(&dev_priv->drm,