Quoting Michel Dänzer <[EMAIL PROTECTED]>:

> On Thu, 2003-11-27 at 15:47, Dmitri Katchalov wrote:
> > 
> > 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.
> 
> I've posted about http://penguinppc.org/~daenzer/DRI/radeon-agp8x.diff
> before, which is a similar patch by Hui Yu. 

     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 bits are not 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;
+       }
     }
 
Sorry, don't we need a break (no pun intended) in those switch statements?

I understand Keith Whitwell
> has integrated yet another version on a CVS branch.

I'll have a look. Which CVS branch are you referring to?

> > >       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;
> 
> This is a bad idea, as higher modes tend to be less stable. The only
> better v2 default than the current 1x would be the mode set up by
> firmware.
OK. Or maybe it's better not to change the mode at all in this case.

> PS: Unified diffs (diff -u) are usually preferred.
My bad. Thank you.


Regards,
Dmitri




-------------------------------------------------------
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
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to