summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2018-11-08 13:43:46 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-11-09 16:29:02 -0500
commit88dfc9a3dd47027c9ffc831635e5cf4e8ed3b781 (patch)
treeaf39f500da7c656ab14c92fed89e4a0e5aefa8fb /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentfdb81fd788a732b5efda8638be3fe159550b032d (diff)
downloadlinux-stable-88dfc9a3dd47027c9ffc831635e5cf4e8ed3b781.tar.gz
linux-stable-88dfc9a3dd47027c9ffc831635e5cf4e8ed3b781.tar.bz2
linux-stable-88dfc9a3dd47027c9ffc831635e5cf4e8ed3b781.zip
drm/amdgpu: separate amdgpu_rlc into a single file
Separate the function and struct of RLC from the file of GFX. Abstract the function of amdgpu_gfx_rlc_fini. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Acked-by: Christian König <christian.koenig@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_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index ae720851974f..84831839070c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1112,19 +1112,6 @@ static void rv_init_cp_jump_table(struct amdgpu_device *adev)
}
}
-static void gfx_v9_0_rlc_fini(struct amdgpu_device *adev)
-{
- /* clear state block */
- amdgpu_bo_free_kernel(&adev->gfx.rlc.clear_state_obj,
- &adev->gfx.rlc.clear_state_gpu_addr,
- (void **)&adev->gfx.rlc.cs_ptr);
-
- /* jump table block */
- amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj,
- &adev->gfx.rlc.cp_table_gpu_addr,
- (void **)&adev->gfx.rlc.cp_table_ptr);
-}
-
static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
{
volatile u32 *dst_ptr;
@@ -1147,7 +1134,7 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
if (r) {
dev_err(adev->dev, "(%d) failed to create rlc csb bo\n",
r);
- adev->gfx.rlc.funcs->fini(adev);
+ amdgpu_gfx_rlc_fini(adev);
return r;
}
/* set up the cs buffer */
@@ -1169,7 +1156,7 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)
if (r) {
dev_err(adev->dev,
"(%d) failed to create cp table bo\n", r);
- adev->gfx.rlc.funcs->fini(adev);
+ amdgpu_gfx_rlc_fini(adev);
return r;
}
@@ -3884,7 +3871,6 @@ static const struct amdgpu_rlc_funcs gfx_v9_0_rlc_funcs = {
.enter_safe_mode = gfx_v9_0_enter_rlc_safe_mode,
.exit_safe_mode = gfx_v9_0_exit_rlc_safe_mode,
.init = gfx_v9_0_rlc_init,
- .fini = gfx_v9_0_rlc_fini,
.resume = gfx_v9_0_rlc_resume,
.stop = gfx_v9_0_rlc_stop,
.reset = gfx_v9_0_rlc_reset,