aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-11-13 15:41:30 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-11-28 17:44:11 -0500
commited162fe7643023b52cc21998a6b3eff15a233c5e (patch)
tree1a5e860ea150bbb21de6abd2b98d141c987fe9a3 /drivers/gpu/drm/amd/amdgpu
parentb43aaee69d4327d05e7624d9471c17d015b4d67d (diff)
drm/amdgpu/gfx7: cache raster_config values
We did this for gfx6 and 8, but somehow missed gfx7. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 5c8a7a48a4ad..419ba0ce7ee5 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -1819,6 +1819,22 @@ static void gfx_v7_0_setup_rb(struct amdgpu_device *adev)
1819 adev->gfx.config.backend_enable_mask, 1819 adev->gfx.config.backend_enable_mask,
1820 num_rb_pipes); 1820 num_rb_pipes);
1821 } 1821 }
1822
1823 /* cache the values for userspace */
1824 for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
1825 for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
1826 gfx_v7_0_select_se_sh(adev, i, j, 0xffffffff);
1827 adev->gfx.config.rb_config[i][j].rb_backend_disable =
1828 RREG32(mmCC_RB_BACKEND_DISABLE);
1829 adev->gfx.config.rb_config[i][j].user_rb_backend_disable =
1830 RREG32(mmGC_USER_RB_BACKEND_DISABLE);
1831 adev->gfx.config.rb_config[i][j].raster_config =
1832 RREG32(mmPA_SC_RASTER_CONFIG);
1833 adev->gfx.config.rb_config[i][j].raster_config_1 =
1834 RREG32(mmPA_SC_RASTER_CONFIG_1);
1835 }
1836 }
1837 gfx_v7_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
1822 mutex_unlock(&adev->grbm_idx_mutex); 1838 mutex_unlock(&adev->grbm_idx_mutex);
1823} 1839}
1824 1840