All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] radeon: Fix KMS CP writeback on big endian machines.
@ 2011-04-19  8:23 Cédric Cano
  2011-04-19  8:54 ` Michel Dänzer
  0 siblings, 1 reply; 8+ messages in thread
From: Cédric Cano @ 2011-04-19  8:23 UTC (permalink / raw)
  To: dri-devel

Hi,

The following patch fixes interrupt acknowledge when write-back is 
enabled on big endian platform.

The same should be applied on evergreen.

Cedric

Signed-off-by: Cedric Cano<ccano at interfaceconcept.com>
---
diff -Naur linux-2.6.38.2/drivers/gpu/drm/radeon/r600.c 
linux-2.6.38.2/drivers/gpu/drm/radeon/r600.c
--- linux-2.6.38.2/drivers/gpu/drm/radeon/r600.c    2011-04-19 
09:52:13.000000000 +0200
+++ linux-2.6.38.2/drivers/gpu/drm/radeon/r600.c    2011-03-27 
20:37:20.000000000 +0200
@@ -3227,7 +3227,7 @@
      u32 wptr, tmp;

      if (rdev->wb.enabled)
-        wptr = le32_to_cpu(rdev->wb.wb[R600_WB_IH_WPTR_OFFSET/4]);
+        wptr = rdev->wb.wb[R600_WB_IH_WPTR_OFFSET/4];
      else
          wptr = RREG32(IH_RB_WPTR);

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] radeon: Fix KMS CP writeback on big endian machines.
@ 2011-04-07 14:17 Michel Dänzer
  2011-04-07 14:33 ` Alex Deucher
  0 siblings, 1 reply; 8+ messages in thread
From: Michel Dänzer @ 2011-04-07 14:17 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel

From: Michel Dänzer <daenzer@vmware.com>

This is necessary even with PCI(e) GART, and it makes writeback work even with
AGP on my PowerBook. Might still be unreliable with older revisions of UniNorth
and other AGP bridges though.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
---
 drivers/gpu/drm/radeon/radeon_fence.c |    2 +-
 drivers/gpu/drm/radeon/radeon_ring.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index 171b0b2..2b0ee62 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -80,7 +80,7 @@ static bool radeon_fence_poll_locked(struct radeon_device *rdev)
 			scratch_index = R600_WB_EVENT_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base;
 		else
 			scratch_index = RADEON_WB_SCRATCH_OFFSET + rdev->fence_drv.scratch_reg - rdev->scratch.reg_base;
-		seq = rdev->wb.wb[scratch_index/4];
+		seq = le32_to_cpu(rdev->wb.wb[scratch_index/4]);
 	} else
 		seq = RREG32(rdev->fence_drv.scratch_reg);
 	if (seq != rdev->fence_drv.last_seq) {
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 992d99d..55ea680 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -248,7 +248,7 @@ void radeon_ib_pool_fini(struct radeon_device *rdev)
 void radeon_ring_free_size(struct radeon_device *rdev)
 {
 	if (rdev->wb.enabled)
-		rdev->cp.rptr = rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4];
+		rdev->cp.rptr = le32_to_cpu(rdev->wb.wb[RADEON_WB_CP_RPTR_OFFSET/4]);
 	else {
 		if (rdev->family >= CHIP_R600)
 			rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
-- 
1.7.4.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-19 15:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19  8:23 [PATCH] radeon: Fix KMS CP writeback on big endian machines Cédric Cano
2011-04-19  8:54 ` Michel Dänzer
2011-04-19 10:06   ` Cédric Cano
2011-04-19 14:38   ` Cédric Cano
2011-04-19 14:53     ` Michel Dänzer
2011-04-19 15:07       ` [PATCH] drm/radeon/kms: fix IH writeback on r6xx+ " Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2011-04-07 14:17 [PATCH] radeon: Fix KMS CP writeback " Michel Dänzer
2011-04-07 14:33 ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.