<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <aleander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Flora Cui <flora.cui@amd.com><br>
<b>Sent:</b> Monday, November 22, 2021 4:03 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Chen, Guchun <Guchun.Chen@amd.com><br>
<b>Cc:</b> Cui, Flora <Flora.Cui@amd.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amdgpu: check atomic flag to differeniate with legacy path</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">since vkms support atomic KMS interface<br>
<br>
Signed-off-by: Flora Cui <flora.cui@amd.com><br>
Reviewed-by: Guchun Chen <guchun.chen@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index ec42a6fd88de..87801f2e50f8 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -3830,7 +3830,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)<br>
/* disable all interrupts */<br>
amdgpu_irq_disable_all(adev);<br>
if (adev->mode_info.mode_config_initialized){<br>
- if (!amdgpu_device_has_dc_support(adev))<br>
+ if (!drm_drv_uses_atomic_modeset(adev_to_drm(adev)))<br>
drm_helper_force_disable_all(adev_to_drm(adev));<br>
else<br>
drm_atomic_helper_shutdown(adev_to_drm(adev));<br>
@@ -5125,7 +5125,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,<br>
drm_sched_start(&ring->sched, !tmp_adev->asic_reset_res);<br>
}<br>
<br>
- if (!amdgpu_device_has_dc_support(tmp_adev) && !job_signaled) {<br>
+ if (!drm_drv_uses_atomic_modeset(adev_to_drm(tmp_adev)) && !job_signaled) {<br>
drm_helper_resume_force_mode(adev_to_drm(tmp_adev));<br>
}<br>
<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>