Skip to contentSkip to conversation

U3 G5 AGP support patch (v4)

DISCUSSION Jerome Glisse 2 participants 5 messages Jan 9, 2005 – Jan 10, 2005

lore
Share & tools
lore
#1 lore raw

+static struct device_node* uninorth_node __pmacdata; +static u32 __iomem * uninorth_base __pmacdata;

static struct device_node *uninorth_node __pmacdata; static u32 __iomem *uninorth_base __pmacdata;

+ if(uninorth_rev == 0x21) {

	if (uninorth_rev == 0x21) {

+ if((uninorth_rev >= 0x30) && (uninorth_rev <= 0x33)) {

	if ((uninorth_rev >= 0x30) && (uninorth_rev <= 0x33)) {

+ if (agp_bridge->dev->device == PCI_DEVICE_ID_APPLE_U3_AGP) {
+ /* This is an AGP V3 */
+ agp_device_command(command, TRUE);
+ } else {
+ /* AGP V2 */
+ agp_device_command(command, FALSE);
+ }

double-indentation, also please use 1/0 instead of TRUE/FALSE.

+static struct aper_size_info_32 u3_sizes[8] =
+{
+/*
+ * Not sure that uninorth3 supports that high aperture sizes but it
+ * would strange if it did not :)
+ */

comment before the struct declearation, please, aka

/*
* Not sure that uninorth3 supports that high aperture sizes but it
* would strange if it did not :)
*/
static struct aper_size_info_32 u3_sizes[8] = {

+ uninorth_node = of_find_node_by_name(NULL, "uni-n");
+ /* Locate G5 u3 */
+ if (uninorth_node == NULL) {
+ uninorth_node = of_find_node_by_name(NULL, "u3");
+ }

	/* Locate G5 u3 */
	uninorth_node = of_find_node_by_name(NULL, "uni-n");
	if (!uninorth_node)
		uninorth_node = of_find_node_by_name(NULL, "u3");

+ /*
+ * Set specific functions & values for agp3 controller.
+ */
+ if (pdev->device == PCI_DEVICE_ID_APPLE_U3_AGP) {
+ uninorth_agp_driver.insert_memory = uninorth3_insert_memory;
+ uninorth_agp_driver.aperture_sizes = (void *)u3_sizes;
+ uninorth_agp_driver.num_aperture_sizes = 8;

Please delcare separate driver instance instead of overriding.

And asm-ppc64 is still missing an agp.h, no?

#2 lore raw
Quoted 1 line

Please delcare separate driver instance instead of overriding.

I hope new patch follow codestyle ? :)

Quoted 1 line

And asm-ppc64 is still missing an agp.h, no?

Maybe, some one with better knowledge may tell us more on that :) Anyway BenH tell me that there is still pending issue with agp & a potential cache aliasing.

best,
Jerome Glisse

#3 lore raw

It seems there is bug somewhere in my agp patch. I was playing with r300 radeon and
i get a hard lockup (quite used to that while playing with r300 thought :()

But after a bit of investigation it seems to be related to agp. Right now i am porting an old tools from dri that test agpgart & thus agp. I finally may really need to totaly split the u3 driver from the old uninorth.

I will give a deeper look to track down the issue. In the mean time if some one could test agp & radeon r200 on a g5. You will certainly lockup your g5 but it should not burn, at least here i just got some smoke ;)

best,
Jerome Glisse

#4 lore raw
Quoted 4 lines

It seems there is bug somewhere in my agp patch. I was playing with r300 radeon and
i get a hard lockup (quite used to that while playing with r300 thought :()

Quoted 8 lines

But after a bit of investigation it seems to be related to agp. Right now i am porting an old tools from dri that test agpgart & thus agp. I finally may really need to totaly split the u3 driver from the old uninorth.

I will give a deeper look to track down the issue. In the mean time if some one could test agp & radeon r200 on a g5. You will certainly lockup your g5 but it should not burn, at least here i just got some smoke ;)

Finally this was because i was doing some nasty stuff elsewhere :) Thus AGP seems to work well, at least over here with some r300 test program using agp :)

best,
Jerome Glisse