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

2021-11-22 Thread Deucher, Alexander
[Public]

Acked-by: Alex Deucher 

From: amd-gfx  on behalf of Flora Cui 

Sent: Monday, November 22, 2021 4:03 AM
To: amd-gfx@lists.freedesktop.org ; Chen, Guchun 

Cc: Cui, Flora 
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 
Reviewed-by: Guchun Chen 
---
 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



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

2021-11-22 Thread Flora Cui
since vkms support atomic KMS interface

Signed-off-by: Flora Cui 
Reviewed-by: Guchun Chen 
---
 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