diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index b8e50a34bdb3..41cf9d0224d9 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |||
@@ -4223,8 +4223,8 @@ static void gfx_v8_0_set_cpg_door_bell(struct amdgpu_device *adev, struct amdgpu | |||
4223 | adev->doorbell_index.gfx_ring0); | 4223 | adev->doorbell_index.gfx_ring0); |
4224 | WREG32(mmCP_RB_DOORBELL_RANGE_LOWER, tmp); | 4224 | WREG32(mmCP_RB_DOORBELL_RANGE_LOWER, tmp); |
4225 | 4225 | ||
4226 | WREG32(mmCP_RB_DOORBELL_RANGE_UPPER, | 4226 | /* There is only one GFX queue */ |
4227 | CP_RB_DOORBELL_RANGE_UPPER__DOORBELL_RANGE_UPPER_MASK); | 4227 | WREG32(mmCP_RB_DOORBELL_RANGE_UPPER, tmp); |
4228 | } | 4228 | } |
4229 | 4229 | ||
4230 | static int gfx_v8_0_cp_gfx_resume(struct amdgpu_device *adev) | 4230 | static int gfx_v8_0_cp_gfx_resume(struct amdgpu_device *adev) |
@@ -4646,8 +4646,19 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring) | |||
4646 | static void gfx_v8_0_set_mec_doorbell_range(struct amdgpu_device *adev) | 4646 | static void gfx_v8_0_set_mec_doorbell_range(struct amdgpu_device *adev) |
4647 | { | 4647 | { |
4648 | if (adev->asic_type > CHIP_TONGA) { | 4648 | if (adev->asic_type > CHIP_TONGA) { |
4649 | WREG32(mmCP_MEC_DOORBELL_RANGE_LOWER, adev->doorbell_index.kiq << 2); | 4649 | /* The first few doorbells in pci doorbell bar are for GFX RB |
4650 | WREG32(mmCP_MEC_DOORBELL_RANGE_UPPER, adev->doorbell_index.mec_ring7 << 2); | 4650 | * rings and all the leftover for MEC. |
4651 | * So CP_MEC_DOORBELL_RANGE_LOWER should be set one index after | ||
4652 | * CP_RB_DOORBELL_RANGE_UPPER, as we assume there is only one | ||
4653 | * GFX RB rings. | ||
4654 | */ | ||
4655 | u32 tmp = REG_SET_FIELD(0, CP_MEC_DOORBELL_RANGE_LOWER, | ||
4656 | DOORBELL_RANGE_LOWER, | ||
4657 | adev->gfx.gfx_ring[0].doorbell_index + 1); | ||
4658 | |||
4659 | WREG32(mmCP_MEC_DOORBELL_RANGE_LOWER, tmp); | ||
4660 | WREG32(mmCP_MEC_DOORBELL_RANGE_UPPER, | ||
4661 | CP_MEC_DOORBELL_RANGE_UPPER__DOORBELL_RANGE_UPPER_MASK); | ||
4651 | } | 4662 | } |
4652 | /* enable doorbells */ | 4663 | /* enable doorbells */ |
4653 | WREG32_FIELD(CP_PQ_STATUS, DOORBELL_ENABLE, 1); | 4664 | WREG32_FIELD(CP_PQ_STATUS, DOORBELL_ENABLE, 1); |