# IGP320M 3D acceleration & X.org or Xfree86-4.4

## tcaptain

Hi, I've got a Compaq Presario 2110 (2100 variant) and I'm dying to get 3D acceleration going on it in Linux.

I've read the very long thread (https://forums.gentoo.org/viewtopic.php?t=47858&highlight=igp320m+presario) about this subject on this forum (printed it out actually) and I had a couple of questions.

1) Is the how-to still valid?  I mean this was while 2.6 was still testing...maybe things have changed a bit such has, the need to patch the kernel (which I think we can skip) and such.

2) Does X.org support the IGP320M?  I've been digging and unable to find a list of supported hardware at their site...and since Gentoo is going to upgrade to them...if it DOES do 3D acceleration on the IGP320M  I'll just wait for the ebuild and emerge.

3) What about XFree4.4?  I've also wondered if all the patches mentionned in the thread above are incorporated, because then I might be tempted to keep the option open to compile that from source (or find an ebuild somewheres).

I mean otherwise, this laptop is awesome and Gentoo is rock solid on the thing...it just sucks that I have to boot into XP to play Quake3 and NeverWinterNights and various other things...

----------

## lots

I have this exact chipset (i have the 900z from compaq. but it has the same video card)  But i installed 2.6.3 dev sources and the 2D accelleration works perfectly.  Since i do not use 3D on my laptop, i couldnt tell you how well this feature works, but from what i could tell there is no support for 3D (according to the drivers list for xfree, the IGP320M only has 2D accelleration in xfree, well if my memory serves me right)

----------

## Gentii

sure it works with some version of xfree like 4.3.99.16 with a patch.

I tried xfree 4.4 but it didn't work (maybe there is a patch too)

And I don't know about X.org , I was wondering too.

Anyway how can you play quake3 and nwn, I didn't even manage to get nwn working on windows with this chip, it sucks too much for gaming  :Smile: 

----------

## tcaptain

