From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com> To: outreachy-kernel@googlegroups.com, dri-devel@lists.freedesktop.org, "Alex Deucher" <alexander.deucher@amd.com>, "Christian König" <christian.koenig@amd.com>, "David Airlie" <airlied@linux.ie>, "Daniel Vetter" <daniel@ffwll.ch>, "Melissa Wen" <melissa.srw@gmail.com> Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com> Subject: [PATCH 2/2] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_*_all with DRM_MODESET_LOCK_ALL_* Date: Mon, 19 Apr 2021 14:20:59 +0200 [thread overview] Message-ID: <20210419122059.738-3-fmdefrancesco@gmail.com> (raw) In-Reply-To: <20210419122059.738-1-fmdefrancesco@gmail.com> Replace the deprecated API with new helpers, according to the TODO list of the DRM subsystem. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 671ec1002230..0e9b7a180ee7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1438,8 +1438,10 @@ static int amdgpu_pmops_runtime_idle(struct device *dev) if (amdgpu_device_has_dc_support(adev)) { struct drm_crtc *crtc; + struct drm_modeset_acquire_ctx ctx; + int ret_lock; - drm_modeset_lock_all(drm_dev); + DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret_lock); drm_for_each_crtc(crtc, drm_dev) { if (crtc->state->active) { @@ -1448,7 +1450,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev) } } - drm_modeset_unlock_all(drm_dev); + DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret_lock); } else { struct drm_connector *list_connector; -- 2.31.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com> To: outreachy-kernel@googlegroups.com, dri-devel@lists.freedesktop.org, "Alex Deucher" <alexander.deucher@amd.com>, "Christian König" <christian.koenig@amd.com>, "David Airlie" <airlied@linux.ie>, "Daniel Vetter" <daniel@ffwll.ch>, "Melissa Wen" <melissa.srw@gmail.com> Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com> Subject: [PATCH 2/2] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_*_all with DRM_MODESET_LOCK_ALL_* Date: Mon, 19 Apr 2021 14:20:59 +0200 [thread overview] Message-ID: <20210419122059.738-3-fmdefrancesco@gmail.com> (raw) In-Reply-To: <20210419122059.738-1-fmdefrancesco@gmail.com> Replace the deprecated API with new helpers, according to the TODO list of the DRM subsystem. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 671ec1002230..0e9b7a180ee7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1438,8 +1438,10 @@ static int amdgpu_pmops_runtime_idle(struct device *dev) if (amdgpu_device_has_dc_support(adev)) { struct drm_crtc *crtc; + struct drm_modeset_acquire_ctx ctx; + int ret_lock; - drm_modeset_lock_all(drm_dev); + DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret_lock); drm_for_each_crtc(crtc, drm_dev) { if (crtc->state->active) { @@ -1448,7 +1450,7 @@ static int amdgpu_pmops_runtime_idle(struct device *dev) } } - drm_modeset_unlock_all(drm_dev); + DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret_lock); } else { struct drm_connector *list_connector; -- 2.31.1
next prev parent reply other threads:[~2021-04-19 12:21 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-19 12:20 [PATCH 0/2] drm/amd/amdgpu: Replace drm_modeset_*_all with DRM_MODESET_LOCK_ALL_* Fabio M. De Francesco 2021-04-19 12:20 ` Fabio M. De Francesco 2021-04-19 12:20 ` [PATCH 1/2] drm/amd/amdgpu/amdgpu_device.c: " Fabio M. De Francesco 2021-04-19 12:20 ` Fabio M. De Francesco 2021-04-19 13:08 ` [Outreachy kernel] " Julia Lawall 2021-04-19 13:08 ` Julia Lawall 2021-04-19 13:51 ` Fabio M. De Francesco 2021-04-19 13:51 ` Fabio M. De Francesco 2021-04-19 14:50 ` Julia Lawall 2021-04-19 14:50 ` Julia Lawall 2021-04-19 12:20 ` Fabio M. De Francesco [this message] 2021-04-19 12:20 ` [PATCH 2/2] drm/amd/amdgpu/amdgpu_drv.c: " Fabio M. De Francesco
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210419122059.738-3-fmdefrancesco@gmail.com \ --to=fmdefrancesco@gmail.com \ --cc=airlied@linux.ie \ --cc=alexander.deucher@amd.com \ --cc=christian.koenig@amd.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=melissa.srw@gmail.com \ --cc=outreachy-kernel@googlegroups.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.