drm: replace drm_modeset_lock_all() in drm_client_modeset_dpms_legacy()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/drm_client_modeset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_client_modeset.c +5 -2
@@ -7,6 +7,7 @@* Copyright (c) 2007 Dave Airlie <[email protected]> */ +#include "drm/drm_modeset_lock.h" #include <linux/module.h> #include <linux/mutex.h> #include <linux/slab.h>
@@ -1181,9 +1182,11 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dpstruct 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); }/**
Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 4 lines · Joseph Schulte
This patch helps complete Use DRM_MODESET_LOCK_ALL* helpers instead of boilerplate todo in
Documentation/gpu/todo.rstSigned-off-by Joseph Schulte <[email protected]>
Applied to drm-misc-next, thanks for your patch.
-Daniel
Quoted 45 lines
--- drivers/gpu/drm/drm_client_modeset.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_client_modeset.c +5
-2@@ -7,6 +7,7 @@* Copyright (c) 2007 Dave Airlie <[email protected]> */ +#include "drm/drm_modeset_lock.h" #include <linux/module.h> #include <linux/mutex.h> #include <linux/slab.h> @@ -1181,9 +1182,11 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dpstruct 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); }/** Signature · 6 lines
2.30.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel