[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211013204846.90026-12-greenfoo@u92.eu>
Date: Wed, 13 Oct 2021 22:48:37 +0200
From: Fernando Ramos <greenfoo@....eu>
To: dri-devel@...ts.freedesktop.org
Cc: linux-kernel@...r.kernel.org, sean@...rly.run,
linux-doc@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
freedreno@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
linux-renesas-soc@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: [PATCH v4 11/20] drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()
Signed-off-by: Fernando Ramos <greenfoo@....eu>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 768012243b44..b89687074890 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -18,6 +18,7 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_rect.h>
#include <drm/drm_vblank.h>
+#include <drm/drm_drv.h>
#include "dpu_kms.h"
#include "dpu_hw_lm.h"
@@ -1172,14 +1173,15 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
struct drm_display_mode *mode;
struct drm_framebuffer *fb;
struct drm_plane_state *state;
+ struct drm_modeset_acquire_ctx ctx;
struct dpu_crtc_state *cstate;
- int i, out_width;
+ int i, out_width, ret;
dpu_crtc = s->private;
crtc = &dpu_crtc->base;
- drm_modeset_lock_all(crtc->dev);
+ DRM_MODESET_LOCK_ALL_BEGIN(crtc->dev, ctx, 0, ret);
cstate = to_dpu_crtc_state(crtc->state);
mode = &crtc->state->adjusted_mode;
@@ -1263,9 +1265,9 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
dpu_crtc->vblank_cb_time = ktime_set(0, 0);
}
- drm_modeset_unlock_all(crtc->dev);
+ DRM_MODESET_LOCK_ALL_END(crtc->dev, ctx, ret);
- return 0;
+ return ret;
}
DEFINE_SHOW_ATTRIBUTE(_dpu_debugfs_status);
--
2.33.0
Powered by blists - more mailing lists