drm/amd/amdgpu: Enable gfx pipe1 and fix related issues
Subsystems (2)
PATCH v2 1/1 drm/amd/amdgpu: Enable gfx pipe1 and fix related issues
Starting from SIENNA CICHLID asic supports two gfx pipes, enabling two graphics queues for performance concern.
v2: Don't change the entity number of AMDGPU_HW_IP_GFX
Signed-off-by Emily Deng <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +21 -21
@@ -4606,7 +4606,7 @@ static int gfx_v10_0_sw_init(void *handle)case IP_VERSION (10 ,3 ,3 ):case IP_VERSION (10 ,3 ,7 ): adev->gfx.me.num_me =1 ; - adev->gfx.me.num_pipe_per_me =1 ; + adev->gfx.me.num_pipe_per_me =2 ; adev->gfx.me.num_queue_per_pipe =1 ; adev->gfx.mec.num_mec =2 ; adev->gfx.mec.num_pipe_per_mec =4 ;
@@ -6008,6 +6008,24 @@ static int gfx_v10_0_cp_gfx_load_microcode(struct amdgpu_device *adev)return 0 ; } +static int gfx_v10_0_wait_for_idle (void *handle) +{ +unsigned i; +u32 tmp; +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +for (i =0 ; i < adev->usec_timeout; i++) { +/* read MC_STATUS */ + tmp =RREG32_SOC15 (GC ,0 , mmGRBM_STATUS) & +GRBM_STATUS__GUI_ACTIVE_MASK ; + +if (!REG_GET_FIELD (tmp,GRBM_STATUS ,GUI_ACTIVE )) +return 0 ; +udelay (1 ); + } +return -ETIMEDOUT ; +} +static int gfx_v10_0_cp_gfx_start (struct amdgpu_device *adev) {struct amdgpu_ring *ring;
@@ -6069,7 +6087,7 @@ static int gfx_v10_0_cp_gfx_start(struct amdgpu_device *adev)amdgpu_ring_write (ring,0x8000 );amdgpu_ring_commit (ring); - +gfx_v10_0_wait_for_idle (adev);/* submit cs packet to copy state 0 to next available state */ if (adev->gfx.num_gfx_rings >1 ) {/* maximum supported gfx ring is 2 */
@@ -7404,24 +7422,6 @@ static bool gfx_v10_0_is_idle(void *handle)return true; } -static int gfx_v10_0_wait_for_idle (void *handle) -{ -unsigned i; -u32 tmp; -struct amdgpu_device *adev = (struct amdgpu_device *)handle; - -for (i =0 ; i < adev->usec_timeout; i++) { -/* read MC_STATUS */ - tmp =RREG32_SOC15 (GC ,0 , mmGRBM_STATUS) & -GRBM_STATUS__GUI_ACTIVE_MASK ; - -if (!REG_GET_FIELD (tmp,GRBM_STATUS ,GUI_ACTIVE )) -return 0 ; -udelay (1 ); - } -return -ETIMEDOUT ; -} -static int gfx_v10_0_soft_reset (void *handle) {u32 grbm_soft_reset =0 ;
@@ -8466,7 +8466,7 @@ static void gfx_v10_0_ring_emit_hdp_flush(struct amdgpu_ring *ring) } reg_mem_engine =0 ; }else { - ref_and_mask = nbio_hf_reg->ref_and_mask_cp0; + ref_and_mask = nbio_hf_reg->ref_and_mask_cp0 << ring->pipe; reg_mem_engine =1 ;/* pfp */ }
Signature · 1 line
2.36.1