Skip to content
Commit 2161e09c authored by Lu Yao's avatar Lu Yao Committed by Alex Deucher
Browse files

drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer



For 'AMDGPU_FAMILY_SI' family cards, in 'si_common_early_init' func, init
'didt_rreg' and 'didt_wreg' to 'NULL'. But in func
'amdgpu_debugfs_regs_didt_read/write', using 'RREG32_DIDT' 'WREG32_DIDT'
lacks of relevant judgment. And other 'amdgpu_ip_block_version' that use
these two definitions won't be added for 'AMDGPU_FAMILY_SI'.

So, add null pointer judgment before calling.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarLu Yao <yaolu@kylinos.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6967741d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment