aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 7f18a53ab53a..fc8ff4d3ccf8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -991,6 +991,22 @@ out:
991 return err; 991 return err;
992} 992}
993 993
994static void gfx_v7_0_free_microcode(struct amdgpu_device *adev)
995{
996 release_firmware(adev->gfx.pfp_fw);
997 adev->gfx.pfp_fw = NULL;
998 release_firmware(adev->gfx.me_fw);
999 adev->gfx.me_fw = NULL;
1000 release_firmware(adev->gfx.ce_fw);
1001 adev->gfx.ce_fw = NULL;
1002 release_firmware(adev->gfx.mec_fw);
1003 adev->gfx.mec_fw = NULL;
1004 release_firmware(adev->gfx.mec2_fw);
1005 adev->gfx.mec2_fw = NULL;
1006 release_firmware(adev->gfx.rlc_fw);
1007 adev->gfx.rlc_fw = NULL;
1008}
1009
994/** 1010/**
995 * gfx_v7_0_tiling_mode_table_init - init the hw tiling table 1011 * gfx_v7_0_tiling_mode_table_init - init the hw tiling table
996 * 1012 *
@@ -4489,6 +4505,7 @@ static int gfx_v7_0_sw_fini(void *handle)
4489 gfx_v7_0_cp_compute_fini(adev); 4505 gfx_v7_0_cp_compute_fini(adev);
4490 gfx_v7_0_rlc_fini(adev); 4506 gfx_v7_0_rlc_fini(adev);
4491 gfx_v7_0_mec_fini(adev); 4507 gfx_v7_0_mec_fini(adev);
4508 gfx_v7_0_free_microcode(adev);
4492 4509
4493 return 0; 4510 return 0;
4494} 4511}
@@ -4816,7 +4833,7 @@ static int gfx_v7_0_eop_irq(struct amdgpu_device *adev,
4816 case 2: 4833 case 2:
4817 for (i = 0; i < adev->gfx.num_compute_rings; i++) { 4834 for (i = 0; i < adev->gfx.num_compute_rings; i++) {
4818 ring = &adev->gfx.compute_ring[i]; 4835 ring = &adev->gfx.compute_ring[i];
4819 if ((ring->me == me_id) & (ring->pipe == pipe_id)) 4836 if ((ring->me == me_id) && (ring->pipe == pipe_id))
4820 amdgpu_fence_process(ring); 4837 amdgpu_fence_process(ring);
4821 } 4838 }
4822 break; 4839 break;