<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><font face="wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial,sans-serif,serif,EmojiFont" size="2" color="#212121"><span style="font-size: 14.67px;">Reviewed-by: Rex Zhu<rezhu@amd.com></span></font><br style="font-family: Calibri, Helvetica, sans-serif; font-size: 16px;">
<br style="font-family: Calibri, Helvetica, sans-serif; font-size: 16px;">
<font face="wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial,sans-serif,serif,EmojiFont" size="2" color="#212121"><span style="font-size: 14.67px;">Best Regards</span></font><br style="font-family: Calibri, Helvetica, sans-serif; font-size: 16px;">
<font face="wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial,sans-serif,serif,EmojiFont" size="2" color="#212121"><span style="font-size: 14.67px;">Rex</span></font><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<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 Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Saturday, March 10, 2018 4:25 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Deucher, Alexander<br>
<b>Subject:</b> [PATCH 1/5] drm/amdgpu/psp: add a few more fw load type checks</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">We already checked and returned early in most of the IP<br>
functions, fill in the rest as well.<br>
<br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++<br>
1 file changed, 9 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
index 6e712f12eecd..9a75410cd576 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
@@ -62,6 +62,9 @@ static int psp_sw_init(void *handle)<br>
<br>
psp->adev = adev;<br>
<br>
+ if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)<br>
+ return 0;<br>
+<br>
ret = psp_init_microcode(psp);<br>
if (ret) {<br>
DRM_ERROR("Failed to load psp firmware!\n");<br>
@@ -75,6 +78,9 @@ static int psp_sw_fini(void *handle)<br>
{<br>
struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
<br>
+ if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)<br>
+ return 0;<br>
+<br>
release_firmware(adev->psp.sos_fw);<br>
adev->psp.sos_fw = NULL;<br>
release_firmware(adev->psp.asd_fw);<br>
@@ -453,6 +459,9 @@ static int psp_suspend(void *handle)<br>
struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
struct psp_context *psp = &adev->psp;<br>
<br>
+ if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)<br>
+ return 0;<br>
+<br>
ret = psp_ring_stop(psp, PSP_RING_TYPE__KM);<br>
if (ret) {<br>
DRM_ERROR("PSP ring stop failed\n");<br>
-- <br>
2.13.6<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk654463" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15206415960070.41559663690356863" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15206415960000.9188478999666134" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15206415960020.49848630955478734" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15206415960020.5606062448394871"></div>
<div id="LPTitle_15206415960020.33631673000971873" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15206415960040.5013208655303729" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank" style="text-decoration: none;">amd-gfx Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15206415960040.28154669853536984" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_15206415960060.9247230807680245" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>