Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: load np fw prior before loading the TAs

Platform TAs will independently toggle DF Cstate.
for instance, get/set topology from xgmi ta. do error
injection from ras ta. In such case, PMFW needs to be
loaded before TAs so that all the subsequent Cstate
calls recieved by PSP FW can be routed to PMFW.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Hawking Zhang and committed by
Alex Deucher
7091b60c 71e5f0cb

+33 -33
+33 -33
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 1231 1231 return ret; 1232 1232 } 1233 1233 1234 - ret = psp_asd_load(psp); 1235 - if (ret) { 1236 - DRM_ERROR("PSP load asd failed!\n"); 1237 - return ret; 1238 - } 1239 - 1240 - if (adev->gmc.xgmi.num_physical_nodes > 1) { 1241 - ret = psp_xgmi_initialize(psp); 1242 - /* Warning the XGMI seesion initialize failure 1243 - * Instead of stop driver initialization 1244 - */ 1245 - if (ret) 1246 - dev_err(psp->adev->dev, 1247 - "XGMI: Failed to initialize XGMI session\n"); 1248 - } 1249 - 1250 - if (psp->adev->psp.ta_fw) { 1251 - ret = psp_ras_initialize(psp); 1252 - if (ret) 1253 - dev_err(psp->adev->dev, 1254 - "RAS: Failed to initialize RAS\n"); 1255 - 1256 - ret = psp_hdcp_initialize(psp); 1257 - if (ret) 1258 - dev_err(psp->adev->dev, 1259 - "HDCP: Failed to initialize HDCP\n"); 1260 - 1261 - ret = psp_dtm_initialize(psp); 1262 - if (ret) 1263 - dev_err(psp->adev->dev, 1264 - "DTM: Failed to initialize DTM\n"); 1265 - } 1266 - 1267 1234 return 0; 1268 1235 } 1269 1236 ··· 1545 1578 ret = psp_np_fw_load(psp); 1546 1579 if (ret) 1547 1580 goto failed; 1581 + 1582 + ret = psp_asd_load(psp); 1583 + if (ret) { 1584 + DRM_ERROR("PSP load asd failed!\n"); 1585 + return ret; 1586 + } 1587 + 1588 + if (adev->gmc.xgmi.num_physical_nodes > 1) { 1589 + ret = psp_xgmi_initialize(psp); 1590 + /* Warning the XGMI seesion initialize failure 1591 + * Instead of stop driver initialization 1592 + */ 1593 + if (ret) 1594 + dev_err(psp->adev->dev, 1595 + "XGMI: Failed to initialize XGMI session\n"); 1596 + } 1597 + 1598 + if (psp->adev->psp.ta_fw) { 1599 + ret = psp_ras_initialize(psp); 1600 + if (ret) 1601 + dev_err(psp->adev->dev, 1602 + "RAS: Failed to initialize RAS\n"); 1603 + 1604 + ret = psp_hdcp_initialize(psp); 1605 + if (ret) 1606 + dev_err(psp->adev->dev, 1607 + "HDCP: Failed to initialize HDCP\n"); 1608 + 1609 + ret = psp_dtm_initialize(psp); 1610 + if (ret) 1611 + dev_err(psp->adev->dev, 1612 + "DTM: Failed to initialize DTM\n"); 1613 + } 1548 1614 1549 1615 return 0; 1550 1616