lkml.org 
[lkml]   [2005]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: Suspend to {mem,disk} broken in 2.6.15-rc6/rc7 on my T42


On Mon, 26 Dec 2005, Jules Villard wrote:
>
> Please find my .config and the lspci output attached (my graphic card
> is a AGP plugged ATI Radeon Mobility 7500 and I use the "radeon"
> driver from xorg).

Ok, from the sysrq-T stuff it _looks_ like X is just busy-looping in user
space. So it's probably some disagreement between radeonfb and X.org

The fact that everything was ok in -rc5 would imply that it's likely one
of the radeon aperture size issue patches.

> Investigating a bit further, I found out that resume is quite innocent
> about all this: what hangs X is switching from a vt to X.

I'm cc'ing BenH and DaveA, but in the meantime, while waiting for the
professionals, can you try to revert the two attachments (revert "diff-1"
first, try that, and revert "diff-2" after that if it didn't start
working after the first revert).

Thanks,

Linusdiff-tree 281ab031a8c9e5b593142eb4ec59a87faae8676a (from 7b6666530e2736f190a2629c8abe34275054449f)
Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Fri Dec 16 16:52:22 2005 +1100

[PATCH] radeon drm: fix agp aperture map offset

This finally fixes the radeon memory mapping bug that was incorrectly
fixed by the previous patch. This time, we use the actual vram size as
the size to calculate how far to move the AGP aperture from the
framebuffer in card's memory space.

If there are still issues with this patch, they are due to bugs in the X
driver that I'm working on fixing too.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index 9f2b4ef..95ae9e0 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -1312,6 +1312,8 @@ static void radeon_set_pcigart(drm_radeo
static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
{
drm_radeon_private_t *dev_priv = dev->dev_private;
+ unsigned int mem_size;
+
DRM_DEBUG("\n");

dev_priv->is_pci = init->is_pci;
@@ -1521,8 +1523,11 @@ static int radeon_do_init_cp(drm_device_
+ dev_priv->fb_location) >> 10));

dev_priv->gart_size = init->gart_size;
- dev_priv->gart_vm_start = dev_priv->fb_location
- + RADEON_READ(RADEON_CONFIG_APER_SIZE) * 2;
+
+ mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE);
+ if (mem_size == 0)
+ mem_size = 0x800000;
+ dev_priv->gart_vm_start = dev_priv->fb_location + mem_size;

#if __OS_HAS_AGP
if (!dev_priv->is_pci)
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
index 7bda7e3..d92ccee 100644
--- a/drivers/char/drm/radeon_drv.h
+++ b/drivers/char/drm/radeon_drv.h
@@ -379,6 +379,7 @@ extern int r300_do_cp_cmdbuf(drm_device_
# define RADEON_PLL_WR_EN (1 << 7)
#define RADEON_CLOCK_CNTL_INDEX 0x0008
#define RADEON_CONFIG_APER_SIZE 0x0108
+#define RADEON_CONFIG_MEMSIZE 0x00f8
#define RADEON_CRTC_OFFSET 0x0224
#define RADEON_CRTC_OFFSET_CNTL 0x0228
# define RADEON_CRTC_TILE_EN (1 << 15)diff-tree 47807ce381acc34a7ffee2b42e35e96c0f322e52 (from 0e670506668a43e1355b8f10c33d081a676bd521)
Author: Dave Airlie <airlied@linux.ie>
Date: Tue Dec 13 04:18:41 2005 +0000

[drm] fix radeon aperture issue

Ben noticed that on certain cards we've landed the AGP space on top of
the second aperture instead of after it.. Which messes things up a lot
on those machines.

This just moves the gart further out, a more correct fix is in the works
from Ben for after 2.6.15.

Signed-off-by: Dave Airlie <airlied@linux.ie>
CC: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index 03839ea..9f2b4ef 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -1522,7 +1522,7 @@ static int radeon_do_init_cp(drm_device_

dev_priv->gart_size = init->gart_size;
dev_priv->gart_vm_start = dev_priv->fb_location
- + RADEON_READ(RADEON_CONFIG_APER_SIZE);
+ + RADEON_READ(RADEON_CONFIG_APER_SIZE) * 2;

#if __OS_HAS_AGP
if (!dev_priv->is_pci)
\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.852 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site