Skip to content

Commit

Permalink
Revert "drm/i915: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET…
Browse files Browse the repository at this point in the history
…_LOCK_ALL_BEGIN()"

This reverts commit 399190e.

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-15-sean@poorly.run
  • Loading branch information
Sean Paul committed Oct 4, 2021
1 parent f505495 commit 369de54
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#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"
Expand Down Expand Up @@ -13477,13 +13476,22 @@ void intel_display_resume(struct drm_device *dev)
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,
Expand Down

0 comments on commit 369de54

Please sign in to comment.