aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2009-09-30 16:18:43 -0400
committerDave Airlie <airlied@redhat.com>2009-10-01 19:39:23 -0400
commitac447df4f2283a116a3fbbc28cbaabf05758b736 (patch)
tree5fdf4749560edb366e369bcfa43b5196831adfae /drivers/gpu/drm
parente7d40b9a0a7c857383ef50db9766354bd3be1bf3 (diff)
drm/radeon/kms: Fix irq handling on AVIVO hw
Avivo hw have vblank interrupt in different place, fixes irq handling (especialy irq disabling while suspending or shuting down the module). Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/r520.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon.h2
-rw-r--r--drivers/gpu/drm/radeon/rs600.c13
-rw-r--r--drivers/gpu/drm/radeon/rs690.c4
-rw-r--r--drivers/gpu/drm/radeon/rv515.c4
5 files changed, 19 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c
index a58b6fa132eb..a555b7b19b48 100644
--- a/drivers/gpu/drm/radeon/r520.c
+++ b/drivers/gpu/drm/radeon/r520.c
@@ -186,7 +186,7 @@ static int r520_startup(struct radeon_device *rdev)
186 } 186 }
187 /* Enable IRQ */ 187 /* Enable IRQ */
188 rdev->irq.sw_int = true; 188 rdev->irq.sw_int = true;
189 r100_irq_set(rdev); 189 rs600_irq_set(rdev);
190 /* 1M ring buffer */ 190 /* 1M ring buffer */
191 r = r100_cp_init(rdev, 1024 * 1024); 191 r = r100_cp_init(rdev, 1024 * 1024);
192 if (r) { 192 if (r) {
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 8d9dd03a9cda..3598adca034a 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1064,6 +1064,8 @@ extern void rs400_gart_fini(struct radeon_device *rdev);
1064 1064
1065/* rs600 */ 1065/* rs600 */
1066extern void rs600_set_safe_registers(struct radeon_device *rdev); 1066extern void rs600_set_safe_registers(struct radeon_device *rdev);
1067extern int rs600_irq_set(struct radeon_device *rdev);
1068extern void rs600_irq_disable(struct radeon_device *rdev);
1067 1069
1068/* rs690, rs740 */ 1070/* rs690, rs740 */
1069extern void rs690_line_buffer_adjust(struct radeon_device *rdev, 1071extern void rs690_line_buffer_adjust(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index fbe0b87c4794..01f6834aa4b1 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -229,6 +229,17 @@ static inline uint32_t rs600_irq_ack(struct radeon_device *rdev, u32 *r500_disp_
229 return irqs & irq_mask; 229 return irqs & irq_mask;
230} 230}
231 231
232void rs600_irq_disable(struct radeon_device *rdev)
233{
234 u32 tmp;
235
236 WREG32(R_000040_GEN_INT_CNTL, 0);
237 WREG32(R_006540_DxMODE_INT_MASK, 0);
238 /* Wait and acknowledge irq */
239 mdelay(1);
240 rs600_irq_ack(rdev, &tmp);
241}
242
232int rs600_irq_process(struct radeon_device *rdev) 243int rs600_irq_process(struct radeon_device *rdev)
233{ 244{
234 uint32_t status; 245 uint32_t status;
@@ -403,7 +414,7 @@ int rs600_suspend(struct radeon_device *rdev)
403{ 414{
404 r100_cp_disable(rdev); 415 r100_cp_disable(rdev);
405 r100_wb_disable(rdev); 416 r100_wb_disable(rdev);
406 r100_irq_disable(rdev); 417 rs600_irq_disable(rdev);
407 rs600_gart_disable(rdev); 418 rs600_gart_disable(rdev);
408 return 0; 419 return 0;
409} 420}
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index c3cd2f689ef0..025e3225346c 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -606,7 +606,7 @@ static int rs690_startup(struct radeon_device *rdev)
606 return r; 606 return r;
607 /* Enable IRQ */ 607 /* Enable IRQ */
608 rdev->irq.sw_int = true; 608 rdev->irq.sw_int = true;
609 r100_irq_set(rdev); 609 rs600_irq_set(rdev);
610 /* 1M ring buffer */ 610 /* 1M ring buffer */
611 r = r100_cp_init(rdev, 1024 * 1024); 611 r = r100_cp_init(rdev, 1024 * 1024);
612 if (r) { 612 if (r) {
@@ -647,7 +647,7 @@ int rs690_suspend(struct radeon_device *rdev)
647{ 647{
648 r100_cp_disable(rdev); 648 r100_cp_disable(rdev);
649 r100_wb_disable(rdev); 649 r100_wb_disable(rdev);
650 r100_irq_disable(rdev); 650 rs600_irq_disable(rdev);
651 rs400_gart_disable(rdev); 651 rs400_gart_disable(rdev);
652 return 0; 652 return 0;
653} 653}
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
index 07e50ac62a33..41a34c23e6d8 100644
--- a/drivers/gpu/drm/radeon/rv515.c
+++ b/drivers/gpu/drm/radeon/rv515.c
@@ -478,7 +478,7 @@ static int rv515_startup(struct radeon_device *rdev)
478 } 478 }
479 /* Enable IRQ */ 479 /* Enable IRQ */
480 rdev->irq.sw_int = true; 480 rdev->irq.sw_int = true;
481 r100_irq_set(rdev); 481 rs600_irq_set(rdev);
482 /* 1M ring buffer */ 482 /* 1M ring buffer */
483 r = r100_cp_init(rdev, 1024 * 1024); 483 r = r100_cp_init(rdev, 1024 * 1024);
484 if (r) { 484 if (r) {
@@ -520,7 +520,7 @@ int rv515_suspend(struct radeon_device *rdev)
520{ 520{
521 r100_cp_disable(rdev); 521 r100_cp_disable(rdev);
522 r100_wb_disable(rdev); 522 r100_wb_disable(rdev);
523 r100_irq_disable(rdev); 523 rs600_irq_disable(rdev);
524 if (rdev->flags & RADEON_IS_PCIE) 524 if (rdev->flags & RADEON_IS_PCIE)
525 rv370_pcie_gart_disable(rdev); 525 rv370_pcie_gart_disable(rdev);
526 return 0; 526 return 0;