Has anyone tried to port nouveau(opensource nvidia driver)?
Has anyone tried to port nouveau(opensource nvidia driver)?
VESA/VBE is too difficult to use in pmode, and they look not so formal. So, I need to write a video driver for my nv18 card. I just need to switch to graphics mode with high resolution, and i don't need hardware acceleration now.
I tried to look into nouveau's source code, but after searching a lot, I still didn't find where is the code that switches modes.
Could someone who has read nouveau's code tell me where can I find it or paste the key codes here?
By the way, is there any vm that emulates nvidia's video card?
Apology for my bad English.
I tried to look into nouveau's source code, but after searching a lot, I still didn't find where is the code that switches modes.
Could someone who has read nouveau's code tell me where can I find it or paste the key codes here?
By the way, is there any vm that emulates nvidia's video card?
Apology for my bad English.
Where there is a hacker, there is art. Fork me!
- Combuster
- 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: Has anyone tried to port nouveau(opensource nvidia drive
VBE is an industry standard, and the corresponding document is quite complete. On the other hand, you won't find a VM that does an nvidia card so you really have to be ready to do things on actual hardware. The closest thing you can get is the Trio64 with hardware acceleration found in VirtualPC.
And searching ftw
And searching ftw
Re: Has anyone tried to port nouveau(opensource nvidia drive
i have interests. cooperate?
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Has anyone tried to port nouveau(opensource nvidia drive
The better arguments against VBE are non-BIOS firmware (e.g., EFI, UEFI, OFW, etc.), lack of acceleration (well, VBE/AF does that but very few cards actually supported it in their ROM), and maybe long mode (because it takes extra work).
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Has anyone tried to port nouveau(opensource nvidia drive
First, I'm sorry I haven't reply till now. I was busy at school (you know, China's education system sucks) and now the summer holiday is coming so I have more time on the Internet. (In fact, I nearly forgot my post here...)
I know a lot of advantages of VBE, but it's really not so easy to use in non-real mode (whatever pmode or lmode).
I looked at the post Combuster provided, but it still uses VBE to switch modes.
And blackoil, I like to cooperate with you, and my OS's code base is here:
https://github.com/cjxgm/lanos
I'm not so good at documenting, and I used to believe a good line-break replaces comments, so there are few docs and comments. I'm sorry for that. And for the summer holiday doesn't start yet, I can now be online only at weekends.
Maybe an x86 emulator serves my need, but unless I understand the mechanism, I won't use it. (And I don't fully understand it yet.)
I know a lot of advantages of VBE, but it's really not so easy to use in non-real mode (whatever pmode or lmode).
I looked at the post Combuster provided, but it still uses VBE to switch modes.
And blackoil, I like to cooperate with you, and my OS's code base is here:
https://github.com/cjxgm/lanos
I'm not so good at documenting, and I used to believe a good line-break replaces comments, so there are few docs and comments. I'm sorry for that. And for the summer holiday doesn't start yet, I can now be online only at weekends.
Maybe an x86 emulator serves my need, but unless I understand the mechanism, I won't use it. (And I don't fully understand it yet.)
Where there is a hacker, there is art. Fork me!
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: Has anyone tried to port nouveau(opensource nvidia drive
Just set the mode at the bootup, while you're still in real mode via VBE, or while you are still using boot services via (U)EFI, and tell the user to reboot the system to change resolution, while you don't have driver for his specific graphics card (= most of time).
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: Has anyone tried to port nouveau(opensource nvidia drive
My kernel was loaded by GRUB1, so I can not set mode before entering pmode.Griwes wrote:Just set the mode at the bootup, while you're still in real mode via VBE, or while you are still using boot services via (U)EFI, and tell the user to reboot the system to change resolution, while you don't have driver for his specific graphics card (= most of time).
Where there is a hacker, there is art. Fork me!
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: Has anyone tried to port nouveau(opensource nvidia drive
http://forum.osdev.org/viewtopic.php?f=1&t=10488 - see Brendan's post. While this may be a little hacky, on my laptop GRUB sets video mode before showing its menu; I'm almost sure it's 1600x900 - highest resolution available on this particular laptop; thus, I think that GRUB is capable of using VBE modes, and with little searching in google, or asking on grub mailing list, you should find easy (or at least not hacky) way to use GRUB to set the mode.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
- Combuster
- 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: Has anyone tried to port nouveau(opensource nvidia drive
The thing with linux driver sets is that they have several components to them - Parts of the driver may be in the kernel, parts of the driver are loaded into X, and the biggest pile of junk you'll find somewhere around libgl.so. Porting is always an option, but the design may be quite not what you want.
I do know a Nouveau developer personally, and he was confident that the dependencies on the driver architecture were small. The question remains how that relates to others subjective opinion - my personal experience with X drivers demands replicating a large part of the server architecture, which is not generally what you want.
I do know a Nouveau developer personally, and he was confident that the dependencies on the driver architecture were small. The question remains how that relates to others subjective opinion - my personal experience with X drivers demands replicating a large part of the server architecture, which is not generally what you want.
Re: Has anyone tried to port nouveau(opensource nvidia drive
This might be a little off topic, but handling VBE in pmode or long mode can easily be done by porting x86emu. This is probabaly not an ideal solution but it's easy and so far it works well in my OS. You will get all the usual 4:3 modes, but widescreen modes are not available.
Re: Has anyone tried to port nouveau(opensource nvidia drive
I've had a go, on Pedigree, here. It supported bitblitting and fillrects on the pre-GPGPU architectures.cjxgm wrote:VESA/VBE is too difficult to use in pmode, and they look not so formal. So, I need to write a video driver for my nv18 card. I just need to switch to graphics mode with high resolution, and i don't need hardware acceleration now.
I tried to look into nouveau's source code, but after searching a lot, I still didn't find where is the code that switches modes.
Could someone who has read nouveau's code tell me where can I find it or paste the key codes here?
By the way, is there any vm that emulates nvidia's video card?
Apology for my bad English.
Beware, there be dragons. And magic numbers. Lots of magic numbers.