<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:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.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 Tianci Yin <tianci.yin@amd.com><br>
<b>Sent:</b> Friday, November 6, 2020 2:36 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Long, Gang <Gang.Long@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Xu, Feifei <Feifei.Xu@amd.com>; Yin, Tianci (Rico) <Tianci.Yin@amd.com>; Tuikov, Luben <Luben.Tuikov@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Cui, Flora <Flora.Cui@amd.com>;
 Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: enable DCN for navi10 headless SKU</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: "Tianci.Yin" <tianci.yin@amd.com><br>
<br>
There is a NULL pointer crash when DCN disabled on headless SKU.<br>
On normal SKU, the variable adev->ddev.mode_config.funcs is<br>
initialized in dm_hw_init(), and it is fine to access it in<br>
amdgpu_device_resume(). But on headless SKU, DCN is disabled,<br>
the funcs variable is not initialized, then crash arises.<br>
Enable DCN to fix this issue.<br>
<br>
Change-Id: I33bc30210e3420e60ceb59175e39855d00b05b06<br>
Signed-off-by: Tianci.Yin <tianci.yin@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/nv.c | 3 +--<br>
 1 file changed, 1 insertion(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
index e33d8022cc32..67375b2948f5 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/nv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
@@ -535,8 +535,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)<br>
                 if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))<br>
                         amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);<br>
 #if defined(CONFIG_DRM_AMD_DC)<br>
-               else if (amdgpu_device_has_dc_support(adev) &&<br>
-                        !nv_is_headless_sku(adev->pdev))<br>
+               else if (amdgpu_device_has_dc_support(adev))<br>
                         amdgpu_device_ip_block_add(adev, &dm_ip_block);<br>
 #endif<br>
                 amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);<br>
-- <br>
2.25.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C516e3593f84a45811bd908d88226c8e8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637402450426333203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=RzbVAu02p9LVSSOXx3M0QwQztABgpf8FRiWhDyU6BOY%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C516e3593f84a45811bd908d88226c8e8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637402450426333203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=RzbVAu02p9LVSSOXx3M0QwQztABgpf8FRiWhDyU6BOY%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>