Well my fiancee and I play NWN all the time in Windows (we both until recently had the same laptop model..she's got a different one now) with NO problems.  I don't have Quake3 in windows at all but UT plays extremely well.

As for linux, well until I get 3D setup up, I don't know how well it will run...but on my tower, I have NWN working just awesome and I bought Quake3 as a linux version (found it in a bargain bin and jumped on it...10 bucks canadian) and it plays WAYYYYYY better in linux than it ever did in windows.

----------

## Enderson

I'm using XFree 4.3.99.16 with patches, and the mm-sources that already have

radeon and agpgart modules that works OK for me.

Xorg is based on the XFree 4.4-rc2 and probrably the last patch here 

http://bugs.xfree86.org/show_bug.cgi?id=314 works for the Xorg,

who test it first, post the results here.

I'll compile Gnome 2.6 first, I'll try Xorg later.  :Smile: 

----------

## tcaptain

 *Gentii wrote:*   

> sure it works with some version of xfree like 4.3.99.16 with a patch.
> 
> I tried xfree 4.4 but it didn't work (maybe there is a patch too)
> 
> And I don't know about X.org , I was wondering too.
> ...

 

Hey Gentii  :Very Happy: 

I just got 3D running in linux and I can now say for sure, QUAKE3 ROCKS on this machine!  Just had a few games....works great.

----------

## Goeland86

ok, I'm downloading the Xorg source now, and already have the last patch saved. I'll let you guys now how it comes out. Hopefully pretty well, if not, I'll just revert to what I had before.

----------

## Goeland86

ok, quick update: Xorg took the patch like a charm, and it's now compiling.

I hope this works!

If it does, I can send an email to HP on how I did it, and point them to this forum. When I emailed them they pointed me to a link that explained how to get 2D accel working... I hope it works, I hope it works!

----------

## Goeland86

IT WORKED!!!!

glxgears:

```
32971 frames in 5.0 seconds = 6594.200 FPS
```

I'm sooo happy!!!

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

Happy dance across the room with the laptop!

EDIT: this framerate isn't possible.. it's a bug, when the gears window gets hidden by another (in my case the terminal I was running it from) the framerate goes up. The real framerate is about 200FPS

----------

## gazR

For the benefit of a total noob can you tell me how to patch this ebuild?

ATM I have x.org working with the radeon driver for 2d accel, and I have downloaded the patch.

I just don't know what to do now  :Embarassed: 

 *Goeland86 wrote:*   

> IT WORKED!!!!
> 
> glxgears:
> 
> ```
> ...

 

spread the happiness  :Wink: 

Gaz

----------

## Goeland86

ok, what I did was I started emerging Xorg, but when it started to compile I pressed ctrl+c to stop it

then you go into the /var/tmp/portage/xorg-x11<version>/xc directory, type in patch -p1 < <path to the patch> 

and then type make World && make install

and Bingo!

----------

## gazR

Thanks Geoland86! patch worked, am compiling xorg now!

----------

## pens

 *Goeland86 wrote:*   

> IT WORKED!!!!
> 
> glxgears:
> 
> ```
> ...

 

You're getting those scores with an IGP 320/340?

----------

## Goeland86

yup, but the thing is, only when it's hidden by another window.. dunno why, it drops to a couple hundred fps when it's in focus, but it's still pretty high

but as a guy said on #edevelop, the glxgear scores don't mean a thing in general. If you run the evas_software_x11_test (install evas, the EFL rock!) you get a more reliable score... I got 2.203. Which is still pretty good.

----------

## Enderson

 *Goeland86 wrote:*   

> ok, what I did was I started emerging Xorg, but when it started to compile I pressed ctrl+c to stop it
> 
> then you go into the /var/tmp/portage/xorg-x11<version>/xc directory, type in patch -p1 < <path to the patch> 
> 
> and then type make World && make install
> ...

 

Did you use the patches for xfree-4.4 I told, or another one? Could you tell us the URL for this patch?

----------

## Goeland86

it was the patch you were talking about

the very last one in the list from the link you gave above in the forum.

works like a charm!

I'll post it here too:

```
diff -urN xc/lib/GL/mesa/src/drv/r200/r200_context.c xc/lib/GL/mesa/src/drv/r200/r200_context.c

--- xc/lib/GL/mesa/src/drv/r200/r200_context.c   2004-03-06 11:04:07.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_context.c   2004-03-06 11:24:14.000000000 +1100

@@ -422,12 +422,13 @@

       fprintf(stderr, "disabling 3D acceleration\n");

       FALLBACK(rmesa, R200_FALLBACK_DISABLE, 1); 

    }

-   else if (getenv("R200_NO_TCL")) {

+   else if ((getenv("R200_NO_TCL")) || 

+            (rmesa->r200Screen->chipset == R200_CHIPSET_RS300)) {

       fprintf(stderr, "disabling TCL support\n");

       TCL_FALLBACK(rmesa->glCtx, R200_TCL_FALLBACK_TCL_DISABLE, 1); 

    }

    else {

-      if (!getenv("R200_NO_VTXFMT")) {

+     if (!getenv("R200_NO_VTXFMT")) {

     r200VtxfmtInit( ctx );

       }

       _tnl_need_dlist_norm_lengths( ctx, GL_FALSE );

diff -urN xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c

--- xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c   2004-03-06 11:04:07.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_ioctl.c   2004-03-06 11:24:14.000000000 +1100

@@ -110,11 +110,11 @@

       cmd.nbox = rmesa->numClipRects;

       cmd.boxes = (drmClipRect *)rmesa->pClipRects;

    }

-

+   

    ret = drmCommandWrite( rmesa->dri.fd,

            DRM_RADEON_CMDBUF,

            &cmd, sizeof(cmd) );

-

+   

    if (ret)

       fprintf(stderr, "drmCommandWrite: %d\n", ret);

 

diff -urN xc/lib/GL/mesa/src/drv/r200/r200_screen.c xc/lib/GL/mesa/src/drv/r200/r200_screen.c

--- xc/lib/GL/mesa/src/drv/r200/r200_screen.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_screen.c   2004-03-06 11:24:14.000000000 +1100

@@ -64,6 +64,11 @@

 #define PCI_CHIP_R200_LY   0x4C59

 #define PCI_CHIP_R200_LZ   0x4C5A

 #define PCI_CHIP_RV200_QW   0x5157 /* Radeon 7500 - not an R200 at all */

+

+#define PCI_CHIP_RS300_5834   0x5834

+#define PCI_CHIP_RS300_5835   0x5835

+#define PCI_CHIP_RS300_5836   0x5836

+#define PCI_CHIP_RS300_5837   0x5837

 #endif

 

 static r200ScreenPtr __r200Screen;

@@ -104,6 +109,14 @@

       __driUtilMessage("r200CreateScreen(): Device isn't an r200!\n");

       FREE( screen );

       return NULL;      

+

+   case PCI_CHIP_RS300_5834:

+   case PCI_CHIP_RS300_5835:

+   case PCI_CHIP_RS300_5836:

+   case PCI_CHIP_RS300_5837:

+      screen->chipset = R200_CHIPSET_RS300;

+      break;

+

    default:

       screen->chipset = R200_CHIPSET_R200;

       break;

@@ -230,6 +243,9 @@

              &sp, sizeof( sp ) );

    }

 

+   RADEONMMIO      = screen->mmio.map;

+   screen->fbLocation   = (INREG(RADEON_MC_FB_LOCATION) & 0xffff) << 16;

+

    screen->frontOffset   = dri_priv->frontOffset;

    screen->frontPitch   = dri_priv->frontPitch;

    screen->backOffset   = dri_priv->backOffset;

diff -urN xc/lib/GL/mesa/src/drv/r200/r200_screen.h xc/lib/GL/mesa/src/drv/r200/r200_screen.h

--- xc/lib/GL/mesa/src/drv/r200/r200_screen.h   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_screen.h   2004-03-06 11:24:14.000000000 +1100

@@ -51,6 +51,7 @@

 

 #define R200_CHIPSET_R200   1

 #define R200_CHIPSET_MOBILITY 2

+#define R200_CHIPSET_RS300 3

 

 

 #define R200_NR_TEX_HEAPS 2

diff -urN xc/lib/GL/mesa/src/drv/r200/r200_state_init.c xc/lib/GL/mesa/src/drv/r200/r200_state_init.c

--- xc/lib/GL/mesa/src/drv/r200/r200_state_init.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_state_init.c   2004-03-06 11:24:14.000000000 +1100

@@ -384,8 +384,9 @@

    rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] = color_fmt;

    rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |=  R200_DITHER_ENABLE;

 

-   rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset &

-                     R200_COLOROFFSET_MASK);

+   rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = ((rmesa->state.color.drawOffset +

+                      rmesa->r200Screen->fbLocation)

+                      & R200_COLOROFFSET_MASK);

 

    rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = ((rmesa->state.color.drawPitch &

                      R200_COLORPITCH_MASK) |

@@ -441,6 +442,12 @@

 #else

                   R200_VC_NO_SWAP;

 #endif

+               

+   if(rmesa->r200Screen->chipset == R200_CHIPSET_RS300) {

+      /* Bypass TCL */ 

+      rmesa->hw.cst.cmd[CST_SE_VAP_CNTL_STATUS] |= (1<<8);

+   }

+

    rmesa->hw.cst.cmd[CST_RE_POINTSIZE] = 0x100010;

    rmesa->hw.cst.cmd[CST_SE_TCL_INPUT_VTX_0] =

       (0x0 << R200_VERTEX_POSITION_ADDR__SHIFT);

@@ -543,7 +550,10 @@

    rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] = 

       (R200_VAP_TCL_ENABLE | 

        (0x9 << R200_VAP_VF_MAX_VTX_NUM__SHIFT));

-

+   /*

+   if(!(rmesa->TclFallback & R200_TCL_FALLBACK_TCL_DISABLE)) 

+     rmesa->hw.vap.cmd[VAP_SE_VAP_CNTL] &= ~R200_VAP_TCL_ENABLE;

+   */

    rmesa->hw.vte.cmd[VTE_SE_VTE_CNTL] = 

       (R200_VPORT_X_SCALE_ENA |

        R200_VPORT_Y_SCALE_ENA |

diff -urN xc/lib/GL/mesa/src/drv/r200/r200_texmem.c xc/lib/GL/mesa/src/drv/r200/r200_texmem.c

--- xc/lib/GL/mesa/src/drv/r200/r200_texmem.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_texmem.c   2004-03-06 11:24:14.000000000 +1100

@@ -138,7 +138,7 @@

        srcPitch,  

        srcOffset,   

        dstPitch,

-       t->bufAddr,

+       t->bufAddr + rmesa->r200Screen->fbLocation,

        x, 

        y, 

        t->image[0][hwlevel].x + x,

@@ -209,7 +209,7 @@

           blit_format, 

           srcPitch,

           r200GartOffsetFromVirtual( rmesa, texImage->Data ),   

-          dstPitch, t->bufAddr,

+          dstPitch, t->bufAddr + rmesa->r200Screen->fbLocation,

           0, 0, 

           0, 0, 

           width, height );

@@ -256,7 +256,7 @@

     r200EmitBlit( rmesa, 

              blit_format, 

              dstPitch, GET_START( &region ),   

-             dstPitch, t->bufAddr,

+             dstPitch, t->bufAddr + rmesa->r200Screen->fbLocation,

              0, 0, 

              0, done, 

              width, lines );

diff -urN xc/lib/GL/mesa/src/drv/r200/r200_texstate.c xc/lib/GL/mesa/src/drv/r200/r200_texstate.c

--- xc/lib/GL/mesa/src/drv/r200/r200_texstate.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/r200/r200_texstate.c   2004-03-06 11:24:14.000000000 +1100

@@ -1222,7 +1222,7 @@

    cmd[TEX_PP_TXFORMAT_X] |= texobj->pp_txformat_x & TEXOBJ_TXFORMAT_X_MASK;

    cmd[TEX_PP_TXSIZE] = texobj->pp_txsize; /* NPOT only! */

    cmd[TEX_PP_TXPITCH] = texobj->pp_txpitch; /* NPOT only! */

-   cmd[TEX_PP_TXOFFSET] = texobj->pp_txoffset;

+   cmd[TEX_PP_TXOFFSET] = texobj->pp_txoffset + rmesa->r200Screen->fbLocation;

    cmd[TEX_PP_BORDER_COLOR] = texobj->pp_border_color;

    R200_DB_STATECHANGE( rmesa, &rmesa->hw.tex[unit] );

 

diff -urN xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c

--- xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/radeon/radeon_screen.c   2004-03-06 11:24:13.000000000 +1100

@@ -66,6 +66,13 @@

 #define PCI_CHIP_RADEON_LZ   0x4C5A

 

 #define PCI_CHIP_RV200_QW   0x5157 /* Radeon 7500 - not an R200 at all */

+

+#define PCI_CHIP_RS100_4136   0x4136

+#define PCI_CHIP_RS100_4336   0x4336

+#define PCI_CHIP_RS200_4137   0x4137

+#define PCI_CHIP_RS200_4337   0x4337

+#define PCI_CHIP_RS250_4237   0x4237

+#define PCI_CHIP_RS250_4437   0x4437

 #endif

 

 static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );

@@ -191,6 +198,13 @@

    case PCI_CHIP_RV200_QW:

    case PCI_CHIP_RADEON_LW:

       screen->chipset |= RADEON_CHIPSET_TCL;

+   case PCI_CHIP_RS100_4136:

+   case PCI_CHIP_RS100_4336:

+   case PCI_CHIP_RS200_4137:

+   case PCI_CHIP_RS200_4337:

+   case PCI_CHIP_RS250_4237:

+   case PCI_CHIP_RS250_4437:

+      screen->chipset |= RADEON_CHIPSET_IGP;

    case PCI_CHIP_RADEON_QY:

    case PCI_CHIP_RADEON_QZ:

    case PCI_CHIP_RADEON_LY:

@@ -213,6 +227,9 @@

              &sp, sizeof( sp ) );

    }

 

+   RADEONMMIO      = screen->mmio.map;

+   screen->fbLocation   = (INREG(RADEON_MC_FB_LOCATION) & 0xffff) << 16;

+

    screen->frontOffset   = dri_priv->frontOffset;

    screen->frontPitch   = dri_priv->frontPitch;

    screen->backOffset   = dri_priv->backOffset;

diff -urN xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h

--- xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/radeon/radeon_screen.h   2004-03-06 11:24:13.000000000 +1100

@@ -58,6 +58,7 @@

 

 /* chipset features */

 #define RADEON_CHIPSET_TCL   (1 << 0)

+#define RADEON_CHIPSET_IGP   (1 << 1)

 

 typedef struct {

 

diff -urN xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c

--- xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/radeon/radeon_state_init.c   2004-03-06 11:24:13.000000000 +1100

@@ -346,7 +346,7 @@

 

    rmesa->hw.ctx.cmd[CTX_RB3D_CNTL] |=  RADEON_DITHER_ENABLE;

 

-   rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = (rmesa->state.color.drawOffset &

+   rmesa->hw.ctx.cmd[CTX_RB3D_COLOROFFSET] = ((rmesa->state.color.drawOffset+rmesa->radeonScreen->fbLocation) &

                      RADEON_COLOROFFSET_MASK);

 

    rmesa->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = ((rmesa->state.color.drawPitch &

diff -urN xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c

--- xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c   2004-03-06 11:04:08.000000000 +1100

+++ xc/lib/GL/mesa/src/drv/radeon/radeon_texstate.c   2004-03-06 11:24:13.000000000 +1100

@@ -1251,7 +1251,7 @@

    cmd[TEX_PP_TXFILTER] |= texobj->pp_txfilter & TEXOBJ_TXFILTER_MASK;

    cmd[TEX_PP_TXFORMAT] &= ~TEXOBJ_TXFORMAT_MASK;

    cmd[TEX_PP_TXFORMAT] |= texobj->pp_txformat & TEXOBJ_TXFORMAT_MASK;

-   cmd[TEX_PP_TXOFFSET] = texobj->pp_txoffset;

+   cmd[TEX_PP_TXOFFSET] = texobj->pp_txoffset + rmesa->radeonScreen->fbLocation;

    cmd[TEX_PP_BORDER_COLOR] = texobj->pp_border_color;

    RADEON_DB_STATECHANGE( rmesa, &rmesa->hw.tex[unit] );

 

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c   2004-03-06 11:24:15.000000000 +1100

@@ -283,7 +283,7 @@

     pitch64 = ((pScrn->displayWidth * (pScrn->bitsPerPixel / 8) + 0x3f)) >> 6;

 

     RADEONWaitForFifo(pScrn, 1);

-    OUTREG(RADEON_DEFAULT_OFFSET, ((INREG(RADEON_DISPLAY_BASE_ADDR) >> 10)

+    OUTREG(RADEON_DEFAULT_OFFSET, ((info->fbLocation >> 10)

                | (pitch64 << 22)));

 

     RADEONWaitForFifo(pScrn, 1);

@@ -613,3 +613,13 @@

 

     return TRUE;

 }

+

+/* This is used to let accel routines fallback to MMIO 

+ * when DRI failed at DRIFinishScreenInit stage.

+ */

+void RADEONAccelFallbackMMIO(ScreenPtr pScreen)

+{

+    ScrnInfoPtr    pScrn = xf86Screens[pScreen->myNum];

+    RADEONInfoPtr  info  = RADEONPTR(pScrn);

+    RADEONAccelInitMMIO(pScreen, info->accel);

+}

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accelfuncs.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accelfuncs.c

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accelfuncs.c   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_accelfuncs.c   2004-03-06 11:24:15.000000000 +1100

@@ -181,8 +181,8 @@

 

     pitch64 = ((pScrn->displayWidth * (pScrn->bitsPerPixel / 8) + 0x3f)) >> 6;

 

-    OUTREG(RADEON_DEFAULT_OFFSET, (((INREG(RADEON_DISPLAY_BASE_ADDR) + pScrn->fbOffset) >> 10) |

-               (pitch64 << 22)));

+    OUTREG(RADEON_DEFAULT_OFFSET, ((info->fbLocation + pScrn->fbOffset) >> 10) |

+              (pitch64 << 22));

 

     /* FIXME: May need to restore other things, like BKGD_CLK FG_CLK... */

 

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c   2004-03-06 11:24:15.000000000 +1100

@@ -720,10 +720,28 @@

     unsigned int  device = drmAgpDeviceId(info->drmFD);

 

     mode &= ~RADEON_AGP_MODE_MASK;

-    switch (info->agpMode) {

-    case 4:          mode |= RADEON_AGP_4X_MODE;

-    case 2:          mode |= RADEON_AGP_2X_MODE;

-    case 1: default: mode |= RADEON_AGP_1X_MODE;

+    if ((mode & RADEON_AGPv3_MODE) &&

+      (INREG(RADEON_AGP_STATUS) & RADEON_AGPv3_MODE)) {

+      switch (info->agpMode) {

+      case 8:          mode |= RADEON_AGPv3_8X_MODE;

+      case 4: default: mode |= RADEON_AGPv3_4X_MODE;

+      }

+      /*TODO: need to take care of other bits valid for v3 mode

+       *      currently these bitts are nott used in all tested cards.

+       */

+    } else {

+      switch (info->agpMode) {

+      case 4:          mode |= RADEON_AGP_4X_MODE;

+      case 2:          mode |= RADEON_AGP_2X_MODE;

+      case 1: default: mode |= RADEON_AGP_1X_MODE;

+      }

+      if (info->IsIGP) {

+          /* Force to 4x mode, there are some problems with 1x

+        and 2x modes on AGP master side

+      */

+     mode &= ~RADEON_AGP_MODE_MASK;

+     mode |= RADEON_AGP_4X_MODE;

+      }

     }

 

     if (info->agpFastWrite) mode |= RADEON_AGP_FW_MODE;

@@ -753,6 +771,8 @@

     if (info->ChipFamily < CHIP_FAMILY_R200)

    OUTREG(RADEON_AGP_CNTL, INREG(RADEON_AGP_CNTL) | 0x000e0000);

 

+    OUTREG(RADEON_AGP_CNTL, 0x20);

+

             /* Modify the mode if the default mode

              * is not appropriate for this

              * particular combination of graphics

@@ -1021,10 +1041,13 @@

     ScrnInfoPtr    pScrn = xf86Screens[pScreen->myNum];

     int            cpp   = info->CurrentLayout.pixel_bytes;

     drmRadeonInit  drmInfo;

+    unsigned char *RADEONMMIO = info->MMIO;

+    CARD32 tmp;

 

     memset(&drmInfo, 0, sizeof(drmRadeonInit));

 

     if ((info->ChipFamily == CHIP_FAMILY_R200) ||

+   (info->ChipFamily == CHIP_FAMILY_RS300) ||

    (info->ChipFamily == CHIP_FAMILY_RV250) ||

    (info->ChipFamily == CHIP_FAMILY_RV280) )

        drmInfo.func             = DRM_RADEON_INIT_R200_CP;

@@ -1055,9 +1078,19 @@

     drmInfo.buffers_offset      = info->bufHandle;

     drmInfo.gart_textures_offset= info->gartTexHandle;

 

+    tmp = INREG(RADEON_MC_FB_LOCATION);

     if (drmCommandWrite(info->drmFD, DRM_RADEON_CP_INIT,

          &drmInfo, sizeof(drmRadeonInit)) < 0)

    return FALSE;

+    else if (info->fbLocation != ((INREG(RADEON_MC_FB_LOCATION) & 0xffff) << 16)) {

+        /* This is to make sure we are not using a version of kernel driver with

+      the start of FB_LOCATION hard-coded to zero for IGP cards.

+   */

+   xf86DrvMsg(pScreen->myNum, X_WARNING,

+         "Mismatched FB location. Incorrect version of DRM kernel driver is used.\n");

+   OUTREG(RADEON_MC_FB_LOCATION, tmp);

+   return FALSE;

+    }

 

     /* DRM_RADEON_CP_INIT does an engine reset, which resets some engine

      * registers back to their default values, so we need to restore

@@ -1237,7 +1270,8 @@

 

     if ( (info->ChipFamily == CHIP_FAMILY_R200) ||

     (info->ChipFamily == CHIP_FAMILY_RV250) ||

-    (info->ChipFamily == CHIP_FAMILY_RV280) )

+    (info->ChipFamily == CHIP_FAMILY_RV280) ||

+         (info->ChipFamily == CHIP_FAMILY_RS300))

        pDRIInfo->clientDriverName        = R200_DRIVER_NAME;

     else

        pDRIInfo->clientDriverName        = RADEON_DRIVER_NAME;

@@ -1364,7 +1398,8 @@

 

    if ((info->ChipFamily == CHIP_FAMILY_R200) ||

        (info->ChipFamily == CHIP_FAMILY_RV250) ||

-       (info->ChipFamily == CHIP_FAMILY_RV280)) {

+       (info->ChipFamily == CHIP_FAMILY_RV280) ||

+       (info->ChipFamily == CHIP_FAMILY_RS300)) {

        req_minor = 5;

        req_patch = 0;

    } else {

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h   2004-03-06 11:24:15.000000000 +1100

@@ -52,7 +52,7 @@

 

 #define RADEON_DEFAULT_CP_TIMEOUT     10000  /* usecs */

 

-#define RADEON_AGP_MAX_MODE           4

+#define RADEON_AGP_MAX_MODE           8

 

 #define RADEON_CARD_TYPE_RADEON       1

 

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c   2004-03-06 11:24:15.000000000 +1100

@@ -2191,10 +2191,13 @@

         CARD32 tom = INREG(RADEON_NB_TOM);

         pScrn->videoRam = (((tom >> 16) -

              (tom & 0xffff) + 1) << 6);

+   OUTREG(RADEON_CONFIG_MEMSIZE, pScrn->videoRam * 1024);

+        info->fbLocation = (tom & 0xffff) << 16;

+

    OUTREG(RADEON_MC_FB_LOCATION, tom);

-   OUTREG(RADEON_DISPLAY_BASE_ADDR, (tom & 0xffff) << 16);

-   OUTREG(RADEON_DISPLAY2_BASE_ADDR, (tom & 0xffff) << 16);

-   OUTREG(RADEON_OV0_BASE_ADDR, (tom & 0xffff) << 16);

+   OUTREG(RADEON_DISPLAY_BASE_ADDR, info->fbLocation);

+   OUTREG(RADEON_DISPLAY2_BASE_ADDR, info->fbLocation);

+   OUTREG(RADEON_OV0_BASE_ADDR, info->fbLocation);

 

    /* This is supposed to fix the crtc2 noise problem.

    */

@@ -2211,9 +2214,10 @@

    }

 

     }

-    else

+    else {

    pScrn->videoRam      = INREG(RADEON_CONFIG_MEMSIZE) / 1024;

-

+        info->fbLocation = 0;

+    }

     /* Some production boards of m6 will return 0 if it's 8 MB */

     if (pScrn->videoRam == 0) pScrn->videoRam = 8192;

 

@@ -3718,15 +3722,23 @@

     info->CPusecTimeout = RADEON_DEFAULT_CP_TIMEOUT;

 

     if (!info->IsPCI) {

+        unsigned char *RADEONMMIO = info->MMIO;

    if (xf86GetOptValInteger(info->Options,

              OPTION_AGP_MODE, &(info->agpMode))) {

        if (info->agpMode < 1 || info->agpMode > RADEON_AGP_MAX_MODE) {

       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,

-            "Illegal AGP Mode: %d\n", info->agpMode);

-      return FALSE;

+            "Illegal AGP Mode: %dx, set to default %dx mode\n", 

+            info->agpMode, RADEON_DEFAULT_AGP_MODE);

+      info->agpMode = RADEON_DEFAULT_AGP_MODE;

        }

+

+       /* AGP_MAX_MODE is changed to allow v3 8x mode.

+        * At this time we don't know if the AGP bridge supports

+        * 8x mode. This will later be verified on both 

+        * AGP master and target sides.

+        */

        xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,

-             "Using AGP %dx mode\n", info->agpMode);

+             "AGP %dx mode is configured\n", info->agpMode);

    }

 

    if ((info->agpFastWrite = xf86ReturnOptValBool(info->Options,

@@ -4332,6 +4344,8 @@

              (pScrn->displayWidth * pScrn->virtualY *

          info->CurrentLayout.pixel_bytes * 3 + 1023) / 1024);

        info->directRenderingEnabled = FALSE;

+       /* Allow DRI for test */

+       /*

    } else if ((info->ChipFamily == CHIP_FAMILY_RS100) ||

          (info->ChipFamily == CHIP_FAMILY_RS200) ||

          (info->ChipFamily == CHIP_FAMILY_RS300)) {

@@ -4339,6 +4353,7 @@

        xf86DrvMsg(scrnIndex, X_WARNING,

              "Direct rendering not yet supported on "

              "IGP320/330/340/350, 7000, 9000 integrated chips\n");

+       */

    } else if ((info->ChipFamily == CHIP_FAMILY_R300) ||

          (info->ChipFamily == CHIP_FAMILY_R350) ||

          (info->ChipFamily == CHIP_FAMILY_RV350)) {

@@ -4597,15 +4612,15 @@

    xf86DrvMsg(scrnIndex, X_INFO,

          "Will use %d kb for textures at offset 0x%x\n",

          info->textureSize/1024, info->textureOffset);

-

    info->frontPitchOffset = (((info->frontPitch * cpp / 64) << 22) |

-              (info->frontOffset >> 10));

+              ((info->frontOffset+info->fbLocation) >> 10));

 

    info->backPitchOffset = (((info->backPitch * cpp / 64) << 22) |

-             (info->backOffset >> 10));

+             ((info->backOffset+info->fbLocation) >> 10));

 

    info->depthPitchOffset = (((info->depthPitch * cpp / 64) << 22) |

-              (info->depthOffset >> 10));

+              ((info->depthOffset+info->fbLocation) >> 10));

+

     } else

 #endif

     {

@@ -4747,6 +4762,8 @@

                done their thing, complete the DRI

                setup. */

    info->directRenderingEnabled = RADEONDRIFinishScreenInit(pScreen);

+

+   if(!info->directRenderingEnabled) RADEONAccelFallbackMMIO(pScreen);

     }

     if (info->directRenderingEnabled) {

    if ((info->DispPriority == 1) && (!info->IsPCI)) {

@@ -5723,6 +5740,7 @@

     }

 

     if ((info->ChipFamily == CHIP_FAMILY_R300) ||

+   (info->ChipFamily == CHIP_FAMILY_RS300) ||

    (info->ChipFamily == CHIP_FAMILY_R350) ||

    (info->ChipFamily == CHIP_FAMILY_RV350)) {

 

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h   2004-03-06 11:24:14.000000000 +1100

@@ -485,6 +485,7 @@

     int               depthX;

     int               depthY;

 

+    int               fbLocation;

     int               frontOffset;

     int               frontPitch;

     int               backOffset;

@@ -566,6 +567,7 @@

 extern void        RADEONSelectBuffer(ScrnInfoPtr pScrn, int buffer);

 

 extern Bool        RADEONAccelInit(ScreenPtr pScreen);

+extern void        RADEONAccelFallbackMMIO(ScreenPtr pScreen);

 extern void        RADEONEngineInit(ScrnInfoPtr pScrn);

 extern Bool        RADEONCursorInit(ScreenPtr pScreen);

 extern Bool        RADEONDGAInit(ScreenPtr pScreen);

diff -urN xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h   2004-03-06 11:04:37.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h   2004-03-06 11:24:15.000000000 +1100

@@ -75,6 +75,9 @@

 #       define RADEON_AGP_4X_MODE           0x04

 #       define RADEON_AGP_FW_MODE           0x10

 #       define RADEON_AGP_MODE_MASK         0x17

+#       define RADEON_AGPv3_MODE            0x08

+#       define RADEON_AGPv3_4X_MODE         0x01

+#       define RADEON_AGPv3_8X_MODE         0x02

 #define RADEON_ATTRDR                       0x03c1 /* VGA */

 #define RADEON_ATTRDW                       0x03c0 /* VGA */

 #define RADEON_ATTRX                        0x03c0 /* VGA */

diff -urN xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_cp.c xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_cp.c

--- xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_cp.c   2004-03-06 11:04:43.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_cp.c   2004-03-06 11:24:15.000000000 +1100

@@ -883,6 +883,7 @@

    cur_read_ptr = RADEON_READ( RADEON_CP_RB_RPTR );

    RADEON_WRITE( RADEON_CP_RB_WPTR, cur_read_ptr );

    SET_RING_HEAD( dev_priv, cur_read_ptr );

+

    dev_priv->ring.tail = cur_read_ptr;

 

 #if __REALLY_HAVE_AGP

@@ -923,6 +924,7 @@

 

    RADEON_WRITE( RADEON_SCRATCH_UMSK, 0x7 );

 

+

    /* Writeback doesn't seem to work everywhere, test it first */

    DRM_WRITE32( dev_priv->ring_rptr, RADEON_SCRATCHOFF(1), 0 );

    RADEON_WRITE( RADEON_SCRATCH_REG1, 0xdeadbeef );

diff -urN xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_drv.h xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_drv.h

--- xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_drv.h   2004-03-06 11:04:43.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_drv.h   2004-03-06 11:24:15.000000000 +1100

@@ -127,6 +127,7 @@

 

    drm_radeon_depth_clear_t depth_clear;

    

+   unsigned long fb_location;

    unsigned long fb_offset;

    unsigned long mmio_offset;

    unsigned long ring_offset;

diff -urN xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c

--- xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c   2004-03-06 11:04:43.000000000 +1100

+++ xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/radeon_state.c   2004-03-06 11:24:15.000000000 +1100

@@ -317,7 +317,7 @@

       OUT_RING( CP_PACKET0( RADEON_PP_TXFILTER_0, 5 ) );

       OUT_RING( tex[0].pp_txfilter );

       OUT_RING( tex[0].pp_txformat );

-      OUT_RING( tex[0].pp_txoffset );

+      OUT_RING( tex[0].pp_txoffset + dev_priv->fb_location);

       OUT_RING( tex[0].pp_txcblend );

       OUT_RING( tex[0].pp_txablend );

       OUT_RING( tex[0].pp_tfactor );

@@ -337,7 +337,7 @@

       OUT_RING( CP_PACKET0( RADEON_PP_TXFILTER_1, 5 ) );

       OUT_RING( tex[1].pp_txfilter );

       OUT_RING( tex[1].pp_txformat );

-      OUT_RING( tex[1].pp_txoffset );

+      OUT_RING( tex[1].pp_txoffset + dev_priv->fb_location);

       OUT_RING( tex[1].pp_txcblend );

       OUT_RING( tex[1].pp_txablend );

       OUT_RING( tex[1].pp_tfactor );

@@ -357,7 +357,7 @@

       OUT_RING( CP_PACKET0( RADEON_PP_TXFILTER_2, 5 ) );

       OUT_RING( tex[2].pp_txfilter );

       OUT_RING( tex[2].pp_txformat );

-      OUT_RING( tex[2].pp_txoffset );

+      OUT_RING( tex[2].pp_txoffset + dev_priv->fb_location);

       OUT_RING( tex[2].pp_txcblend );

       OUT_RING( tex[2].pp_txablend );

       OUT_RING( tex[2].pp_tfactor );

@@ -1111,7 +1111,6 @@

            (numverts << RADEON_NUM_VERTICES_SHIFT) );

 

       ADVANCE_RING();

-

       i++;

    } while ( i < nbox );

 }

@@ -1186,14 +1185,6 @@

    int count = (prim->finish - start) / sizeof(u16);

    int nbox = sarea_priv->nbox;

 

-   DRM_DEBUG("hwprim 0x%x vfmt 0x%x %d..%d offset: %x nr %d\n",

-        prim->prim,

-        prim->vc_format,

-        prim->start,

-        prim->finish,

-        prim->offset,

-        prim->numverts);

-

    if (bad_prim_vertex_nr( prim->prim, count )) {

       DRM_ERROR( "bad prim %x count %d\n", 

             prim->prim, count );

@@ -1365,7 +1356,8 @@

               RADEON_GMC_CLR_CMP_CNTL_DIS |

               RADEON_GMC_WR_MSK_DIS);

       

-      buffer[2] = (tex->pitch << 22) | (tex->offset >> 10);

+      buffer[2] = ((tex->pitch << 22) | 

+              ((tex->offset + dev_priv->fb_location) >> 10));

       buffer[3] = 0xffffffff;

       buffer[4] = 0xffffffff;

       buffer[5] = (image->y << 16) | image->x;

@@ -2018,7 +2010,7 @@

    OUT_RING( CP_PACKET0( reg, (sz-1) ) );

    OUT_RING_USER_TABLE( data, sz );

    ADVANCE_RING();

-

+   

    cmdbuf->buf += sz * sizeof(int);

    cmdbuf->bufsz -= sz * sizeof(int);

    return 0;

@@ -2041,6 +2033,8 @@

    OUT_RING( CP_PACKET0_TABLE( RADEON_SE_TCL_SCALAR_DATA_REG, sz-1 ) );

    OUT_RING_USER_TABLE( data, sz );

    ADVANCE_RING();

+

+

    cmdbuf->buf += sz * sizeof(int);

    cmdbuf->bufsz -= sz * sizeof(int);

    return 0;

@@ -2168,11 +2162,11 @@

          }

          radeon_emit_clip_rect( dev_priv, &box );

       }

-      

+

       BEGIN_RING( cmdsz );

       OUT_RING_USER_TABLE( cmd, cmdsz );

       ADVANCE_RING();

-

+          

    } while ( ++i < cmdbuf->nbox );

     if (cmdbuf->nbox == 1)

       cmdbuf->nbox = 0;

```

select all this code and save it as the text file "XFree86-4.4.0-radeon-igp.patch"

it oughta work.

----------

## Goeland86

actually, there's another fix that works in an easier manner: it's located here http://public.planetmirror.com/pub/radeonigp/

download the tar.bz2 file, extract it and run sh radeon-blah-blah/install.sh,

it'll do the work on its own.

All you need to do after that is just make sure your xorg.conf or XF86Config is configured properly, and logout and back in. Run chromium or another 3D game to verify: it should work!

----------

## Enderson

I installed xorg-x11 with the patches, and it went almost ok.

I have Direct Rendering : yes, and the same fps with xfree, but now the sound

is OFF, and I can't play Enemy Territory.

```
alsamixer

alsamixer: function snd_ctl_open failed for default: Permission denied
```

And try to run et, and it just stops, and my screen get big, and I have to restart

xorg.

Any help?

----------

## Goeland86

I think it has to do with some permissions in your /dev directory. Might wanna look at where the snd card is and change the read/write permissions on it.

for more detail: 

```
man chmod
```

----------

## The_Bell

Have you got any problem running SDL apps in fullscreen mode?

I got the screen some way compressed and can ony view the "full screen" in a "half screen" and I don't know how to solve the problem.

----------

## Goeland86

mmm, I don't know... I haven't really tried all that hard to be honest... I mostly play quake3 with wine (I can't get the linux version to run... some .cfg file doesn't seem to work or something...)

which app do you have in mind? I can run Celestia without too much trouble, although I confess I haven't tried it in full screen.

----------

## b3cks

 *Goeland86 wrote:*   

> actually, there's another fix that works in an easier manner: it's located here http://public.planetmirror.com/pub/radeonigp/
> 
> download the tar.bz2 file, extract it and run sh radeon-blah-blah/install.sh,
> 
> it'll do the work on its own.
> ...

 

i tried this patch yesterday and it killed me   :Confused: 

when i start xdm (gdm) my screen goes flickering like hell.

i can see a little bit, but it's ... WOOAH!!

the patch told me there are backups in /tmp/... but i can't find any and /etc/X11/ is now like a full dump. a lot of files i have never seen there before.

----------

## Goeland86

uh, you're looking for .tar files in /tmp/. They should be there, unless you purged the directory.

I think it's old-drivers.tar, old-2ddrivers.tar and old-mesadrivers.tar, or something similar at any rate. Maybe it only work well if you do both operations, compile xorg with the patch I posted and run that tarball. I did both, and it works fine, so I can't tell you exactly what went wrong, as I haven't encountered the problem.

----------

## cwt137

For the newest version of the files at  http://public.planetmirror.com/pub/radeonigp/ go to http://dri.sf.net/

----------

## damianfrancis

What were the actual frames per sec that you were getting when the window was not covered.  Cause I am pretty sure that I am not getting 3d accel and I get 450+ with glxgears and the regular radeon drivers no patch.

----------

## damianfrancis

do you have to be running xfree4.4 or xorg to use the whatever from here http://public.planetmirror.com/pub/radeonigp/

and it says in the readme here

http://public.planetmirror.com/pub/radeonigp/README_First

 *Quote:*   

> 6.	Do I still need to patch my kernel?
> 
> Ans:	Radeon IGP patch has been merged in kernel-2.6.3 and above. There is also
> 
> 	DRM cvs update patch in Andrew Morton's mm patch series.

 

so what does this mean, it seemed that this link was supposed to point to a place to get a patch or make patching easier, but then he answeres the question about patching, not by saying that is what this does dumb dumb, but by saying it is in the kernel now.  If this is so then what does that do, is it not a patch?

----------

## damianfrancis

Do I have to have xfree-drm emerged in order to take advantage of http://public.planetmirror.com/pub/radeonigp/

cause I already have the radeon drivers from 2.6.5 mm sources, and x loads, but I have no dri being initialized, and it certainly is in my config file.  When I use that installer even though I do not tell it to install kernel modules, according to the instuctions, it borks everything, and I have to reemerge xfree to get it back, or x won't start and goes on complaining about version number 7 not matching and no display found.  

Anyone know if I need to use a certain version of x, will xorg work better?

Actually if someone wanted to write a simple step by step howto that would really be great.  :Rolling Eyes: 

----------

## Goeland86

with it on I was getting around 250fps...

so I'm pretty sure you have it.

type in glxinfo and look near the top of the output, it should say

Direct Rendering : "yes" or "no"

Btw, I don't have it anymore... something strange happened and all of a sudden it's not there anymore.

I have no clue what it might be... I'll try and fix it and see where the problem is.

I get a weird module version error though, that shouldn't exist.

----------

## damianfrancis

well I just don't know what to say, I mean I can watch movies ever since I stiched to using a radeon driver, but glxinfo says no

```
$ glxinfo

name of display: :0.0

Xlib:  extension "XFree86-DRI" missing on display ":0.0".

display: :0  screen: 0

direct rendering: No

server glx vendor string: SGI

server glx version string: 1.2

server glx extensions:

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context

client glx vendor string: SGI

client glx version string: 1.2

client glx extensions:

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context

GLX extensions:

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context

OpenGL vendor string: Mesa project: www.mesa3d.org

OpenGL renderer string: Mesa GLX Indirect

OpenGL version string: 1.3 Mesa 4.0.4

OpenGL extensions:

    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_texture_border_clamp, 

    GL_ARB_texture_cube_map, GL_ARB_texture_env_add, 

    GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3, 

    GL_ARB_transpose_matrix, GL_EXT_abgr, GL_EXT_blend_color, 

    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_texture_env_add, 

    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, 

    GL_EXT_texture_lod_bias

glu version: 1.3

glu extensions:

    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav

 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat

----------------------------------------------------------------------

0x23 16 tc  1 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x24 16 tc  1 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 None

0x25 16 tc  1 16  0 r  y  .  5  6  5  8  0 16  8 16 16 16 16  0 0 None

0x26 16 tc  1 16  0 r  .  .  5  6  5  8  0 16  8 16 16 16 16  0 0 None

0x27 16 dc  1 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x28 16 dc  1 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 None

0x29 16 dc  1 16  0 r  y  .  5  6  5  8  0 16  8 16 16 16 16  0 0 None

0x2a 16 dc  1 16  0 r  .  .  5  6  5  8  0 16  8 16 16 16 16  0 0 None
```

I dno what the deal is if I try to emerge xfree-drm it says nope we don't like 2.6 use their modules for dri.  And so I am but I get no dri.  If I try to install the patch all hell breaks loose and it effs up my xfree and I have to reinstall it.  When I get the chance I may install xorg then try that igp dri installer thingy.  In the mean time, could you guys let me know if this XF86Config looks alright, and that is not what is shooting me in the foot, I have Load "dri" and "glx" but that is not enough I guess.  Here's a look.

```
Section "ServerLayout"

   Identifier     "XFree86 Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Touchpad" "CorePointer"

   #InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   RgbPath      "/usr/X11R6/lib/X11/rgb"

   ModulePath   "/usr/X11R6/lib/modules"

    FontPath    "/usr/X11R6/lib/X11/fonts/misc"

    FontPath    "/usr/X11R6/lib/X11/fonts/Speedo"

    FontPath    "/usr/X11R6/lib/X11/fonts/Type1"

    FontPath    "/usr/X11R6/lib/X11/fonts/CID"

    FontPath    "/usr/X11R6/lib/X11/fonts/75dpi"

    FontPath    "/usr/X11R6/lib/X11/fonts/100dpi"

    FontPath    "/usr/local/share/fonts"

    FontPath    "/usr/X11R6/lib/X11/fonts"

    FontPath    "/usr/X11R6/lib/X11/fonts/cyrillic"

    FontPath    "/usr/X11R6/lib/X11/fonts/local"

    FontPath    "/usr/X11R6/lib/X11/fonts/TTF"

    FontPath    "/usr/X11R6/lib/X11/fonts/ukr"

    FontPath    "/usr/local/share/fonts/TTF"

    FontPath    "/usr/share/fonts"

    FontPath    "/usr/share/fonts/freefont"

    FontPath    "/usr/X11R6/lib/X11/fonts/sharefont"

EndSection

Section "Module"

   Load  "record"

   Load  "extmod"

   Load  "dbe"

   Load  "dri"

   Load  "glx"

   Load  "xtrap"

   Load  "type1"

   Load  "speedo"

   Load  "freetype"

   Load  "synaptics"

   SubSection "extmod"

      Option "omit xfree-dga"

   EndSubSection

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "keyboard"

   Option       "XkbRules" "xfree86"

   Option       "XkbModel" "presario"

   Option       "XkbLayout" "us"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "PS/2"

   Option       "Device" "/dev/psaux"

EndSection

Section "InputDevice"

   Identifier    "Touchpad"

   Driver           "synaptics"

        Option      "Device"   "/dev/psaux"

   Option      "Protocol"   "auto-dev"

   Option      "LeftEdge"   "1900"

   Option      "RightEdge"   "5400"

   Option      "TopEdge"   "1900"

   Option      "BottomEdge"   "4000"

   Option      "FingerLow"   "25"

   Option      "FingerHigh"   "30"

   Option      "MaxTapTime"   "180"

   Option      "MaxTapMove"   "220"

   Option      "VertScrollDelta" "100"

   Option      "MinSpeed"   "0.02"

   Option      "MaxSpeed"   "0.18"

   Option      "AccelFactor"   "0.0010"

   Option      "UpDownScrolling" "on"

   Option      "SHMConfig"   "on"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

EndSection

Section "Device"

   Identifier  "Card0"

   Driver      "radeon"

   VendorName  "ATI Technologies Inc"

   BoardName   "Radeon Mobility U1"

   BusID       "PCI:1:5:0"

   Option      "AGPMode" "4"

   Option      "EnablePageFlip" "on"

   Option      "AGPFastWrite" "on"

#   Option      "UseFBDev" "on"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   DefaultDepth   16

   SubSection "Display"

      Depth     16

      Modes   "1024x786 800x600"

   EndSubSection

EndSection

Section "DRI"

   Mode 0666

EndSection

```

Anyway thanks for any help or advise you guys have.  And by the way, what video chipsets, kernels, and arch's are you guys on who do have dri working?  And can you play tuxracer or other 3D games?  Cause you would have to think with 450 fps I could get something a little bit better.

----------

## damianfrancis

I almost forgot to mention that the error I get from the term when I launch something such as tuxracer is this:

```
$ tuxracer 600x400

Tux Racer 0.61 -- a Sunspire Studios Production (http://www.sunspirestudios.com)

(c) 1999-2000 Jasmin F. Patry <jfpatry@sunspirestudios.com>

"Tux Racer" is a trademark of Jasmin F. Patry

Tux Racer comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to redistribute it under certain conditions.

See http://www.gnu.org/copyleft/gpl.html for details.

Xlib:  extension "XFree86-DRI" missing on display ":0.0".
```

oh and its just the same when I don't put in 600x400 I was just trying to lower that so it would maybe work better.

----------

## Goeland86

damianfrancis, you don't need xorg to make that installer work: it's compatible with both Xorg and XFree.

Give it a try, it oughta work.

----------

## Goeland86

oh, and you want to do emerge -C opengl-update before using the patch...

then re-emerge XFree, 'cuz it's a matter of symlinks used for the gl libs.

I had that problem too.

----------

## damianfrancis

I did try the patch it did not work.  That's when I get crazy jive about no screen and versions being jacked up.  Are you saying that the way you work it is to first unmerge openglupdate, then use the patch, but don't uncomment anything in the install.sh (so as to use the kernel modules) then re-merge xfree.  Three main steps?

----------

## damianfrancis

well I did what you said, I unmerged opengl-update and I ran the installer.sh, then afterwards I remerged xfree.  It sure did look like it was building some stuff I had not seen but it sure did not work though.  I still get no dri.  Poop.  :Crying or Very sad: 

----------

## Goeland86

you got the three main steps alright... but then the second and third ones are wrong:

first unmerge opengl-update

second re-emerge xfree

third run install.sh

that should do it. If you emerge xfree on top of the new modules, you're replacing them with old ones, and obviously get mixed versions, where xfree borks bad.

Try it in the order mentioned above, and tell me how that works out.

----------

## Macguyvok

Well, I did what was orriginally suggested: 

1) download latest patch

