Mapping PCI video memory with remap_page_range

From: JDeas
Date: Thu Sep 25 2003 - 10:34:50 EST


I am having problems using the remap_page_range on
a PCI card. I am using a driver that claims to have
worked on RH7.2 but nothing else.

I have setup a RH9.0 (2.4.20-6smp kernel) and made
the changes needed to compile the driver. I have
managed ioctl access and am able to talk and configure
the card with the exception of the mmaped areas
(video buffer and alternate mapped registers).

The only change I made related to this in the old driver
was to change the remap_page_range(). The old version did not supply the
vma struct like needed by the new kernel so I
added it along with a VM_IO flag.(side note: should the VM_IO flag be
used for iomem?)

I inserted printk commands and found the following remap
was being executed.

remap_page_range(421330000,f0000000,4000000,0x27)
I also found the vma->Flag = 840fb


End results were this. Running a program to keep the
driver open, I was able to get the following info
(/proc/[pid]/maps)
42133000-46133000 rw-s 00000000

This seems wrong. The size is right but the mapped address shows 0
Should I not see f0000000? The /proc files (iomem and pci) both show the
card and its resources where requested.

What else should I check?

Regards,
JD

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/