Skip to contentSkip to conversation

drm/amdgpu/gfx6: drop some dead code

PATCH In review Alex Deucher 2 participants 2 messages Sep 1, 2016 – Sep 2, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/gfx6: drop some dead code

The mqd is only used on CI and newer.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0 -23
index 17a560c..040bc7f 100644
@@ -1725,28 +1725,6 @@ static void gfx_v6_0_ring_set_wptr_compute(struct amdgpu_ring *ring)
 
 }
 
-
-static void gfx_v6_0_cp_compute_fini(struct amdgpu_device *adev)
-{
-	int i, r;
-
-	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
-		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
-
-		if (ring->mqd_obj) {
-			r = amdgpu_bo_reserve(ring->mqd_obj, false);
-			if (unlikely(r != 0))
-				dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
-
-			amdgpu_bo_unpin(ring->mqd_obj);
-			amdgpu_bo_unreserve(ring->mqd_obj);
-
-			amdgpu_bo_unref(&ring->mqd_obj);
-			ring->mqd_obj = NULL;
-		}
-	}
-}
-
 static int gfx_v6_0_cp_compute_resume(struct amdgpu_device *adev)
 {
 	struct amdgpu_ring *ring;
@@ -2865,7 +2843,6 @@ static int gfx_v6_0_sw_fini(void *handle)
 	for (i = 0; i < adev->gfx.num_compute_rings; i++)
 		amdgpu_ring_fini(&adev->gfx.compute_ring[i]);
 
-	gfx_v6_0_cp_compute_fini(adev);
 	gfx_v6_0_rlc_fini(adev);
 
 	return 0;
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1472753496-8114-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 42 lines · Alex Deucher

The mqd is only used on CI and newer.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0 -22
index 17a560c..040bc7f 100644
@@ -1725,28 +1725,6 @@ static void gfx_v6_0_ring_set_wptr_compute(struct amdgpu_ring *ring)
 
 }
 
-
-static void gfx_v6_0_cp_compute_fini(struct amdgpu_device *adev)
-{
-	int i, r;
-
-	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
-		struct amdgpu_ring *ring = &adev->gfx.compute_ring[i];
-
-		if (ring->mqd_obj) {
-			r = amdgpu_bo_reserve(ring->mqd_obj, false);
-			if (unlikely(r != 0))
-				dev_warn(adev->dev, "(%d) reserve MQD bo failed\n", r);
-
-			amdgpu_bo_unpin(ring->mqd_obj);
-			amdgpu_bo_unreserve(ring->mqd_obj);
-
-			amdgpu_bo_unref(&ring->mqd_obj);
-			ring->mqd_obj = NULL;
-		}
-	}
-}
-
 static int gfx_v6_0_cp_compute_resume(struct amdgpu_device *adev)
 {
 	struct amdgpu_ring *ring;

drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c static int gfx_v6_0_sw_fini(void *handle) · line 2848

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c +0 -1
@@ -2865,7 +2843,6 @@ static int gfx_v6_0_sw_fini(void *handle)
 	for (i = 0; i < adev->gfx.num_compute_rings; i++)
 		amdgpu_ring_fini(&adev->gfx.compute_ring[i]);
 
-	gfx_v6_0_cp_compute_fini(adev);
 	gfx_v6_0_rlc_fini(adev);
 
 	return 0;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx