aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2018-08-01 00:03:20 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-06-20 22:20:51 -0400
commit4fc6a88f01b938b03298779a9a7b8eb2b66fdace (patch)
tree6f9cb973e00aec4b15b18505981572ca67380f78
parent7470bfcf20141306e2f23d7b0484dc70ba1483fd (diff)
drm/amdgpu: rename amdgpu_gfx_compute_mqd_sw_init
The function now will create mqd bos for both gfx queue and compute queue Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Jack Xiao <jack.xiao@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c8
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c4
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 827eb53c9649..15e9f120ff84 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -360,9 +360,9 @@ int amdgpu_gfx_kiq_init(struct amdgpu_device *adev,
360 return 0; 360 return 0;
361} 361}
362 362
363/* create MQD for each compute queue */ 363/* create MQD for each compute/gfx queue */
364int amdgpu_gfx_compute_mqd_sw_init(struct amdgpu_device *adev, 364int amdgpu_gfx_mqd_sw_init(struct amdgpu_device *adev,
365 unsigned mqd_size) 365 unsigned mqd_size)
366{ 366{
367 struct amdgpu_ring *ring = NULL; 367 struct amdgpu_ring *ring = NULL;
368 int r, i; 368 int r, i;
@@ -411,7 +411,7 @@ int amdgpu_gfx_compute_mqd_sw_init(struct amdgpu_device *adev,
411 return 0; 411 return 0;
412} 412}
413 413
414void amdgpu_gfx_compute_mqd_sw_fini(struct amdgpu_device *adev) 414void amdgpu_gfx_mqd_sw_fini(struct amdgpu_device *adev)
415{ 415{
416 struct amdgpu_ring *ring = NULL; 416 struct amdgpu_ring *ring = NULL;
417 int i; 417 int i;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
index ce543bb969ad..f2441c02f9db 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
@@ -330,9 +330,9 @@ void amdgpu_gfx_kiq_fini(struct amdgpu_device *adev);
330int amdgpu_gfx_kiq_init(struct amdgpu_device *adev, 330int amdgpu_gfx_kiq_init(struct amdgpu_device *adev,
331 unsigned hpd_size); 331 unsigned hpd_size);
332 332
333int amdgpu_gfx_compute_mqd_sw_init(struct amdgpu_device *adev, 333int amdgpu_gfx_mqd_sw_init(struct amdgpu_device *adev,
334 unsigned mqd_size); 334 unsigned mqd_size);
335void amdgpu_gfx_compute_mqd_sw_fini(struct amdgpu_device *adev); 335void amdgpu_gfx_mqd_sw_fini(struct amdgpu_device *adev);
336 336
337void amdgpu_gfx_compute_queue_acquire(struct amdgpu_device *adev); 337void amdgpu_gfx_compute_queue_acquire(struct amdgpu_device *adev);
338void amdgpu_gfx_graphics_queue_acquire(struct amdgpu_device *adev); 338void amdgpu_gfx_graphics_queue_acquire(struct amdgpu_device *adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 173c3d070ef5..c9cc7a25d3cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -2042,7 +2042,7 @@ static int gfx_v8_0_sw_init(void *handle)
2042 return r; 2042 return r;
2043 2043
2044 /* create MQD for all compute queues as well as KIQ for SRIOV case */ 2044 /* create MQD for all compute queues as well as KIQ for SRIOV case */
2045 r = amdgpu_gfx_compute_mqd_sw_init(adev, sizeof(struct vi_mqd_allocation)); 2045 r = amdgpu_gfx_mqd_sw_init(adev, sizeof(struct vi_mqd_allocation));
2046 if (r) 2046 if (r)
2047 return r; 2047 return r;
2048 2048
@@ -2065,7 +2065,7 @@ static int gfx_v8_0_sw_fini(void *handle)
2065 for (i = 0; i < adev->gfx.num_compute_rings; i++) 2065 for (i = 0; i < adev->gfx.num_compute_rings; i++)
2066 amdgpu_ring_fini(&adev->gfx.compute_ring[i]); 2066 amdgpu_ring_fini(&adev->gfx.compute_ring[i]);
2067 2067
2068 amdgpu_gfx_compute_mqd_sw_fini(adev); 2068 amdgpu_gfx_mqd_sw_fini(adev);
2069 amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring, &adev->gfx.kiq.irq); 2069 amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring, &adev->gfx.kiq.irq);
2070 amdgpu_gfx_kiq_fini(adev); 2070 amdgpu_gfx_kiq_fini(adev);
2071 2071
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index e71e0970faeb..76a1211ad9eb 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -1757,7 +1757,7 @@ static int gfx_v9_0_sw_init(void *handle)
1757 return r; 1757 return r;
1758 1758
1759 /* create MQD for all compute queues as wel as KIQ for SRIOV case */ 1759 /* create MQD for all compute queues as wel as KIQ for SRIOV case */
1760 r = amdgpu_gfx_compute_mqd_sw_init(adev, sizeof(struct v9_mqd_allocation)); 1760 r = amdgpu_gfx_mqd_sw_init(adev, sizeof(struct v9_mqd_allocation));
1761 if (r) 1761 if (r)
1762 return r; 1762 return r;
1763 1763
@@ -1799,7 +1799,7 @@ static int gfx_v9_0_sw_fini(void *handle)
1799 for (i = 0; i < adev->gfx.num_compute_rings; i++) 1799 for (i = 0; i < adev->gfx.num_compute_rings; i++)
1800 amdgpu_ring_fini(&adev->gfx.compute_ring[i]); 1800 amdgpu_ring_fini(&adev->gfx.compute_ring[i]);
1801 1801
1802 amdgpu_gfx_compute_mqd_sw_fini(adev); 1802 amdgpu_gfx_mqd_sw_fini(adev);
1803 amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring, &adev->gfx.kiq.irq); 1803 amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring, &adev->gfx.kiq.irq);
1804 amdgpu_gfx_kiq_fini(adev); 1804 amdgpu_gfx_kiq_fini(adev);
1805 1805