Skip to contentSkip to conversation

drm/radeon/kms: fix hardcoded mmio size in register functions

PATCH New Alex Deucher 1 participant 1 message Jan 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: fix hardcoded mmio size in register functions

Quoted 1 line

From 79d6a7b8e1ab5fa2e7c87f47a152805d4c39b8ab Mon Sep 17 00:00:00 2001

From: Alex Deucher <[email protected]>
Date: Wed, 13 Jan 2010 19:09:12 -0500
Subject: [PATCH] drm/radeon/kms: fix hardcoded mmio size in register functions

newer asics have large mmio apertures

---
 drivers/gpu/drm/radeon/radeon.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon.h +1 -1
index eb5f99b..dd62db9 100644
@@ -847,7 +847,7 @@ void r600_kms_blit_copy(struct radeon_device *rdev,
 
 static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
 {
-	if (reg < 0x10000)
+	if (reg < rdev->rmmio_size)
 		return readl(((void __iomem *)rdev->rmmio) + reg);
 	else {
 		writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
@@ -857,7 +857,7 @@ static inline uint32_t r100_mm_rreg(struct

radeon_device *rdev, uint32_t reg)

static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t
reg, uint32_t v)
{
- if (reg < 0x10000)
+ if (reg < rdev->rmmio_size)
writel(v, ((void __iomem *)rdev->rmmio) + reg);
else {
writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);

Signature · 1 line
1.5.6.3

From 79d6a7b8e1ab5fa2e7c87f47a152805d4c39b8ab Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Wed, 13 Jan 2010 19:09:12 -0500
Subject: [PATCH] drm/radeon/kms: fix hardcoded mmio size in register functions

newer asics have large mmio apertures

---
 drivers/gpu/drm/radeon/radeon.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon.h +2 -2
index eb5f99b..dd62db9 100644
@@ -847,7 +847,7 @@ void r600_kms_blit_copy(struct radeon_device *rdev,
 
 static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
 {
-	if (reg < 0x10000)
+	if (reg < rdev->rmmio_size)
 		return readl(((void __iomem *)rdev->rmmio) + reg);
 	else {
 		writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
@@ -857,7 +857,7 @@ static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
 
 static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
 {
-	if (reg < 0x10000)
+	if (reg < rdev->rmmio_size)
 		writel(v, ((void __iomem *)rdev->rmmio) + reg);
 	else {
 		writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
Signature · 1 line
1.5.6.3

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel