Re: [BUG] Xserver startup locks system... git bisect results

From: Mark M. Hoffman
Date: Thu Dec 15 2005 - 22:49:48 EST


Hi Paul, Benjamin:

* Paul Mackerras <paulus@xxxxxxxxx> [2005-12-15 20:03:59 +1100]:
> Benjamin Herrenschmidt writes:
>
> > On Thu, 2005-12-15 at 16:07 +1100, Benjamin Herrenschmidt wrote:
> > > Ah, also, something else you can try, is replace
> > >
> > > dev_priv->gart_vm_start = dev_priv->fb_location
> > > + RADEON_READ(RADEON_CONFIG_APER_SIZE);
> >
> > Actually, the above should read
> >
> > + RADEON_READ(RADEON_CONFIG_APER_SIZE) * 2;
>
> With the patch below, my powerbook will sleep and wake up
> successfully.

I added the printk's you (BH) asked for to Paul's patch, resulting in the
patch below. It works fine so far. Here's the relevant kernel log:

Dec 15 22:39:47 jupiter kernel: dev_priv->fb_location is 0xe8000000
Dec 15 22:39:47 jupiter kernel: RADEON_READ(RADEON_CONFIG_APER_SIZE) is 0x08000000
Dec 15 22:39:47 jupiter kernel: [drm] Loading R200 Microcode

Let me know if you need any more info. Thanks.

--- linux-2.6.15-rc5-radeon-test.orig/drivers/char/drm/radeon_cp.c
+++ linux-2.6.15-rc5-radeon-test/drivers/char/drm/radeon_cp.c
@@ -1522,7 +1522,12 @@ 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) * 2;
+ + RADEON_READ(RADEON_CONFIG_MEMSIZE);
+
+printk(KERN_INFO "dev_priv->fb_location is 0x%08x\n",
+ dev_priv->fb_location);
+printk(KERN_INFO "RADEON_READ(RADEON_CONFIG_APER_SIZE) is 0x%08x\n",
+ RADEON_READ(RADEON_CONFIG_APER_SIZE));

#if __OS_HAS_AGP
if (!dev_priv->is_pci)
--- linux-2.6.15-rc5-radeon-test.orig/drivers/char/drm/radeon_drv.h
+++ linux-2.6.15-rc5-radeon-test/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)

--
Mark M. Hoffman
mhoffman@xxxxxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/