| From 9e2220bb0508a598b2776e84eecb900c7569c291 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Thu, 18 Nov 2021 16:25:19 +0800 |
| Subject: drm/amdgpu: check atomic flag to differeniate with legacy path |
| |
| From: Flora Cui <flora.cui@amd.com> |
| |
| [ Upstream commit 1053b9c948e614473819a1a5bcaff6d44e680dcf ] |
| |
| since vkms support atomic KMS interface |
| |
| Signed-off-by: Flora Cui <flora.cui@amd.com> |
| Reviewed-by: Guchun Chen <guchun.chen@amd.com> |
| Acked-by: Alex Deucher <aleander.deucher@amd.com> |
| Reviewed-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| 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 96ca42bcfdbf9..1545884dc703e 100644 |
| --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| @@ -3854,7 +3854,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)); |
| @@ -5130,7 +5130,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.33.0 |
| |