2) emerge xorg-x11 (ctrl-c after it extracts the sources)

3) cd /var/tmp/xorg-<version>/work/xc

4) patch -p1 <Patch Name>.patch

5) make World && make install

Now I have DRI, and I get about 450fps in glxgears. However there's a new problem. When I start Chromium, or UT their screens are blank. Infact any opengl thing I've tried the screen is just blank, with the exception of openglscope in xmms, and glxgears. Heck, even opengl screensavers don't work.

I noticed that whenever I start a 3D program, it says, "disabling TCL". Any Idea what that is?

----------

## Goeland86

no, I don't know what TCL is... but I do know, however, that if you use the binairy installer (the tarball indicated) you won't have that problem anymore.

Apparently there's something wrong with the way it compiles the modules, or something else... I'm not sure. Anyways, I had that same problem too. Use the tarball, and the problem should be fixed. 

If not, let me know.

----------

## Macguyvok

Well, I just did the following:

1) emerge -C opengl-update

2) emerge xorg-x11

3) sh /home/user/radeon<blah>/install.sh

I rebooted, and started X. X seems to work fine, but glxinfo says I no longer have DRI. tried glxgears, gor 340fps, but chromium run @ about 10 fps. So, I take this to mean I musta done something wrong... Any suggestions?

----------

