aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-10-10 11:15:24 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-25 14:38:31 -0400
commit392f0c775c80de0eae4c07227cc220015df70abc (patch)
treeb37cefed7591377f246b962fa19fb4177cbec6a9 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parente3fa76306f072e1c92b50f866c2583d74ace58ed (diff)
drm/amdgpu/gfx8: cache rb config values
Needed when for SR-IOV and when PG is enabled. 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/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index ba36db8002e7..e0664415b18e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -3694,6 +3694,21 @@ static void gfx_v8_0_setup_rb(struct amdgpu_device *adev)
3694 num_rb_pipes); 3694 num_rb_pipes);
3695 } 3695 }
3696 3696
3697 /* cache the values for userspace */
3698 for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
3699 for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
3700 gfx_v8_0_select_se_sh(adev, i, j, 0xffffffff);
3701 adev->gfx.config.rb_config[i][j].rb_backend_disable =
3702 RREG32(mmCC_RB_BACKEND_DISABLE);
3703 adev->gfx.config.rb_config[i][j].user_rb_backend_disable =
3704 RREG32(mmGC_USER_RB_BACKEND_DISABLE);
3705 adev->gfx.config.rb_config[i][j].raster_config =
3706 RREG32(mmPA_SC_RASTER_CONFIG);
3707 adev->gfx.config.rb_config[i][j].raster_config_1 =
3708 RREG32(mmPA_SC_RASTER_CONFIG_1);
3709 }
3710 }
3711 gfx_v8_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
3697 mutex_unlock(&adev->grbm_idx_mutex); 3712 mutex_unlock(&adev->grbm_idx_mutex);
3698} 3713}
3699 3714