diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/si.c')
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index 73107fe9e46f..a7fb2735d4a9 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -3162,6 +3162,8 @@ static void si_gpu_init(struct radeon_device *rdev) | |||
3162 | } | 3162 | } |
3163 | 3163 | ||
3164 | WREG32(GRBM_CNTL, GRBM_READ_TIMEOUT(0xff)); | 3164 | WREG32(GRBM_CNTL, GRBM_READ_TIMEOUT(0xff)); |
3165 | WREG32(SRBM_INT_CNTL, 1); | ||
3166 | WREG32(SRBM_INT_ACK, 1); | ||
3165 | 3167 | ||
3166 | evergreen_fix_pci_max_read_req_size(rdev); | 3168 | evergreen_fix_pci_max_read_req_size(rdev); |
3167 | 3169 | ||
@@ -4699,12 +4701,6 @@ int si_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib) | |||
4699 | switch (pkt.type) { | 4701 | switch (pkt.type) { |
4700 | case RADEON_PACKET_TYPE0: | 4702 | case RADEON_PACKET_TYPE0: |
4701 | dev_err(rdev->dev, "Packet0 not allowed!\n"); | 4703 | dev_err(rdev->dev, "Packet0 not allowed!\n"); |
4702 | for (i = 0; i < ib->length_dw; i++) { | ||
4703 | if (i == idx) | ||
4704 | printk("\t0x%08x <---\n", ib->ptr[i]); | ||
4705 | else | ||
4706 | printk("\t0x%08x\n", ib->ptr[i]); | ||
4707 | } | ||
4708 | ret = -EINVAL; | 4704 | ret = -EINVAL; |
4709 | break; | 4705 | break; |
4710 | case RADEON_PACKET_TYPE2: | 4706 | case RADEON_PACKET_TYPE2: |
@@ -4736,8 +4732,15 @@ int si_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib) | |||
4736 | ret = -EINVAL; | 4732 | ret = -EINVAL; |
4737 | break; | 4733 | break; |
4738 | } | 4734 | } |
4739 | if (ret) | 4735 | if (ret) { |
4736 | for (i = 0; i < ib->length_dw; i++) { | ||
4737 | if (i == idx) | ||
4738 | printk("\t0x%08x <---\n", ib->ptr[i]); | ||
4739 | else | ||
4740 | printk("\t0x%08x\n", ib->ptr[i]); | ||
4741 | } | ||
4740 | break; | 4742 | break; |
4743 | } | ||
4741 | } while (idx < ib->length_dw); | 4744 | } while (idx < ib->length_dw); |
4742 | 4745 | ||
4743 | return ret; | 4746 | return ret; |
@@ -5910,6 +5913,7 @@ static void si_disable_interrupt_state(struct radeon_device *rdev) | |||
5910 | tmp = RREG32(DMA_CNTL + DMA1_REGISTER_OFFSET) & ~TRAP_ENABLE; | 5913 | tmp = RREG32(DMA_CNTL + DMA1_REGISTER_OFFSET) & ~TRAP_ENABLE; |
5911 | WREG32(DMA_CNTL + DMA1_REGISTER_OFFSET, tmp); | 5914 | WREG32(DMA_CNTL + DMA1_REGISTER_OFFSET, tmp); |
5912 | WREG32(GRBM_INT_CNTL, 0); | 5915 | WREG32(GRBM_INT_CNTL, 0); |
5916 | WREG32(SRBM_INT_CNTL, 0); | ||
5913 | if (rdev->num_crtc >= 2) { | 5917 | if (rdev->num_crtc >= 2) { |
5914 | WREG32(INT_MASK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0); | 5918 | WREG32(INT_MASK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0); |
5915 | WREG32(INT_MASK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0); | 5919 | WREG32(INT_MASK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0); |
@@ -6199,6 +6203,9 @@ int si_irq_set(struct radeon_device *rdev) | |||
6199 | 6203 | ||
6200 | WREG32(CG_THERMAL_INT, thermal_int); | 6204 | WREG32(CG_THERMAL_INT, thermal_int); |
6201 | 6205 | ||
6206 | /* posting read */ | ||
6207 | RREG32(SRBM_STATUS); | ||
6208 | |||
6202 | return 0; | 6209 | return 0; |
6203 | } | 6210 | } |
6204 | 6211 | ||
@@ -6609,6 +6616,10 @@ restart_ih: | |||
6609 | break; | 6616 | break; |
6610 | } | 6617 | } |
6611 | break; | 6618 | break; |
6619 | case 96: | ||
6620 | DRM_ERROR("SRBM_READ_ERROR: 0x%x\n", RREG32(SRBM_READ_ERROR)); | ||
6621 | WREG32(SRBM_INT_ACK, 0x1); | ||
6622 | break; | ||
6612 | case 124: /* UVD */ | 6623 | case 124: /* UVD */ |
6613 | DRM_DEBUG("IH: UVD int: 0x%08x\n", src_data); | 6624 | DRM_DEBUG("IH: UVD int: 0x%08x\n", src_data); |
6614 | radeon_fence_process(rdev, R600_RING_TYPE_UVD_INDEX); | 6625 | radeon_fence_process(rdev, R600_RING_TYPE_UVD_INDEX); |
@@ -7119,8 +7130,7 @@ int si_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk) | |||
7119 | WREG32_P(CG_UPLL_FUNC_CNTL, UPLL_BYPASS_EN_MASK, ~UPLL_BYPASS_EN_MASK); | 7130 | WREG32_P(CG_UPLL_FUNC_CNTL, UPLL_BYPASS_EN_MASK, ~UPLL_BYPASS_EN_MASK); |
7120 | 7131 | ||
7121 | if (!vclk || !dclk) { | 7132 | if (!vclk || !dclk) { |
7122 | /* keep the Bypass mode, put PLL to sleep */ | 7133 | /* keep the Bypass mode */ |
7123 | WREG32_P(CG_UPLL_FUNC_CNTL, UPLL_SLEEP_MASK, ~UPLL_SLEEP_MASK); | ||
7124 | return 0; | 7134 | return 0; |
7125 | } | 7135 | } |
7126 | 7136 | ||
@@ -7136,8 +7146,7 @@ int si_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk) | |||
7136 | /* set VCO_MODE to 1 */ | 7146 | /* set VCO_MODE to 1 */ |
7137 | WREG32_P(CG_UPLL_FUNC_CNTL, UPLL_VCO_MODE_MASK, ~UPLL_VCO_MODE_MASK); | 7147 | WREG32_P(CG_UPLL_FUNC_CNTL, UPLL_VCO_MODE_MASK, ~UPLL_VCO_MODE_MASK); |
7138 | 7148 | ||
7139 | /* toggle UPLL_SLEEP to 1 then back to 0 */ | 7149 | /* disable sleep mode */ |
7140 | WREG32_P(CG_UPLL_FUNC_CNTL, UPLL_SLEEP_MASK, ~UPLL_SLEEP_MASK); | ||
7141 | WREG32_P(CG_UPLL_FUNC_CNTL, 0, ~UPLL_SLEEP_MASK); | 7150 | WREG32_P(CG_UPLL_FUNC_CNTL, 0, ~UPLL_SLEEP_MASK); |
7142 | 7151 | ||
7143 | /* deassert UPLL_RESET */ | 7152 | /* deassert UPLL_RESET */ |