## damianfrancis

Macguyvok It seems that you an I are in the same boat, I am glad you did it with xorg so I don't have to spend time to test this out with xorg.  But on the other hand, Goeland86, I am not sure that I see why unmerging opengl-update, then re-merging xfree would, be any different from using the igp install.sh on a system without doing that.  Cause when you unmerge opengl-update it goes away, but when you re-merge xfree it emerges opengl-update as well as a dependency, so then using the install.sh would be the same as doing it on a system without going thru all that.  What is different about using the install.sh after going through all that, which sounds like it'll just bork my system again causing some conflict between divers and what not.  Does it work better if you do not install anything dri from the kernel (ie. agpgart [with ati-agp] and the dri interface and the radeon igp driver) but instead let the install.sh handle building drivers?

----------

## Goeland86

ahh, k... well, I don't know.. opengl-update is not a dependancy for xorg, so I don't know...

honestly, I'm trying as hard as I can to get this working for me, so that I can help you guys out, but it's tricky

I have a module version mismatch to fix first... once it's working I'll put a tarball with the necessary instructions and files up.

----------

## Macguyvok

Thanks, I appreciate that. Seriously, I know how hard some of this stuff can be, and I thank you for trying to help. I've been trying to get this working for me for... well... almost a year now. (Never ever had DRI under linux on this laptop) 

As a side note, I'm using  this patch for my kernel (the 2.6.1), and it does give me a working agpart. I don't know if that helps at all. I'm going to a few things... see if I can't make it work.

Also, on my system opengl-update is a dependency for x-org....   :Sad: 

Well, I've got a few hours at work, I think I'm going to try my hand at it...[/url]

----------

## Goeland86

mmm, weird about the opengl-update... anyways, I would like to point out that I'm using a 2.6.5 without any patch for the agpgart part, and it works flawlessly on that side.

Let me work at it, and you'll have a tarball with patches and a detailed readme file...

----------

## Goeland86

ok, I finally have it running again! yay!

I have Xorg compiled with the latest XFree 4.4 patch I found here:

http://bugs.xfree86.org/show_bug.cgi?id=314

if you need more directions, read earlier posts in this thread.

I have opengl-update installed too... so I guess that step was unnecessary after all... I wonder who posted on the web that it screwed things up, because it's not true here. Sorry for insisting on it...

Here's what I did after installing the patched Xorg:

Get the latest CVS version of the DRI's project drm following the instructions here: http://dri.sourceforge.net/cgi-bin/moin.cgi/Download

you need only the drm part.

then, without changing directory, type:

```
cd drm/linux

make

cp radeon.ko /lib/modules/<kernel-version>/kernel/char/drm/radeon.ko
```

