diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2018-03-29 09:09:39 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-04-03 14:08:44 -0400 |
commit | f7a9ee81a88b83915e7c15895c507abede44b0c5 (patch) | |
tree | 61903e2fc7a93c70bdbd895cf12fda708cba7b31 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |
parent | 073997ccd9dd8eb8015f5371ff0ea85a48814bb4 (diff) |
drm/amdgpu: Add support for SRBM selection v3
Also remove code duplication in write and read regs functions.
This also fixes potential missing unlock in amdgpu_debugfs_regs_write
in case get_user would fail.
v2: Add SRBM mutex locking.
v3: Fix TO counter and fix comment location.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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.c | 7 |
1 files changed, 7 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 27943e57681c..b0e591eaa71a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |||
@@ -3475,6 +3475,12 @@ static void gfx_v8_0_select_se_sh(struct amdgpu_device *adev, | |||
3475 | WREG32(mmGRBM_GFX_INDEX, data); | 3475 | WREG32(mmGRBM_GFX_INDEX, data); |
3476 | } | 3476 | } |
3477 | 3477 | ||
3478 | static void gfx_v8_0_select_me_pipe_q(struct amdgpu_device *adev, | ||
3479 | u32 me, u32 pipe, u32 q) | ||
3480 | { | ||
3481 | vi_srbm_select(adev, me, pipe, q, 0); | ||
3482 | } | ||
3483 | |||
3478 | static u32 gfx_v8_0_get_rb_active_bitmap(struct amdgpu_device *adev) | 3484 | static u32 gfx_v8_0_get_rb_active_bitmap(struct amdgpu_device *adev) |
3479 | { | 3485 | { |
3480 | u32 data, mask; | 3486 | u32 data, mask; |
@@ -5442,6 +5448,7 @@ static const struct amdgpu_gfx_funcs gfx_v8_0_gfx_funcs = { | |||
5442 | .select_se_sh = &gfx_v8_0_select_se_sh, | 5448 | .select_se_sh = &gfx_v8_0_select_se_sh, |
5443 | .read_wave_data = &gfx_v8_0_read_wave_data, | 5449 | .read_wave_data = &gfx_v8_0_read_wave_data, |
5444 | .read_wave_sgprs = &gfx_v8_0_read_wave_sgprs, | 5450 | .read_wave_sgprs = &gfx_v8_0_read_wave_sgprs, |
5451 | .select_me_pipe_q = &gfx_v8_0_select_me_pipe_q | ||
5445 | }; | 5452 | }; |
5446 | 5453 | ||
5447 | static int gfx_v8_0_early_init(void *handle) | 5454 | static int gfx_v8_0_early_init(void *handle) |