From: Alexander S. <Ale...@at...> - 2003-11-27 19:35:00
|
not beeing totally deep into the drm-radeon driver... excerpt of agp command register, when chipset is in AGPv3 mode: bit 3, value 8: reserved bit 2..0, value 0: agp transfer mode not yet programmed value 1: agp transfer mode 4x value 2: agp transfer mode 8x value 3-7: reserved the sheme in the hardware is different than below proposed patch. maybe it's a different encoding that is used in radeon_dri.c, i hope someone else can do a more qualified comment on this patch. -Alex. > -----Original Message----- > From: Dmitri Katchalov [mailto:dm...@us...] > Sent: Thursday, November 27, 2003 15:47 > To: dri...@li... > Subject: [Dri-devel] AGP 8x support > > > Greetings, > > It appears that DRI does not quite support AGP 8x and AGP3.0 > in general, please correct me if I'm wrong. > > I've made this quick and dirty patch for Radeon driver only. > I understand that it is not perfect as it has to be copied > into every other driver. A better solution is needed IMHO. > > As a side note I'm now getting a whooping 1% improvement with > AGP 8x according to ut2003 benchmark. I wonder is there is > something else I should look at. BTW I'm running Radeon 9200 > with linux-2.6.0-test9 and the latest (as of today) DRI CVS. > Also AGPFastWrite locks up my machine hard, is this to be expected? > > Regards, > Dmitri > > > diff -r -x CVS > DRI-CVS/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c > DRI-CVS.new/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c > 723,726c723,758 > < 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_AGP_MODE_3_0) { > > switch (info->agpMode) { > > case 8: > > mode |= RADEON_AGP3_8X_MODE; > > break; > > case 4: > > mode |= RADEON_AGP3_4X_MODE; > > break; > > default: > > xf86DrvMsg(pScreen->myNum, X_WARNING, > > "[agp] mode x%d not supported in AGP 3.0, > forcing 4x mode\n", > > info->agpMode); > > mode |= RADEON_AGP3_4X_MODE; > > break; > > } > > } else { > > switch (info->agpMode) { > > case 4: > > mode |= RADEON_AGP2_4X_MODE; > > break; > > case 2: > > mode |= RADEON_AGP2_2X_MODE; > > break; > > case 1: > > mode |= RADEON_AGP2_1X_MODE; > > break; > > default: > > xf86DrvMsg(pScreen->myNum, X_WARNING, > > "[agp] mode x%d not supported in AGP `2.0, > forcing 4x mode\n", > > info->agpMode); > > mode |= RADEON_AGP2_4X_MODE; > > break; > > } > diff -r -x CVS > DRI-CVS/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h > DRI-CVS.new/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h > 55c55 > < #define RADEON_AGP_MAX_MODE 4 > --- > > #define RADEON_AGP_MAX_MODE 8 > diff -r -x CVS > DRI-CVS/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h > DRI-CVS.new/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h > 73,75c73,78 > < # define RADEON_AGP_1X_MODE 0x01 > < # define RADEON_AGP_2X_MODE 0x02 > < # define RADEON_AGP_4X_MODE 0x04 > --- > > # define RADEON_AGP2_1X_MODE 0x01 > > # define RADEON_AGP2_2X_MODE 0x02 > > # define RADEON_AGP2_4X_MODE 0x04 > > # define RADEON_AGP3_4X_MODE 0x01 > > # define RADEON_AGP3_8X_MODE 0x02 > > # define RADEON_AGP_MODE_3_0 0x08 > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Dri-devel mailing list > Dri...@li... > https://lists.sourceforge.net/lists/listinfo/dri-devel > |
From: Dmitri K. <dm...@us...> - 2003-11-28 00:10:34
|
Quoting Alexander Stohr <Ale...@at...>: > not beeing totally deep into the drm-radeon driver... > > excerpt of agp command register, > when chipset is in AGPv3 mode: > bit 3, value 8: reserved > bit 2..0, value 0: agp transfer mode not yet programmed > value 1: agp transfer mode 4x > value 2: agp transfer mode 8x > value 3-7: reserved > > the sheme in the hardware is different than below proposed patch. AGP status and command registers have the same layout (mostly). Bit 3 in AGP status is "AGP 3.0 Mode", bit 3 in AGP command is "reserverd, writes have no effect". The "mode" value here is a bit of a cross between the two. It gets its initial value from the status reg, then some bits are masked away and changed, then it gets passed back to the agp kernel driver. Kernel driver actually uses bit 3 to see if the caller means AGP 2.0 or AGP 3.0 mode and interprets the rest of it accordingly before writing it to AGP command reg. Have a look at http://lxr.linux.no/source/drivers/char/agp/generic.c?v=2.6.0-test7#L410 I'd say it's a mess. Regards, Dmitri |