mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
drm/msm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()
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() Signed-off-by: Fernando Ramos <greenfoo@u92.eu> Reviewed-by: Sean Paul <sean@poorly.run> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210924064324.229457-4-greenfoo@u92.eu
This commit is contained in:
parent
399190e708
commit
4c048437ef
1 changed files with 6 additions and 6 deletions
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
||||
#include <drm/drm_drv.h>
|
||||
|
||||
#include "msm_disp_snapshot.h"
|
||||
|
||||
static void msm_disp_state_dump_regs(u32 **reg, u32 aligned_len, void __iomem *base_addr)
|
||||
|
|
@ -99,20 +101,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue