Why do you think that isn't a virtual address? agp_alloc_page
gets a page and returns page_addresss(page) which is the kernel
virtual address for the page, right? Kernel memory is paged so
it doesn't have to be a user address to be virtual.

BTW: It works just fine. Nobody on an i810/i815 would have a
working hardware cursor without it.

-Matt


-----Original Message-----
From: Bjorn Helgaas [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 10:31 AM
To: [EMAIL PROTECTED]
Subject: [Dri-devel] i810 agpgart curiosity


The following code in agpgart_be.c looks bogus to me:

static agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
        ...
        if(type == AGP_PHYS_MEMORY) {
                ...
               new->memory[0] = agp_bridge.agp_alloc_page();
                ...
               new->memory[0] =
                    agp_bridge.mask_memory(
                                   virt_to_phys((void *) new->memory[0]),
                                                  type);
                ...
                new->physical = virt_to_phys((void *) new->memory[0]);

I don't have an i810, so I can't verify anything, but it looks like it 
puts garbage in new->physical.  At least, it's calling virt_to_phys() on 
something that is definitely NOT a virtual address!

Any i810 gurus care to comment?
-- 
Bjorn Helgaas - [EMAIL PROTECTED]
Linux Systems Operation R&D
Hewlett-Packard

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to