On Thu, 3 Mar 2005, Rune Petersen wrote:
1) the Xorg driver defaults to R200 for R420 cards. RADEONDRIKernelInit() in radeon_dri.c
Could you test that your patch works with regular freedesktop.org DRM driver as far as 2d is concerned ? It should print a message in the log that DRI is enabled, though, of course, you would not be able to use R300 Mesa driver.
I gave it a try, no problem. patch: r420_drm-microcode-fix.patch
2) RADEONInitDispBandwidth() is disabled for r420 cards. I have no problem enabling this. are there a reason for this?
Well, the reason is that we don't have documentation for R4xx cards to update it - the latest ATI ever released to us is R3xx docs.
As you can see there are a lot of arrays tabulating "magic" values - these can only be obtained from designers of the hardware, or, perhaps, with some diagnostics equipment.
There are also special cases for R300 cards and we do not know what they should be for your card.
However, if you do need it enabled, we could change the code flow and put a comment warning that this does not come from documentation. This would also need to be discussed on X.org devel list before committing, maybe Hue or Michel or someone else will contribute actual code for R4xx cards.
Ok.
3) I can enable more pipes for r420 cards, but am unable to test it on 420 cards with fewer pipes.
Do I just add this and wait for someone to complain?
A better way would be to read carefully specs of R4xx cards on ATI website to find out how many actual pipes are available :)
This page is more helpful: http://www.rojakpot.com/default.aspx?location=3&var1=88&var2=0
pipes value My card 16 (7 < 1) max R300 8 (3 < 1)
If we ignore RV350: My guess would be that the value is equal to num_pipes/2 - 1.
Another guess would be that it is safe to set the value to the max possible numbers of pipes for each card type:
value R420 (7 < 1) R300 (3 < 1)
cvs -z3 diff -u
E-mail the patch to me - the reason that R4xx cards are not enabled there is that I was not certain whether R3xx microcode would work for them.
Thank you
Rune Petersen
Index: radeon_dri.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c,v retrieving revision 1.13 diff -u -r1.13 radeon_dri.c --- radeon_dri.c 26 Jan 2005 18:23:40 -0000 1.13 +++ radeon_dri.c 3 Mar 2005 23:55:40 -0000 @@ -1037,7 +1037,8 @@ memset(&drmInfo, 0, sizeof(drmRadeonInit)); if ( (info->ChipFamily == CHIP_FAMILY_R300) || (info->ChipFamily == CHIP_FAMILY_R350) || - (info->ChipFamily == CHIP_FAMILY_RV350) ) + (info->ChipFamily == CHIP_FAMILY_RV350) || + (info->ChipFamily == CHIP_FAMILY_R420) ) drmInfo.func = DRM_RADEON_INIT_R300_CP; else if ( info->ChipFamily >= CHIP_FAMILY_R200 )