Skip to contentSkip to conversation

drm/radeon/kms: fix possible sigbus in evergreen accel code

PATCH In review Alex Deucher 3 participants 4 messages Oct 12, 2010 – Oct 19, 2010

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

PATCH 1/1 drm/radeon/kms: fix possible sigbus in evergreen accel code

2.6.35 and 2.6.36 do not contain blit support for evergreen asics so if they use unmappable vram, you can end up with an unreachable buffer address. This should not be applied to drm-next as that tree already contains evergreen blit support. This should only be applied to the 2.6.35 and 2.6.36 stable trees.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=30188

---
 drivers/gpu/drm/radeon/evergreen.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +2 -0
index 2117cf5..f8c0f15 100644
@@ -1480,6 +1480,8 @@ int evergreen_mc_init(struct radeon_device *rdev)
 	rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
 	rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
 	rdev->mc.visible_vram_size = rdev->mc.aper_size;
+	/* limit it to the aperture size for now as there is no blit support in 2.6.35/36*/
+	rdev->mc.real_vram_size = rdev->mc.visible_vram_size;
 	r600_vram_gtt_location(rdev, &rdev->mc);
 	radeon_update_bandwidth_info(rdev);
 
Signature · 1 line
1.7.1.1
#1 lore raw

I need the ack from the DRM maintainer before I can add a patch to the stable tree that is not upstream in Linus's tree, as it is a major exception to the rule.

David?

Quoted 35 lines · Alex Deucher

2.6.35 and 2.6.36 do not contain blit support for evergreen asics so if they use unmappable vram, you can end up with an unreachable buffer address. This should not be applied to drm-next as that tree already contains evergreen blit support. This should only be applied to the 2.6.35 and 2.6.36 stable trees.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=30188

---
 drivers/gpu/drm/radeon/evergreen.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +2 -0
index 2117cf5..f8c0f15 100644
@@ -1480,6 +1480,8 @@ int evergreen_mc_init(struct radeon_device *rdev)
 	rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
 	rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
 	rdev->mc.visible_vram_size = rdev->mc.aper_size;
+	/* limit it to the aperture size for now as there is no blit support in 2.6.35/36*/
+	rdev->mc.real_vram_size = rdev->mc.visible_vram_size;
 	r600_vram_gtt_location(rdev, &rdev->mc);
 	radeon_update_bandwidth_info(rdev);
 
Signature · 6 lines
1.7.1.1

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable
#2 lore raw
Quoted 3 lines · Greg KH

I need the ack from the DRM maintainer before I can add a patch to the stable tree that is not upstream in Linus's tree, as it is a major exception to the rule.

A better fix ended up making it into 2.6.36 afterall, so we don't anything for 2.6.36.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=c919b371cb734f42b1130e706ecee262f8d9261d

However, either patch will work for 2.6.35.

Alex

Quoted 41 lines

David?

Quoted 35 lines · Alex Deucher

2.6.35 and 2.6.36 do not contain blit support for evergreen asics so if they use unmappable vram, you can end up with an unreachable buffer address.  This should not be applied to drm-next as that tree already contains evergreen blit support.  This should only be applied to the 2.6.35 and 2.6.36 stable trees.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=30188

---
 drivers/gpu/drm/radeon/evergreen.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +2 -1
index 2117cf5..f8c0f15 100644
@@ -1480,6 +1480,8 @@ int evergreen_mc_init(struct radeon_device *rdev)
       rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
       rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE) * 1024 * 1024;
       rdev->mc.visible_vram_size = rdev->mc.aper_size;
+     /* limit it to the aperture size for now as there is no blit support in 2.6.35/36*/
+     rdev->mc.real_vram_size = rdev->mc.visible_vram_size;
       r600_vram_gtt_location(rdev, &rdev->mc);
       radeon_update_bandwidth_info(rdev);
 
--

1.7.1.1

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

maintainer Acked-by
#3 lore raw
In reply to Greg KH
Quoted 5 lines · Greg KH

I need the ack from the DRM maintainer before I can add a patch to the stable tree that is not upstream in Linus's tree, as it is a major exception to the rule.

David

For 2.6.35

for 2.6.36 we are all good.

Dave.