<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 16px;">Reviewed-by: Evan Quan <evan.quan@amd.com></span><br>
</p>
</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>发件人:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Huang Rui <ray.huang@amd.com><br>
<b>发送时间:</b> 2018年4月8日 14:57:34<br>
<b>收件人:</b> Deucher, Alexander; amd-gfx@lists.freedesktop.org<br>
<b>抄送:</b> Huang, Ray<br>
<b>主题:</b> [PATCH] drm/amdgpu: fix null pointer panic with direct fw loading on gpu reset</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">When system uses fw direct loading, then psp context structure won't be<br>
initiliazed. And it is also unable to execute mode reset.<br>
<br>
[ 434.601474] amdgpu 0000:0c:00.0: GPU reset begin!<br>
[ 434.694326] amdgpu 0000:0c:00.0: GPU reset<br>
[ 434.743152] BUG: unable to handle kernel NULL pointer dereference at<br>
0000000000000058<br>
[ 434.838474] IP: psp_gpu_reset+0xc/0x30 [amdgpu]<br>
[ 434.893532] PGD 406ed9067<br>
[ 434.893533] P4D 406ed9067<br>
[ 434.926376] PUD 400b46067<br>
[ 434.959217] PMD 0<br>
[ 435.033379] Oops: 0000 [#1] SMP<br>
[ 435.072573] Modules linked in: amdgpu(OE) chash(OE) gpu_sched(OE) ttm(OE)<br>
drm_kms_helper(OE) drm(OE) fb_sys_fops syscopyarea sysfillrect sysimgblt<br>
rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs lockd grace fscache snd_hda_codec_realtek<br>
snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_hda_codec<br>
snd_hda_core snd_hwdep snd_pcm edac_mce_amd snd_seq_midi snd_seq_midi_event<br>
kvm_amd snd_rawmidi kvm irqbypass crct10dif_pclmul crc32_pclmul snd_seq<br>
ghash_clmulni_intel snd_seq_device pcbc snd_timer eeepc_wmi aesni_intel snd<br>
asus_wmi aes_x86_64 sparse_keymap crypto_simd glue_helper joydev soundcore<br>
wmi_bmof cryptd video i2c_piix4 shpchp 8250_dw i2c_designware_platform mac_hid<br>
i2c_designware_core sunrpc parport_pc ppdev lp parport autofs4 hid_generic igb<br>
usbhid dca ptp mxm_wmi pps_core ahci hid i2c_algo_bit<br>
[ 435.931754] libahci wmi<br>
<br>
Signed-off-by: Huang Rui <ray.huang@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++<br>
1 file changed, 3 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 a0f6200..eb1a152 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
@@ -494,6 +494,9 @@ static int psp_resume(void *handle)<br>
<br>
int psp_gpu_reset(struct amdgpu_device *adev)<br>
{<br>
+ if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)<br>
+ return 0;<br>
+<br>
return psp_mode1_reset(&adev->psp);<br>
}<br>
<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>