@@ -574,7 +574,6 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
int num_connectors_detected = 0;
int num_tiled_conns = 0;
struct drm_modeset_acquire_ctx ctx;
- int err;
if (!drm_drv_uses_atomic_modeset(dev))
return false;
@@ -586,7 +585,10 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
if (!save_enabled)
return false;
- DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
+ drm_modeset_acquire_init(&ctx, 0);
+
+ while (drm_modeset_lock_all_ctx(dev, &ctx) != 0)
+ drm_modeset_backoff(&ctx);
memcpy(save_enabled, enabled, count);
mask = GENMASK(count - 1, 0);
@@ -741,7 +743,8 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
ret = false;
}
- DRM_MODESET_LOCK_ALL_END(dev, ctx, err);
+ drm_modeset_drop_locks(&ctx);
+ drm_modeset_acquire_fini(&ctx);
kfree(save_enabled);
return ret;