Then, once that's done, get the tarball mentioned above, and run the installer as root.

Make sure you have the proper radeon module loaded (easiest way to do that is to just reboot, or modprobe -r radeon; modprobe radeon) and restart X, or Xorg.

It should work, glxinfo should return that Direct Rendering is enabled. glxgears only gave me about 180 fps, I was a little disappointed. Then I did opengl-update ati, and I ended with 190fps... not that much better, but I'll take it. Maybe something needs to be optimized on that end, but DRI is good enough without tweaking more. Performance freaks don't buy something with an IGP in it 

 :Wink: 

Feedback on this method appreciated

----------

## tolly

After several attempts, I remain baffled.

glxinfo:

```

...

Xlib:  extension "GLX" missing on display ":0.0".

...

```

/var/log/Xorg.0.log

```

...

(EE) Failed to load module "glx" (module does not exist, 0)

...

```

I had XFree-4.3.99.16 with DRI working, so I'm sure my configs are good.

I:

```

# ebuild xorg-x11... fetch unpack

# cd /var/tmp/portage/xorg-x11-6.7.0/work

# patch -p0 < ~/XFree-4.4....      <--- from bugs.xfree.org

# ebuild xorg-x11... compile install qmerge

# { the kernel modules as stated above}

# ./install.sh

```

