diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index d7530fdfaad5..a69153435ea7 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |||
@@ -111,6 +111,7 @@ static const struct soc15_reg_golden golden_settings_gc_9_0_vg10[] = | |||
111 | 111 | ||
112 | static const struct soc15_reg_golden golden_settings_gc_9_0_vg20[] = | 112 | static const struct soc15_reg_golden golden_settings_gc_9_0_vg20[] = |
113 | { | 113 | { |
114 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_DCC_CONFIG, 0x0f000080, 0x04000080), | ||
114 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_2, 0x0f000000, 0x0a000000), | 115 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_2, 0x0f000000, 0x0a000000), |
115 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_3, 0x30000000, 0x10000000), | 116 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_3, 0x30000000, 0x10000000), |
116 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG, 0xf3e777ff, 0x22014042), | 117 | SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG, 0xf3e777ff, 0x22014042), |
@@ -1837,13 +1838,15 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format, | |||
1837 | int indirect_offset, | 1838 | int indirect_offset, |
1838 | int list_size, | 1839 | int list_size, |
1839 | int *unique_indirect_regs, | 1840 | int *unique_indirect_regs, |
1840 | int *unique_indirect_reg_count, | 1841 | int unique_indirect_reg_count, |
1841 | int *indirect_start_offsets, | 1842 | int *indirect_start_offsets, |
1842 | int *indirect_start_offsets_count) | 1843 | int *indirect_start_offsets_count, |
1844 | int max_start_offsets_count) | ||
1843 | { | 1845 | { |
1844 | int idx; | 1846 | int idx; |
1845 | 1847 | ||
1846 | for (; indirect_offset < list_size; indirect_offset++) { | 1848 | for (; indirect_offset < list_size; indirect_offset++) { |
1849 | WARN_ON(*indirect_start_offsets_count >= max_start_offsets_count); | ||
1847 | indirect_start_offsets[*indirect_start_offsets_count] = indirect_offset; | 1850 | indirect_start_offsets[*indirect_start_offsets_count] = indirect_offset; |
1848 | *indirect_start_offsets_count = *indirect_start_offsets_count + 1; | 1851 | *indirect_start_offsets_count = *indirect_start_offsets_count + 1; |
1849 | 1852 | ||
@@ -1851,14 +1854,14 @@ static void gfx_v9_1_parse_ind_reg_list(int *register_list_format, | |||
1851 | indirect_offset += 2; | 1854 | indirect_offset += 2; |
1852 | 1855 | ||
1853 | /* look for the matching indice */ | 1856 | /* look for the matching indice */ |
1854 | for (idx = 0; idx < *unique_indirect_reg_count; idx++) { | 1857 | for (idx = 0; idx < unique_indirect_reg_count; idx++) { |
1855 | if (unique_indirect_regs[idx] == | 1858 | if (unique_indirect_regs[idx] == |
1856 | register_list_format[indirect_offset] || | 1859 | register_list_format[indirect_offset] || |
1857 | !unique_indirect_regs[idx]) | 1860 | !unique_indirect_regs[idx]) |
1858 | break; | 1861 | break; |
1859 | } | 1862 | } |
1860 | 1863 | ||
1861 | BUG_ON(idx >= *unique_indirect_reg_count); | 1864 | BUG_ON(idx >= unique_indirect_reg_count); |
1862 | 1865 | ||
1863 | if (!unique_indirect_regs[idx]) | 1866 | if (!unique_indirect_regs[idx]) |
1864 | unique_indirect_regs[idx] = register_list_format[indirect_offset]; | 1867 | unique_indirect_regs[idx] = register_list_format[indirect_offset]; |
@@ -1893,9 +1896,10 @@ static int gfx_v9_1_init_rlc_save_restore_list(struct amdgpu_device *adev) | |||
1893 | adev->gfx.rlc.reg_list_format_direct_reg_list_length, | 1896 | adev->gfx.rlc.reg_list_format_direct_reg_list_length, |
1894 | adev->gfx.rlc.reg_list_format_size_bytes >> 2, | 1897 | adev->gfx.rlc.reg_list_format_size_bytes >> 2, |
1895 | unique_indirect_regs, | 1898 | unique_indirect_regs, |
1896 | &unique_indirect_reg_count, | 1899 | unique_indirect_reg_count, |
1897 | indirect_start_offsets, | 1900 | indirect_start_offsets, |
1898 | &indirect_start_offsets_count); | 1901 | &indirect_start_offsets_count, |
1902 | ARRAY_SIZE(indirect_start_offsets)); | ||
1899 | 1903 | ||
1900 | /* enable auto inc in case it is disabled */ | 1904 | /* enable auto inc in case it is disabled */ |
1901 | tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL)); | 1905 | tmp = RREG32(SOC15_REG_OFFSET(GC, 0, mmRLC_SRM_CNTL)); |
@@ -3404,11 +3408,6 @@ static int gfx_v9_0_late_init(void *handle) | |||
3404 | if (r) | 3408 | if (r) |
3405 | return r; | 3409 | return r; |
3406 | 3410 | ||
3407 | r = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_GFX, | ||
3408 | AMD_PG_STATE_GATE); | ||
3409 | if (r) | ||
3410 | return r; | ||
3411 | |||
3412 | return 0; | 3411 | return 0; |
3413 | } | 3412 | } |
3414 | 3413 | ||