diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-12-07 04:44:20 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-12-15 15:16:23 -0500 |
commit | 202e0b227b906cb80a2791f21216a55d9468d61b (patch) | |
tree | 8f1a9a5de850a6831518f179aacc1bdc3988dbb3 | |
parent | eb584241226958d45aa1f07f4f6a6ea9da98b29e (diff) |
drm/amdgpu: fix init save/restore list in gfx_v8.0
set valid data to mmRLC_SRM_INDEX_CNTL_ADDRx/DATAx.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 2dbe6a1d8973..2e65ccbb91be 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |||
@@ -3949,8 +3949,12 @@ static int gfx_v8_0_init_save_restore_list(struct amdgpu_device *adev) | |||
3949 | temp = mmRLC_SRM_INDEX_CNTL_ADDR_0; | 3949 | temp = mmRLC_SRM_INDEX_CNTL_ADDR_0; |
3950 | data = mmRLC_SRM_INDEX_CNTL_DATA_0; | 3950 | data = mmRLC_SRM_INDEX_CNTL_DATA_0; |
3951 | for (i = 0; i < sizeof(unique_indices) / sizeof(int); i++) { | 3951 | for (i = 0; i < sizeof(unique_indices) / sizeof(int); i++) { |
3952 | amdgpu_mm_wreg(adev, temp + i, unique_indices[i] & 0x3FFFF, false); | 3952 | if (unique_indices[i] != 0) { |
3953 | amdgpu_mm_wreg(adev, data + i, unique_indices[i] >> 20, false); | 3953 | amdgpu_mm_wreg(adev, temp + i, |
3954 | unique_indices[i] & 0x3FFFF, false); | ||
3955 | amdgpu_mm_wreg(adev, data + i, | ||
3956 | unique_indices[i] >> 20, false); | ||
3957 | } | ||
3954 | } | 3958 | } |
3955 | kfree(register_list_format); | 3959 | kfree(register_list_format); |
3956 | 3960 | ||