[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210917152958.GB2515@art_vandelay>
Date: Fri, 17 Sep 2021 11:29:58 -0400
From: Sean Paul <sean@...rly.run>
To: Fernando Ramos <greenfoo@....eu>
Cc: dri-devel@...ts.freedesktop.org, 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: Re: [PATCH 03/15] dmr/msm: cleanup: drm_modeset_lock_all_ctx() -->
DRM_MODESET_LOCK_ALL_BEGIN()
On Thu, Sep 16, 2021 at 11:15:40PM +0200, Fernando Ramos wrote:
> As requested in Documentation/gpu/todo.rst, replace the boilerplate code
> surrounding drm_modeset_lock_all_ctx() with DRM_MODESET_LOCK_ALL_BEGIN()
> and DRM_MODESET_LOCK_ALL_END()
>
With the subject fixed (s/dmr/drm/),
Reviewed-by: Sean Paul <sean@...rly.run>
> Signed-off-by: Fernando Ramos <greenfoo@....eu>
> ---
> drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> index cabe15190ec1..c83db90b0e02 100644
> --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
> @@ -99,20 +99,18 @@ static void msm_disp_capture_atomic_state(struct msm_disp_state *disp_state)
> {
> struct drm_device *ddev;
> struct drm_modeset_acquire_ctx ctx;
> + int ret;
>
> disp_state->timestamp = ktime_get();
>
> ddev = disp_state->drm_dev;
>
> - drm_modeset_acquire_init(&ctx, 0);
> -
> - while (drm_modeset_lock_all_ctx(ddev, &ctx) != 0)
> - drm_modeset_backoff(&ctx);
> + DRM_MODESET_LOCK_ALL_BEGIN(ddev, ctx, 0, ret);
>
> disp_state->atomic_state = drm_atomic_helper_duplicate_state(ddev,
> &ctx);
> - drm_modeset_drop_locks(&ctx);
> - drm_modeset_acquire_fini(&ctx);
> +
> + DRM_MODESET_LOCK_ALL_END(ddev, ctx, ret);
> }
>
> void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state)
> --
> 2.33.0
>
--
Sean Paul, Software Engineer, Google / Chromium OS
Powered by blists - more mailing lists