[PATCH 2/2] drm/amdgpu: check atomic flag to differeniate with legacy path

Deucher, Alexander Alexander.Deucher at amd.com
Mon Nov 22 16:46:27 UTC 2021


[Public]

Acked-by: Alex Deucher <aleander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Flora Cui <flora.cui at amd.com>
Sent: Monday, November 22, 2021 4:03 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>; Chen, Guchun <Guchun.Chen at amd.com>
Cc: Cui, Flora <Flora.Cui at amd.com>
Subject: [PATCH 2/2] drm/amdgpu: check atomic flag to differeniate with legacy path

since vkms support atomic KMS interface

Signed-off-by: Flora Cui <flora.cui at amd.com>
Reviewed-by: Guchun Chen <guchun.chen at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ec42a6fd88de..87801f2e50f8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3830,7 +3830,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
         /* disable all interrupts */
         amdgpu_irq_disable_all(adev);
         if (adev->mode_info.mode_config_initialized){
-               if (!amdgpu_device_has_dc_support(adev))
+               if (!drm_drv_uses_atomic_modeset(adev_to_drm(adev)))
                         drm_helper_force_disable_all(adev_to_drm(adev));
                 else
                         drm_atomic_helper_shutdown(adev_to_drm(adev));
@@ -5125,7 +5125,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
                         drm_sched_start(&ring->sched, !tmp_adev->asic_reset_res);
                 }

-               if (!amdgpu_device_has_dc_support(tmp_adev) && !job_signaled) {
+               if (!drm_drv_uses_atomic_modeset(adev_to_drm(tmp_adev)) && !job_signaled) {
                         drm_helper_resume_force_mode(adev_to_drm(tmp_adev));
                 }

--
2.25.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20211122/c897fe44/attachment.htm>


More information about the amd-gfx mailing list