OSDN Git Service

drm/amdgpu/pp/smu7: use a local variable for toc indexing
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 12 Jul 2018 13:38:09 +0000 (08:38 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jul 2018 19:52:50 +0000 (14:52 -0500)
commit3d75a8b689af2824dabe79d250b1ec535341109d
treede645ad681df1dab4f1680dfc1a8b558fb30f003
parent3f2ddfa8875ce71a8c12723d1841647af8cbb0ba
drm/amdgpu/pp/smu7: use a local variable for toc indexing

Rather than using the index variable stored in vram.  If
the device fails to come back online after a resume cycle,
reads from vram will return all 1s which will cause a
segfault. Based on a patch from Thomas Martitz <kugel@rockbox.org>.
This avoids the segfault, but we still need to sort out
why the GPU does not come back online after a resume.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105760
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c