Does this PCI API look good enough for actual use?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Does this PCI API look good enough for actual use?

Post by Owen »

Said device driver can still spatter crap all over your kernel using DMA.

Incidentally, that graph is only a partial truth: Both Intel and nVIDIA have to deal with the fact that the Vista and later display model is basically "the hardware interface to an ATi card", since ATi have been designing the DirectX 10 and later APIs (With results which have made everyone except ATi unhappy).

Remember: Graphics card manufacturers are under the most pressure of any company to get their software to market and squeeze out all the performance possible. Both ATi and nVIDIA's track records on Linux (and Solaris, and BSD...) are much better.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Does this PCI API look good enough for actual use?

Post by NickJohnson »

Owen wrote:Both ATi and nVIDIA's track records on Linux (and Solaris, and BSD...) are much better.
Really? At least the last time I tried, which was about a year ago, the nvidia drivers on linux were hardly stable - they wouldn't let you properly set the resolution, had crappy performance, and would occasionally bring down the entire system.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Does this PCI API look good enough for actual use?

Post by Owen »

The only time I've had the nVIDIA drivers crash my system, I needed a BIOS update (It turns out I'd been running my system for about a year with a BIOS which didn't support my processor!)

Oh, and when my graphics card was at 90degC. But I don't blame them for that!
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Re: Does this PCI API look good enough for actual use?

Post by Ready4Dis »

Owen wrote: Incidentally, that graph is only a partial truth: Both Intel and nVIDIA have to deal with the fact that the Vista and later display model is basically "the hardware interface to an ATi card", since ATi have been designing the DirectX 10 and later APIs (With results which have made everyone except ATi unhappy).
Are you kidding me? Both companies (and others) have their inputs. Some special features may have been added due to ATI's input, but overall stability (not just features) has nothing to do with it. Also, NVIDIA was the first one with a DX10 card and the first with Microsoft certified DX 10 drivers, so I hardly think ATI had a jump on them in that respect as you've suggested. AMD just writes better (more stable, but typically not as optimized although they have gotten a lot better as of late) drivers (ATI's where known to be crap, and stop putting the little i in ATI, it's no longer a little i, it grew up). Anyways, I allow my drivers access to PCI info directly, the driver is responsible for it's own behavior, although I do agree with the reasons given for not trusting them. There is no 'right' way, it depends on your goals and your OS. For a bare minimum PCI API your functions look ok. My OS is pretty minimum when it comes to PCI,so I won't comment to much on the 'correct' way to do things, but I don't like having my kernel or boot loader setting up my PCI space like was suggested (putting them all into native). I would much prefer having a PCI bus driver that would do the setup and search for a compatible driver, and the driver should be responsible for setting the device up properly from there on. Each device (well, anything that requires it) driver requests a lock on resources, which can help take care of things that use a default location. I do need to have it so you can tell it what order to load (so something that is at a fixed location can be loaded before something that is dynamic just in case).

Again, a lot depends on your goals and your OS. If you trust your drivers, then give them access, if you don't, then don't. There are trade offs either way you go, just be aware of them and live with them. Most stuff was covered in previous posts, but if you plan on using on current/future hardware, I think you can ignore some of the special case stuff and focus on something that will work fine with hardware post 2000/ If you are targetting older hardware, then you may want to read up on some more of the quirks of the past and decide the best route.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Does this PCI API look good enough for actual use?

Post by Combuster »

Ready4Dis wrote:Most stuff was covered in previous posts, but if you plan on using on current/future hardware, I think you can ignore some of the special case stuff and focus on something that will work fine with hardware post 2000/ If you are targetting older hardware, then you may want to read up on some more of the quirks of the past and decide the best route.
If only one of the peevees mentioned wasn't a year-and-a-half old... (Damn you, Intel) You'll even find one of the more nasty ones in Virtual PC (Damn you, S3)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: Does this PCI API look good enough for actual use?

Post by jal »

NickJohnson wrote:Really? At least the last time I tried, which was about a year ago, the nvidia drivers on linux were hardly stable - they wouldn't let you properly set the resolution, had crappy performance, and would occasionally bring down the entire system.
You sure that you didn't use the open source nVidia drivers (Nouveau, iirc), as opposed to the closed source ones by nVidia themselves? nVidia has very stable Linux drivers, where ATI has a very crappy reputation in that area.


JAL
Post Reply