drm/amdgpu: enable DCN for navi10 headless SKU
Subsystems (2)
PATCH 1/1 drm/amdgpu: enable DCN for navi10 headless SKU
From: "Tianci.Yin" <[email protected]>
There is a NULL pointer crash when DCN disabled on headless SKU. On normal SKU, the variable adev->ddev.mode_config.funcs is initialized in dm_hw_init(), and it is fine to access it in amdgpu_device_resume(). But on headless SKU, DCN is disabled, the funcs variable is not initialized, then crash arises. Enable DCN to fix this issue.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -2
@@ -535,8 +535,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev) && - !nv_is_headless_sku(adev->pdev)) + else if (amdgpu_device_has_dc_support(adev)) amdgpu_device_ip_block_add(adev, &dm_ip_block);#endif amdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: amd-gfx <[email protected]> on behalf of Tianci Yin <[email protected]>
Sent: Friday, November 6, 2020 2:36 AM
To: [email protected] <[email protected]>
Cc: Long, Gang <[email protected]>; Chen, Guchun <[email protected]>; Xu, Feifei <[email protected]>; Yin, Tianci (Rico) <[email protected]>; Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Cui, Flora <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: enable DCN for navi10 headless SKU
From: "Tianci.Yin" <[email protected]>
There is a NULL pointer crash when DCN disabled on headless SKU. On normal SKU, the variable adev->ddev.mode_config.funcs is initialized in dm_hw_init(), and it is fine to access it in amdgpu_device_resume(). But on headless SKU, DCN is disabled, the funcs variable is not initialized, then crash arises. Enable DCN to fix this issue.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -2
@@ -535,8 +535,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev) && - !nv_is_headless_sku(adev->pdev)) + else if (amdgpu_device_has_dc_support(adev)) amdgpu_device_ip_block_add(adev, &dm_ip_block);#endif amdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block);
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C516e3593f84a45811bd908d88226c8e8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637402450426333203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RzbVAu02p9LVSSOXx3M0QwQztABgpf8FRiWhDyU6BOY%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Regards,
Guchun
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tianci Yin
Sent: Friday, November 6, 2020 3:37 PM
To: [email protected]
Cc: Long, Gang <[email protected]>; Chen, Guchun <[email protected]>; Xu, Feifei <[email protected]>; Yin, Tianci (Rico) <[email protected]>; Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Cui, Flora <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: enable DCN for navi10 headless SKU
From: "Tianci.Yin" <[email protected]>
There is a NULL pointer crash when DCN disabled on headless SKU.
On normal SKU, the variable adev->ddev.mode_config.funcs is initialized in dm_hw_init(), and it is fine to access it in amdgpu_device_resume(). But on headless SKU, DCN is disabled, the funcs variable is not initialized, then crash arises. Enable DCN to fix this issue.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -3
@@ -535,8 +535,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev) && - !nv_is_headless_sku(adev->pdev)) + else if (amdgpu_device_has_dc_support(adev)) amdgpu_device_ip_block_add(adev, &dm_ip_block); #endifamdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block); --
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cguchun.chen%40amd.com%7C317e06850aac4667ccb608d88226ca40%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637402450416710143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kF9LlID5Di%2FFivWvtiBQWhtXefE%2FuZ3C7tgXCEQFuQU%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Yin, Tianci (Rico)
Reviewed-by Guchun Chen[AMD Public Use]
Thanks very much Alex and Guchun!
________________________________
From: Chen, Guchun <[email protected]>
Sent: Sunday, November 8, 2020 21:42
To: Yin, Tianci (Rico) <[email protected]>; [email protected] <[email protected]>
Cc: Long, Gang <[email protected]>; Xu, Feifei <[email protected]>; Yin, Tianci (Rico) <[email protected]>; Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Cui, Flora <[email protected]>; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: enable DCN for navi10 headless SKU
[AMD Public Use]
Regards,
Guchun
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tianci Yin
Sent: Friday, November 6, 2020 3:37 PM
To: [email protected]
Cc: Long, Gang <[email protected]>; Chen, Guchun <[email protected]>; Xu, Feifei <[email protected]>; Yin, Tianci (Rico) <[email protected]>; Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Cui, Flora <[email protected]>; Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: enable DCN for navi10 headless SKU
From: "Tianci.Yin" <[email protected]>
There is a NULL pointer crash when DCN disabled on headless SKU.
On normal SKU, the variable adev->ddev.mode_config.funcs is initialized in dm_hw_init(), and it is fine to access it in amdgpu_device_resume(). But on headless SKU, DCN is disabled, the funcs variable is not initialized, then crash arises. Enable DCN to fix this issue.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -3
@@ -535,8 +535,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block);#if defined(CONFIG_DRM_AMD_DC ) - else if (amdgpu_device_has_dc_support(adev) && - !nv_is_headless_sku(adev->pdev)) + else if (amdgpu_device_has_dc_support(adev)) amdgpu_device_ip_block_add(adev, &dm_ip_block); #endifamdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block); --
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cguchun.chen%40amd.com%7C317e06850aac4667ccb608d88226ca40%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637402450416710143%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kF9LlID5Di%2FFivWvtiBQWhtXefE%2FuZ3C7tgXCEQFuQU%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx