[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210714203324.146783-1-marcokurzynski@icloud.com>
Date: Wed, 14 Jul 2021 15:33:25 -0500
From: Marco Kurzynski <marcokurzynski@...oud.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
Cc: Marco Kurzynski <marcokurzynski@...oud.com>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/gpu/drm/i915/display: remove boilerplate code using LOCK_ALL macros
Replaced the boilerplate code for intel_display.c with
DRM_MODESET_LOCK_ALL macros per the TODO in gpu
(I apologize if I did something wrong, this is my first contribution of
hopefully many, so excited!!!)
Signed-off-by: Marco Kurzynski <marcokurzynski@...oud.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 3bad4e00f7be..4a46d63b4d39 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -13307,22 +13307,12 @@ void intel_display_resume(struct drm_device *dev)
if (state)
state->acquire_ctx = &ctx;
- drm_modeset_acquire_init(&ctx, 0);
-
- while (1) {
- ret = drm_modeset_lock_all_ctx(dev, &ctx);
- if (ret != -EDEADLK)
- break;
-
- drm_modeset_backoff(&ctx);
- }
-
+ DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
if (!ret)
ret = __intel_display_resume(dev, state, &ctx);
intel_enable_ipc(dev_priv);
- drm_modeset_drop_locks(&ctx);
- drm_modeset_acquire_fini(&ctx);
+ DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
if (ret)
drm_err(&dev_priv->drm,
--
2.25.1
Powered by blists - more mailing lists