Summary: | fstat May Be Inappropriate For Reading The ROM | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Alex Williamson <alex.williamson> | ||||
Component: | Lib/pciaccess | Assignee: | Xorg Project Team <xorg-team> | ||||
Status: | RESOLVED DUPLICATE | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | normal | ||||||
Priority: | high | CC: | alexdeucher, myron.stowe | ||||
Version: | 7.1 (2006.05) | ||||||
Hardware: | x86 (IA32) | ||||||
OS: | Linux (All) | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Alex Williamson
2006-10-18 07:56:40 UTC
Created attachment 7458 [details] [review] Read the ROM in big chunks This patch significantly reduces the number of reads to load the VGA ROM. At least one distribution (SLES10) already includes this patch. Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. Think this is resolved in pciaccess, but let's put it on the tracker to be sure it gets looked at. This looks good in libpciaccess from what I can tell. pci_device_linux_sysfs_read_rom reads the whole file in. It gets the size from fstat'ing the file. If it can't open the file via sysfs pci_device_linux_devmem_read_rom gets called to read the ROM, and it just reads the whole ROM in as well via slightly different means. I'm going to mark this closed. Please reopen if you think I've missed something and this bug isn't really fixed. (In reply to comment #4) > pci_device_linux_sysfs_read_rom reads the whole file in. It gets the size from > fstat'ing the file. i'm not sure that's such a good plan. at least on my machine, fstat() says the size is 0, while reading from the file works fine. (In reply to comment #5) > (In reply to comment #4) > > pci_device_linux_sysfs_read_rom reads the whole file in. It gets the size from > > fstat'ing the file. > > i'm not sure that's such a good plan. at least on my machine, fstat() says the > size is 0, while reading from the file works fine. > I've seen the same behavior. Seems to vary from card to card. Ok, I'm reopening this and reassigning it to libpciaccess. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.