At this point i get:

```

Installing new modules to /usr/X11R6/lib/module

cp: cannot create regular file `/usr/X11R6/lib/modules/extensions/libglx.a': No such file or directory

...

Installing new Mesa libraries into /usr/X11R6/lib

ldconfig: /usr/X11R6/lib/libGL.so.1 is not a symbolic link

...

```

I'm sure this is where the problem lies. However I'm not sure how to get the GLX module.

also, running:

```

 opengl-update ati

usage: opengl-update <GL implementation>

...

```

rather than it saying "yes, i've done it" - this happens whatever I type, ati or xfree"

Does anyone have any suggestions - its probably something stupid!

Tolly

----------

## Goeland86

now the interesting bit is the XLib extension missing... I know I had that at one point, and I can't remember how I fixed it...

oh, and for opengl-update ati to work you need to have the ati-drivers emerged, but I think that step is more optional than anything, so you can skip it safely.

Try looking around for a solution to that XLib extension problem...

Also, if you really insist with opengl-update, since you're running Xorg, you need to type

```
opengl-update xorg-x11
```

not xfree  :Idea: 

Hope you can find the solution to your problem soon...

----------

## tolly

As it turns out, I was being a bit of a retard.....

/usr/X11R6/lib/modules/extensions/libglx.a was actually a sym-link to an old bit of xfree.

So basically it works now.

Just to reiterate:

I unmerged xfree, fetched and unpacked xorg-x11, patched it with this patch, then compiled and qmerged it. I then ran the install.sh script, and opengl-update xorg-x11.

And it works!!! (~195fps glxgears)

thanks to Mr Goeland for all his hard work.

tolly

----------

## Goeland86

tolly, the pleasure is mine: I've received so much help from others in the Gentoo forums that I'm glad I can help in return!

----------

## damianfrancis

I thought I would post here since I have dri working now.  Glxgears looks right, glxinfo says I do have dri enabled on my display, and I launched tuxracer (after realizing that the reason it was not working was it had to be 1024x768 minimum, but it played flawlessly.  I do not however seem to be able to view any of the OpenGL screensavers, they just look black when I test them, and the little view window shows some really wierd stuff when I am just in the kde screensaver config window, Hmm.  That is a might anoying.  Anyone have any ideas how to troubleshoot what is going wrong with the screensavers?  I did not get the patch that was mentioned.  I downloaded the install.sh then I unmerged opengl-update, then I re-emerged xorg-x11 (which automatically remerged opengl-update first as a dependency)  then I ran the install.sh on the fresh xorg install.  Made sure the right things were in the xconfig, and all was up and running.  By the way I am currently on mm-sources-2.6.6-rc4 using the dri and ati_agp as well as the built in redeon igp drivers.  And according to dmesg I already had drm enabled on my card, but dri was not getting enabled with x untill just now.  Thanks for all the help   :Laughing: 

----------

## amigafan

 *Macguyvok wrote:*   

> Heck, even opengl screensavers don't work.

 

Same here, but its not black, its a system freeze! bah! Everything was so fine with 4.3.9.16  :Wink: 

Any solutions so far?

----------

## damianfrancis

I feel like the opengl screen savers not working must have something to do with the way that the screen saver is trying to access the display, such as in 800x600 but I am not sure about that.  It just seems so odd that in the past for me, if I didn't have opengl nothing opengl worked, and now I have it, in that tuxracer, and other opengl games work fine, but just not the screen savers.  Some of mine simply don't show up, others do like the rubics cube, but they are all "flashy" and "wierd."  When I get the chance I'm gonna spend some time trouble shooting it.  Is there anyone on  this thread who has gotten their dri working, and does have opengl screensavers, meybe there is a caveat to it some of us are missing.

----------

## damianfrancis

Ok strike what I said about the problem having to do with the way the screensaver accesses the display.  I loaded up gnome, and was able to flawlesly run the exact same screen savers which were giving me the problems under kde.  I tested it with the "flying toasters" and the "glblur" and several others and they all ran fine.  I believe the problem has to do with kde and 24 bit color.  From what I understand kde will do something in software to show you 32 bit color, if you have 24 bit enabled.  Gnome does not do this.  In a moment I will try starting x with 16 bit color or even 8 and see if I still get the crazy flashing and crazy looking screen savers.  If I do I'm gonna check bugzilla and see if there is already a bug posted for this issue.

----------

## damianfrancis

well I tested out other color settings and that did not do it.   Well putting it on 8 bit fixed the flickering but not the opengl screensavers, darn.  Maybe this has something to do with the fact that I do not have a Horz, and Vert Sync range defined in xconfig.  Maybe the one x is using isn't good enough or somethin.  Anyway I'm stumped I need to check bugzilla.

----------

## Goeland86

yeah, seems like a peculiar bug to me...

I'm using enlightenment, not kde. I have kde on my desktop, but not on my laptop... drive space!

thanks for letting us know how it goes!

----------

## damianfrancis

do you think that we can through this installer into an ebuild so we can get more people using it, maybe get it in portage and work out this bug, cause the one I submitted got closed since the installer is not an ebuild.

----------

## Goeland86

I think it'd be nice to get it into an ebuild, but I dunno how to, nor really have the time to write the ebuild for it.

If someone is willing to do it, I'd be delighted, and I think it's a good idea too.

So, you have my support, but I don't have as much time as I would like to do it.

----------

## cirpo

hi, i emerge xorg, then downloaded dri cvs ( xc, drm, mesa) , after all my igp 345 direct rendering worked...but when i try to play a 3d games , such as tuxracer,unrealtournament ecc

 ,the screen becomes blank.I don' know howto fix it!

i post my xorg.conf : 

Section "Module"

	Load  "dbe"

	Load  "Glcore"

	Load  "dri"

	Load  "extmod"

	Load  "fbdevhw"

	Load  "glx"

	Load  "record"

	Load  "freetype"

	Load  "type1"

        Load  "speedo"

EndSection

Section "Device"

	Identifier	"ATI"

	Option "AGPMode" "4"

	Option "AGPFastWrite" "on"

	Option "EnablePageFlip" "on"

        Option          "NvAGP"   "1"

	Driver		"radeon"

	VendorName	"ATI"

	BoardName	"Mobility U1" 		

EndSection

Section "Screen"

	Identifier "Screen0"

	Device 	   "ATI"

	Monitor    "Monitor0"

	DefaultDepth     24

	SubSection "Display"

		Depth     24

		Modes    "1024x768" "800x600" "640x480"

	EndSubSection

	SubSection "Display"

		Depth     32

		Modes    "800x600" 

	EndSubSection

EndSection

Section "DRI"

	Group        0

	Mode         0666

EndSection

in /var/log/Xorg.0.log i got : 

(II) Loading sub module "GLcore"

(II) LoadModule: "GLcore"

(II) Loading /usr/X11R6/lib/modules/extensions/libGLcore.a

(II) Module GLcore: vendor="The XFree86 Project"

        compiled for 4.3.99.12, module version = 1.0.0

        ABI class: XFree86 Server Extension, version 0.2

when i start the X server  from shell (with startx) it says that the module GLcore does not exist,????!!!!!!

any suggestion?

----------

## cwt137

If you get a whole bunch of verticle lines of different colors when running tuxracer, I know what the problem is. Tux, at fullscreen has to be the same resolution as the desktop or it will display weird.

----------

## cirpo

i can't get anything!!!

the screen goes totaly blank, in unrealtournament when it's not in fullscreen mode it goes well, but not when i try in fullscreen, as i said i-ve got the screen totaly blank.Both games are running because i can hear the music games

----------

## Antjac

I have 3D acceleration with my IGP 320M one time but at the reboot, i can't to be in fullscreen, i have a bug and my screen is cut at the middle. But i'm accelered. How can i do ?

----------

## Goeland86

have you tried what I described earlier, step by step? using the tarball and so on? because I know that other ways present problems... this one didn't, and everyone that has tried it has it working.

----------

## Antjac

I downloaded 2.6.6-mm5 , i emerged xorg and i download radeon-igp patch. 

So 3D work but not in full screen if it's different from 1024x768

----------

## cirpo

AAAAHHHHHHHHHHHH!

i have dri enabled, both with xorg and xfree , but when i try to play ut , tuxracer in fullscreen mode i have a blank screen.only pacmanarena works

i can't understand why....

----------

## Antjac

Any idea for me ?

----------

## cirpo

if you want dri , go to  http://dri.sourceforge.net/cgi-bin/moin.cgi/Building#head-7a2ac18b69799977a87886def21198d49bcc7602

.....if you have the mm kernel you don't ha ve to bulit drm.

dri works as i said, i have problems with 3d games, because i have only blank screen

----------

## YANOUSHek

 :Laughing:   :Laughing:   :Laughing: 

I've got mine 320M working!!!

 :Laughing:   :Laughing:   :Laughing: 

I followed the instructions in this topic, so if anyone wants to get DRI working read the topic and play a little with your system. If you encounter any problems don't hasitate to mail me: yanoushek(at)emil.teleton.pl I will gladly help you.

BTW. If you need configuration files for HP-Compaq nx9005 I can mail them to you, just send a request.

THANKS GUYS!!!!  :Very Happy: 

----------

## DocWario

Hi all,

can you make a HOW-TO install a radeon IGP 320m ?

because, reading this topic i saw, there's some problems with the install...

so, you who did a correct install, can you tell us how do that ?

thanx.

----------

## Chewi

I tried to compile DRI from CVS (with Mesa also from CVS) but it didn't work with the stuff in my kernel tree (love-sources-2.6.7) so I got the DRM stuff from CVS as well as per this guide. http://dri.sourceforge.net/cgi-bin/moin.cgi/Building

But I can't get DRI to build. I'm not the only Gentoo user with this problem. Someone posted it to the dri-users mailing list but there's been no response so far. Any ideas? Most likely something gcc or glibc related but I don't fancy downgrading.

http://marc.theaimsgroup.com/?l=dri-users&m=109118255024538&w=2

----------

## Goeland86

Ok, the little howto you requested DocWario:

Step 1: go to http://public.planetmirror.com/pub/radeonigp/

download the tarball somewhere on your drive you can remember.

Step 2: login as root, decompress the tarball

Step 3: go into the directory the tarball just created (should be radeon-igp-3D)

Step 4: run 

```
sh install.sh
```

Step 5: log out, restart X

Step 6: run glxinfo to check if you have direct rendering enabled.

Step 7: if you don't have it, check your xorg.conf and make sure you have the last section in it, it should be this 

```
Section "DRI"

      Mode 0666

