hello,ask about openGL,X,device drivers, questions
hello,ask about openGL,X,device drivers, questions
i have read that OpenGL is a collection of draw functions
------- if card vender implemented OpenGL,the driver they offered have all the OpenGL functions,some of those fnctions can accelerate by hardware.
on linux the X window System is an userspace program which means it is not a device driver
and,in the linux kernel view,treat all the device as "file" or "file can mounted"
------- mount
------- read
------- write
------- ioctrl
------- remove
the X System can build on OpenGL
------- does this means OpenGL functions are userspace API
------- and the task of videoCard driver of Linux system is convert all the OpenGL APIs to linux drivers read,write,ioctrl ,and introducing device special meaning of code to read,write,ioctrl implemention?
------- and X system cooperate with several deive such like usb(when plug,there have graphic notifications),mouse,keyboard,gameConsole
------- ------- so what does the kernel do with those device?
------- ------- i am confuse with the X and the kernel functions,dose the are two systems control some devices respectively?
thanks very much for details.
------- if card vender implemented OpenGL,the driver they offered have all the OpenGL functions,some of those fnctions can accelerate by hardware.
on linux the X window System is an userspace program which means it is not a device driver
and,in the linux kernel view,treat all the device as "file" or "file can mounted"
------- mount
------- read
------- write
------- ioctrl
------- remove
the X System can build on OpenGL
------- does this means OpenGL functions are userspace API
------- and the task of videoCard driver of Linux system is convert all the OpenGL APIs to linux drivers read,write,ioctrl ,and introducing device special meaning of code to read,write,ioctrl implemention?
------- and X system cooperate with several deive such like usb(when plug,there have graphic notifications),mouse,keyboard,gameConsole
------- ------- so what does the kernel do with those device?
------- ------- i am confuse with the X and the kernel functions,dose the are two systems control some devices respectively?
thanks very much for details.
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Re: hello,ask about openGL,X,device drivers, questions
Hi,
Absolute rubbish , do your reading first .
Regards
Shrek
Absolute rubbish , do your reading first .
Regards
Shrek
Re: hello,ask about openGL,X,device drivers, questions
yes, but can't understand very much.
Re: hello,ask about openGL,X,device drivers, questions
does some can answer more front way?
Re: hello,ask about openGL,X,device drivers, questions
Hi,
One of the numerous flaws in your logic is that a userspace program cannot also have a driver component. X.org does have a driver component, and it is this that communicates with the card. How X communicates with the driver is implementation dependent.
As Shrek said - do your reading first.
Cheers,
James
One of the numerous flaws in your logic is that a userspace program cannot also have a driver component. X.org does have a driver component, and it is this that communicates with the card. How X communicates with the driver is implementation dependent.
As Shrek said - do your reading first.
Cheers,
James
Re: hello,ask about openGL,X,device drivers, questions
at least give me some thing to read, do you mean read the source code?
you know a lot of book start with "hello world" or "not hello world"... i definitely read a lot,but alway block at some place. and can't find what i want to know more clear.
------- and the task of videoCard driver of Linux system is convert all the OpenGL APIs to linux drivers read,write,ioctrl ,and introducing device special meaning of code to the implemention of read,write,ioctrl ?
----so i don't know if i have right expression in english above,and i can ask other way:
--------------does the driver of graphic card implement the OpenGL API or read,write,ioctrl or both of them?
----------------------------whether the implemention of OpenGL API invoke the (read ,write of card driver) or the card dirver's read() write() invoke the OpenGL API? does they invoke each other both to let things more interesting?
i have wake c knowledge, but as programer,i do think that "userspace program can also have a driver component",but i think that those component would like to talk with the hard device that must also be the kernel's component,write according to kernel's specification.
that means ,with out X, we can also draw some thing on the screen, and receive the mouse event(may be not event)...
X just a request/response framework, to know how to implment a simple gui system well easy porting the gui system's features to the X features.
you know a lot of book start with "hello world" or "not hello world"... i definitely read a lot,but alway block at some place. and can't find what i want to know more clear.
------- and the task of videoCard driver of Linux system is convert all the OpenGL APIs to linux drivers read,write,ioctrl ,and introducing device special meaning of code to the implemention of read,write,ioctrl ?
----so i don't know if i have right expression in english above,and i can ask other way:
--------------does the driver of graphic card implement the OpenGL API or read,write,ioctrl or both of them?
----------------------------whether the implemention of OpenGL API invoke the (read ,write of card driver) or the card dirver's read() write() invoke the OpenGL API? does they invoke each other both to let things more interesting?
i have wake c knowledge, but as programer,i do think that "userspace program can also have a driver component",but i think that those component would like to talk with the hard device that must also be the kernel's component,write according to kernel's specification.
that means ,with out X, we can also draw some thing on the screen, and receive the mouse event(may be not event)...
X just a request/response framework, to know how to implment a simple gui system well easy porting the gui system's features to the X features.
Re: hello,ask about openGL,X,device drivers, questions
There again, you're making a false assumption. The linux kernel has a framebuffer driver. It has no acceleration, no nothing. The X server provides the drivers for hardware-accelerated graphics. Thus, you can draw to the screen without X, but it won't be anywhere near as fast.yestalk wrote:but i think that those component would like to talk with the hard device that must also be the kernel's component,write according to kernel's specification.
that means ,with out X, we can also draw some thing on the screen, and receive the mouse event(may be not event)...
Re: hello,ask about openGL,X,device drivers, questions
No, what X can do in user space anyone can do (as long as they can run as the same user) unless I've missed something fundamental.JamesM wrote:There again, you're making a false assumption. The linux kernel has a framebuffer driver. It has no acceleration, no nothing. The X server provides the drivers for hardware-accelerated graphics. Thus, you can draw to the screen without X, but it won't be anywhere near as fast.yestalk wrote:but i think that those component would like to talk with the hard device that must also be the kernel's component,write according to kernel's specification.
that means ,with out X, we can also draw some thing on the screen, and receive the mouse event(may be not event)...
Unless things has changed a user process cannot do direct I/O writes, but has to go vi the kernel to perform these (probably via a kernel module that provides the required interface).
Re: hello,ask about openGL,X,device drivers, questions
Exactly, if you'll read my original reply you'll see that I said X.org provides kernel-mode drivers itself. (Most of) the drivers come with X.org and reside in its repository.skyking wrote:No, what X can do in user space anyone can do (as long as they can run as the same user) unless I've missed something fundamental.JamesM wrote:There again, you're making a false assumption. The linux kernel has a framebuffer driver. It has no acceleration, no nothing. The X server provides the drivers for hardware-accelerated graphics. Thus, you can draw to the screen without X, but it won't be anywhere near as fast.yestalk wrote:but i think that those component would like to talk with the hard device that must also be the kernel's component,write according to kernel's specification.
that means ,with out X, we can also draw some thing on the screen, and receive the mouse event(may be not event)...
Unless things has changed a user process cannot do direct I/O writes, but has to go vi the kernel to perform these (probably via a kernel module that provides the required interface).
Re: hello,ask about openGL,X,device drivers, questions
Well it doesn't look like there is any kernel modules from what I've seen. It more looks like the Xserver uses mmap to get access to the video hw memory, which is quite reasonable since they would not want to need to write and maintain the actual driver in kernel space for all card+kernel combos.
Re: hello,ask about openGL,X,device drivers, questions
well,so card vender's driver would be provided by modules ? just implement those load() remove() read() write() ioctrl() satisfaction?
does that mean X can't not utilize the vender provided "well form linux driver" ? or vedio dirver have another driver interface in kernel ?
without knowledge, i can only try to assumption:
X compliance app............................other user sapce app
....|....window talk.............................|
....|....event talk...............................|
....|................................................|
....|................................................|
X System.........................................|
....|-----another X implemention------>.......|
....| graphic in memory........................|
direct i/o....................................OpenGL APIs :drawline() drawothers() drawothers2()....
....|....................................................................|...............|................|
....|....................................................................|...............|................|
....|....................................................................--------------------------------
....|...................................................................................|
....|...................................................................................|
....|..............................................................linux driver: write() iocrtl() ,read()
....|...................................................................................|
....|...................................................................................i/o
.....----------------------card memory---------------------------------------------
........................................|
........................................|
....................................screen
need experts give judge,or tell some clue to read,thanks.
does that mean X can't not utilize the vender provided "well form linux driver" ? or vedio dirver have another driver interface in kernel ?
without knowledge, i can only try to assumption:
X compliance app............................other user sapce app
....|....window talk.............................|
....|....event talk...............................|
....|................................................|
....|................................................|
X System.........................................|
....|-----another X implemention------>.......|
....| graphic in memory........................|
direct i/o....................................OpenGL APIs :drawline() drawothers() drawothers2()....
....|....................................................................|...............|................|
....|....................................................................|...............|................|
....|....................................................................--------------------------------
....|...................................................................................|
....|...................................................................................|
....|..............................................................linux driver: write() iocrtl() ,read()
....|...................................................................................|
....|...................................................................................i/o
.....----------------------card memory---------------------------------------------
........................................|
........................................|
....................................screen
need experts give judge,or tell some clue to read,thanks.
Last edited by yestalk on Wed May 06, 2009 6:57 am, edited 3 times in total.
- 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: hello,ask about openGL,X,device drivers, questions
Do your homework (and improve your english)yestalk wrote:need experts give judge
Accelerated Graphic Cards,or tell some clue to read,thanks.
Re: hello,ask about openGL,X,device drivers, questions
Can be, but doesn't have to be.yestalk wrote:well,so card vender's driver would be provide by module ?
If X couldn't utilize the vendor supplied driver it wouldn't be much point in supplying the module, would it? Of course there have been vendors that got the linux support wrong, but that was probably not the intention.does that mean X can't not utilize the vender provided "well form linux driver" ?
Could also be the case.or vedio dirver have another driver interface in kernel ?
No, OpenGL API is a set of function called by the client program. Have you even tried to use OpenGL? What happens in the lower layers are by the design of the API quite much up to the implementation, the execution of the OpenGL commands can happen anywhere between (and including) the executable (application), down to the graphics card hardware (and all doesn't have to happen at the same place). Hopefully the graphics appear on the screen in the end...X compliance app............................other user sapce app
....|....window talk.............................|
....|....event talk...............................|
....|................................................|
....|................................................|
X System.........................................|
....|-----another X implemention------>.......|
....| graphic in memory........................|
direct i/o....................................OpenGL APIs :drawline() drawothers() drawothers2()....
....|....................................................................| | |
....|....................................................................| | |
....|....................................................................------------------------
....|...................................................................................|
....|...................................................................................|
....|..............................................................linux driver: write() iocrtl() ,read()
....|...................................................................................|
....|...................................................................................i/o
.....----------------------card memory---------------------------
........................................|
........................................|
....................................screen
Re: hello,ask about openGL,X,device drivers, questions
Mindlessly hypothesizing, much?skyking wrote:Well it doesn't look like there is any kernel modules from what I've seen. It more looks like the Xserver uses mmap to get access to the video hw memory, which is quite reasonable since they would not want to need to write and maintain the actual driver in kernel space for all card+kernel combos.
Re: hello,ask about openGL,X,device drivers, questions
Which of these is a kernel module? I unpacked one and it don't look like a kernel module, it does not contain the init_module function for one thing. The drivers in my installed xserver they look like a shared object, while linux kernel modules does not.JamesM wrote:Mindlessly hypothesizing, much?skyking wrote:Well it doesn't look like there is any kernel modules from what I've seen. It more looks like the Xserver uses mmap to get access to the video hw memory, which is quite reasonable since they would not want to need to write and maintain the actual driver in kernel space for all card+kernel combos.