From 482f3ef0b0e3c4783a7e2130c71d5545b068bcbb Mon Sep 17 00:00:00 2001 From: Joseph Schulte Date: Mon, 25 Jan 2021 08:48:15 -0600 Subject: [PATCH] drm: replace drm_modeset_lock_all() in drm_client_modeset_dpms_legacy() This patch helps complete Use DRM_MODESET_LOCK_ALL* helpers instead of boilerplate todo in Documentation/gpu/todo.rst Signed-off-by: Joseph Schulte Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210125144815.8389-1-joeschulte.js@gmail.com --- drivers/gpu/drm/drm_client_modeset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c index b7e9e1c2564c..ced09c7c06f9 100644 --- a/drivers/gpu/drm/drm_client_modeset.c +++ b/drivers/gpu/drm/drm_client_modeset.c @@ -7,6 +7,7 @@ * Copyright (c) 2007 Dave Airlie */ +#include "drm/drm_modeset_lock.h" #include #include #include @@ -1181,9 +1182,11 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp struct drm_device *dev = client->dev; struct drm_connector *connector; struct drm_mode_set *modeset; + struct drm_modeset_acquire_ctx ctx; int j; + int ret; - drm_modeset_lock_all(dev); + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); drm_client_for_each_modeset(modeset, client) { if (!modeset->crtc->enabled) continue; @@ -1195,7 +1198,7 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp dev->mode_config.dpms_property, dpms_mode); } } - drm_modeset_unlock_all(dev); + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); } /**