EndSection

```

That's how it works. Now you can enjoy quake3, ut2k3, gltron, chromium or other GL based games.

----------

## Chewi

Fixed my problem. If anyone wants to know how, I'll post it up.

----------

## Chewi

Things seem okay except if I restart X, 3D acceleration stops working. Has anyone else had this problem? I've got an IGP 345M. I notice this error in the log when it restarts...

```
(II) RADEON(0): [drm] drmAddMap failed

(EE) RADEON(0): [dri] DRIScreenInit failed. Disabling DRI.
```

It did actually start working again without a total restart on one occasion. Very odd.

----------

## fuoco

The drm module compilation from the tarball failed for me, so I compiled from cvs. In any case I'm running 2.6.8-rc3 so it might not be needed to upgrade drm. 

However the problem is still the same - I do get direct rendering in glxinfo, but most 3d apps/games give me:

drmCommandWrite: -22

drmRadeonCmdBuffer: -22 (exiting)

and after that I see in dmesg:

[drm:radeon_check_and_fixup_packets] *ERROR* Invalid R200 cubic texture offset

[drm:radeon_emit_packets] *ERROR* Packet verification failed

[drm:radeon_cp_cmdbuf] *ERROR* radeon_emit_packets failed

If anyone can help me please....

----------

## Chewi

You need to use the CVS versions of DRI and Mesa as well to fix that problem.

----------

## fuoco

sorry for my questions but how do i do that?

----------

## Chewi

http://dri.sourceforge.net/cgi-bin/moin.cgi/Building

Oh and I just realised, it seems that XOrg/XFree86 patch isn't necessary if you're using the CVS version of XOrg. Sorry if that's obvious. I was going to apply it and I simply forgot but lo and behold, it works anyway.

----------

## fuoco

i get an error when compiling dri

dri_util.c:1640: error: syntax error before "get_msc_rate"

i can't continue from here...

----------

## Chewi

That's the error I mentioned earlier. The solution is here.

https://forums.gentoo.org/viewtopic.php?t=206482

Heheh.

----------

## fuoco

I didn't find the first ifndef statement that has to be fixed, also the file dri_util has moved to the common dir in the sources.

The second fix in the switch statement I did find and fix. I'm now trying to compile and I'll see if it works this time.

By the way, everyone here has an IGP 320M or 340M. I seem to be the only one with 9000/9100 IGP. What's the difference between the cards? Is it possible that mine's not supported?

----------

## Chewi

The file hasn't moved. It's symlinked to the other location that I mentioned. The file in question is actually part of Mesa, not part of DRI. I'm not sure why you couldn't find the ifndef statement though. Everyone else has found it so far.  :Confused: 

----------

## dabbtech

 *Goeland86 wrote:*   

> actually, there's another fix that works in an easier manner: it's located here http://public.planetmirror.com/pub/radeonigp/
> 
> download the tar.bz2 file, extract it and run sh radeon-blah-blah/install.sh,
> 
> it'll do the work on its own.
> ...

 

Compile xorg first or before compiling :l

And do I have to have any ati drivers before this?

----------

## Chewi

The whole point of doing this is because ati-drivers doesn't support the IGP. And I recommend using Xorg CVS over using this patch.

----------

## dabbtech

How does that work?

----------

## Chewi

```

$ cd /usr/src

$ mkdir xorg

$ cd xorg

$ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg login

CVS password: <hit return>

$ cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xorg co -P xc

$ mkdir build

$ cd build

$ lndir ../xc

$ cd config/cf

$ cp xorgsite.def host.def

$ nano -w host.def

(make changes if necessary)

$ cd ../..

$ make World

(wait a very long time)

$ emerge unmerge xorg-x11

$ make install

$ emerge unmerge opengl-update

$ rm -fr /usr/lib/opengl

$ rm -fr /usr/lib/*libGL*

```

That was made up in my head, it might not be exactly like that but hopefully you get the picture. Then follow this guide to the letter. There's one extra thing you need to do but I'll see if you get this far first. X will work okay without the last step, it'll only cause problems when recompiling some stuff.

----------

## Raysiel

i use development-sources (2.6.9-rc2)

i did not apply any patch nor recompile anything.

i simply configured as builtin:

Device Drivers->Character Devices->

/dev/agpgart

ali chipset support

ati chipset support

direct rendering manager

ati radeon

Device drivers->Graphics support->

Ati Radeon Display Support(old driver)

Ati Radeon Display Support

ddc/i2c for ati radon support (although i dunno what this exactly is)

and my 3d works.

well it's not perfect (e.g. in tuxracer tux has some strange colors and so on) but it works!

no gl screensaver tho ;(

hope it can help ^^

----------

## Chewi

You shouldn't need to patch anything now. The xorg-6.8.0 ebuild should work just fine. Though I still recommend that you download the CVS version of the DRM modules.

I get slightly weird effects in Tux Racer too. Tux look a little shiny. But that's all.

What do you guys get in glxgears btw? I get about 400fps but that seems fairly low even for this crappy card. Out of interest, I tried the demo of the proprietary X server at www.xig.com to see if this was any better. With glxgears, I got about 450fps. An improvement but not a huge one. Certainly not worth spending $99 on. It doesn't seem to handle fullscreen stuff very well anyway, due to the fact that it uses different X extensions.

----------

## Raysiel

playing chromium i get some weirdy low framerate (<25 fps)

----------

## Chewi

I haven't played Chromium before but to be honest, I wouldn't expect more fps than that. Trackballs seems to average out at around 25 fps as well but it varies a lot.

----------

