drm/amdgpu/gfx9: add additional MQD initialization
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 17 Apr 2017 21:34:42 +0000 (17:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 May 2017 17:16:07 +0000 (13:16 -0400)
Need to properly set the ROQ space setting.

Reviewed-by: monk liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index 178fe11bd7f9931040dd80da92bd013746c9a649..5f2ae4cb510f1e5f32fb32a0355dcc2e7db08944 100644 (file)
@@ -1998,6 +1998,11 @@ static int gfx_v9_0_mqd_init(struct amdgpu_ring *ring)
        tmp = REG_SET_FIELD(tmp, CP_HQD_PERSISTENT_STATE, PRELOAD_SIZE, 0x53);
        mqd->cp_hqd_persistent_state = tmp;
 
+       /* set MIN_IB_AVAIL_SIZE */
+       tmp = RREG32_SOC15(GC, 0, mmCP_HQD_IB_CONTROL);
+       tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
+       mqd->cp_hqd_ib_control = tmp;
+
        /* activate the queue */
        mqd->cp_hqd_active = 1;