Commit 6ae869b9 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/gfx11: drop old bring up code

No longer used.  Remove it.
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 435af0b9
...@@ -3680,55 +3680,6 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, ...@@ -3680,55 +3680,6 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
return 0; return 0;
} }
#ifdef BRING_UP_DEBUG
static int gfx_v11_0_gfx_queue_init_register(struct amdgpu_ring *ring)
{
struct amdgpu_device *adev = ring->adev;
struct v11_gfx_mqd *mqd = ring->mqd_ptr;
/* set mmCP_GFX_HQD_WPTR/_HI to 0 */
WREG32_SOC15(GC, 0, regCP_GFX_HQD_WPTR, mqd->cp_gfx_hqd_wptr);
WREG32_SOC15(GC, 0, regCP_GFX_HQD_WPTR_HI, mqd->cp_gfx_hqd_wptr_hi);
/* set GFX_MQD_BASE */
WREG32_SOC15(GC, 0, regCP_MQD_BASE_ADDR, mqd->cp_mqd_base_addr);
WREG32_SOC15(GC, 0, regCP_MQD_BASE_ADDR_HI, mqd->cp_mqd_base_addr_hi);
/* set GFX_MQD_CONTROL */
WREG32_SOC15(GC, 0, regCP_GFX_MQD_CONTROL, mqd->cp_gfx_mqd_control);
/* set GFX_HQD_VMID to 0 */
WREG32_SOC15(GC, 0, regCP_GFX_HQD_VMID, mqd->cp_gfx_hqd_vmid);
WREG32_SOC15(GC, 0, regCP_GFX_HQD_QUEUE_PRIORITY,
mqd->cp_gfx_hqd_queue_priority);
WREG32_SOC15(GC, 0, regCP_GFX_HQD_QUANTUM, mqd->cp_gfx_hqd_quantum);
/* set GFX_HQD_BASE, similar as CP_RB_BASE */
WREG32_SOC15(GC, 0, regCP_GFX_HQD_BASE, mqd->cp_gfx_hqd_base);
WREG32_SOC15(GC, 0, regCP_GFX_HQD_BASE_HI, mqd->cp_gfx_hqd_base_hi);
/* set GFX_HQD_RPTR_ADDR, similar as CP_RB_RPTR */
WREG32_SOC15(GC, 0, regCP_GFX_HQD_RPTR_ADDR, mqd->cp_gfx_hqd_rptr_addr);
WREG32_SOC15(GC, 0, regCP_GFX_HQD_RPTR_ADDR_HI, mqd->cp_gfx_hqd_rptr_addr_hi);
/* set GFX_HQD_CNTL, similar as CP_RB_CNTL */
WREG32_SOC15(GC, 0, regCP_GFX_HQD_CNTL, mqd->cp_gfx_hqd_cntl);
/* set RB_WPTR_POLL_ADDR */
WREG32_SOC15(GC, 0, regCP_RB_WPTR_POLL_ADDR_LO, mqd->cp_rb_wptr_poll_addr_lo);
WREG32_SOC15(GC, 0, regCP_RB_WPTR_POLL_ADDR_HI, mqd->cp_rb_wptr_poll_addr_hi);
/* set RB_DOORBELL_CONTROL */
WREG32_SOC15(GC, 0, regCP_RB_DOORBELL_CONTROL, mqd->cp_rb_doorbell_control);
/* active the queue */
WREG32_SOC15(GC, 0, regCP_GFX_HQD_ACTIVE, mqd->cp_gfx_hqd_active);
return 0;
}
#endif
static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring) static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring)
{ {
struct amdgpu_device *adev = ring->adev; struct amdgpu_device *adev = ring->adev;
...@@ -3740,9 +3691,6 @@ static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring) ...@@ -3740,9 +3691,6 @@ static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring)
mutex_lock(&adev->srbm_mutex); mutex_lock(&adev->srbm_mutex);
soc21_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0); soc21_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
amdgpu_ring_init_mqd(ring); amdgpu_ring_init_mqd(ring);
#ifdef BRING_UP_DEBUG
gfx_v11_0_gfx_queue_init_register(ring);
#endif
soc21_grbm_select(adev, 0, 0, 0, 0); soc21_grbm_select(adev, 0, 0, 0, 0);
mutex_unlock(&adev->srbm_mutex); mutex_unlock(&adev->srbm_mutex);
if (adev->gfx.me.mqd_backup[mqd_idx]) if (adev->gfx.me.mqd_backup[mqd_idx])
...@@ -3755,13 +3703,6 @@ static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring) ...@@ -3755,13 +3703,6 @@ static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring)
ring->wptr = 0; ring->wptr = 0;
*ring->wptr_cpu_addr = 0; *ring->wptr_cpu_addr = 0;
amdgpu_ring_clear_ring(ring); amdgpu_ring_clear_ring(ring);
#ifdef BRING_UP_DEBUG
mutex_lock(&adev->srbm_mutex);
soc21_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
gfx_v11_0_gfx_queue_init_register(ring);
soc21_grbm_select(adev, 0, 0, 0, 0);
mutex_unlock(&adev->srbm_mutex);
#endif
} else { } else {
amdgpu_ring_clear_ring(ring); amdgpu_ring_clear_ring(ring);
} }
...@@ -3769,7 +3710,6 @@ static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring) ...@@ -3769,7 +3710,6 @@ static int gfx_v11_0_gfx_init_queue(struct amdgpu_ring *ring)
return 0; return 0;
} }
#ifndef BRING_UP_DEBUG
static int gfx_v11_0_kiq_enable_kgq(struct amdgpu_device *adev) static int gfx_v11_0_kiq_enable_kgq(struct amdgpu_device *adev)
{ {
struct amdgpu_kiq *kiq = &adev->gfx.kiq[0]; struct amdgpu_kiq *kiq = &adev->gfx.kiq[0];
...@@ -3791,7 +3731,6 @@ static int gfx_v11_0_kiq_enable_kgq(struct amdgpu_device *adev) ...@@ -3791,7 +3731,6 @@ static int gfx_v11_0_kiq_enable_kgq(struct amdgpu_device *adev)
return amdgpu_ring_test_helper(kiq_ring); return amdgpu_ring_test_helper(kiq_ring);
} }
#endif
static int gfx_v11_0_cp_async_gfx_ring_resume(struct amdgpu_device *adev) static int gfx_v11_0_cp_async_gfx_ring_resume(struct amdgpu_device *adev)
{ {
...@@ -3815,11 +3754,11 @@ static int gfx_v11_0_cp_async_gfx_ring_resume(struct amdgpu_device *adev) ...@@ -3815,11 +3754,11 @@ static int gfx_v11_0_cp_async_gfx_ring_resume(struct amdgpu_device *adev)
if (r) if (r)
goto done; goto done;
} }
#ifndef BRING_UP_DEBUG
r = gfx_v11_0_kiq_enable_kgq(adev); r = gfx_v11_0_kiq_enable_kgq(adev);
if (r) if (r)
goto done; goto done;
#endif
r = gfx_v11_0_cp_gfx_start(adev); r = gfx_v11_0_cp_gfx_start(adev);
if (r) if (r)
goto done; goto done;
...@@ -4453,7 +4392,6 @@ static int gfx_v11_0_hw_init(void *handle) ...@@ -4453,7 +4392,6 @@ static int gfx_v11_0_hw_init(void *handle)
return r; return r;
} }
#ifndef BRING_UP_DEBUG
static int gfx_v11_0_kiq_disable_kgq(struct amdgpu_device *adev) static int gfx_v11_0_kiq_disable_kgq(struct amdgpu_device *adev)
{ {
struct amdgpu_kiq *kiq = &adev->gfx.kiq[0]; struct amdgpu_kiq *kiq = &adev->gfx.kiq[0];
...@@ -4476,7 +4414,6 @@ static int gfx_v11_0_kiq_disable_kgq(struct amdgpu_device *adev) ...@@ -4476,7 +4414,6 @@ static int gfx_v11_0_kiq_disable_kgq(struct amdgpu_device *adev)
return r; return r;
} }
#endif
static int gfx_v11_0_hw_fini(void *handle) static int gfx_v11_0_hw_fini(void *handle)
{ {
...@@ -4488,13 +4425,12 @@ static int gfx_v11_0_hw_fini(void *handle) ...@@ -4488,13 +4425,12 @@ static int gfx_v11_0_hw_fini(void *handle)
amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0); amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
if (!adev->no_hw_access) { if (!adev->no_hw_access) {
#ifndef BRING_UP_DEBUG
if (amdgpu_async_gfx_ring) { if (amdgpu_async_gfx_ring) {
r = gfx_v11_0_kiq_disable_kgq(adev); r = gfx_v11_0_kiq_disable_kgq(adev);
if (r) if (r)
DRM_ERROR("KGQ disable failed\n"); DRM_ERROR("KGQ disable failed\n");
} }
#endif
if (amdgpu_gfx_disable_kcq(adev, 0)) if (amdgpu_gfx_disable_kcq(adev, 0))
DRM_ERROR("KCQ disable failed\n"); DRM_ERROR("KCQ disable failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment