Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Generally confused with drivers, firmwares and video drivers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
GSnake
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2012
Posts: 100
Location: Italy

PostPosted: Sun Dec 02, 2012 11:23 pm    Post subject: Generally confused with drivers, firmwares and video drivers Reply with quote

Hello guys, we're here to understand so I'd like to destroy my doubts regarding these subjects.
I'll post some questions that are brainstorming me...

1) What is a DRIVER?
2) What is a FIRMWARE?
3) What is a DRM?
4) What is a FRAMEBUFFER DEVICE?

And last but not least,
5) Why with open-source drivers like radeon, nouveau, intel I have to enable the framebuffer support directly from my kernel (with the DRM one too) and when I want to try the "original ones" I HAVE to DISABLE every option regarding DRM and FrameBuffer devices?

Thanks!
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3825
Location: USA

PostPosted: Sun Dec 02, 2012 11:49 pm    Post subject: Reply with quote

Driver = small piece of software that adds an abstraction layer to the hardware, and also able to make sure multiple users share it properly.
Firmware = software built into the hardware's board that isn't normally erased.
DRM = Direct Rendering Manager, manages letting user(s) software access hardware directly.
Frame buffer device = video card that is only holding one "frame" of video as graphics and does nothing special to it.

And you can't have two drivers driving the same car.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Sun Dec 02, 2012 11:53 pm    Post subject: Reply with quote

A driver is a piece of software to drive (control) a device. The driver runs on the CPU, not on the device itself.

Firmware is also a piece of software to drive (control) a device, but it runs on the device itself.

DRM is the Direct Rendering Manager. It's an interface to control GPUs. Drivers use this interface to send commands to the GPU.

A framebuffer device is also an interface. It's used to display stuff on a screen.


What do you mean by "original ones"? You mean the proprietary drivers (ati-drivers and nvidia-drivers)? That's simple to answer - you can only use one driver to control a device. If the kernel driver is already controlling it, the proprietary driver can't. So to use a proprietary driver, you need to get the kernel driver out of the way.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31723
Location: 56N 3W

PostPosted: Mon Dec 03, 2012 12:12 am    Post subject: Reply with quote

GSnake,

There is lots of good reading in /usr/src/linux/Documentation but briefly ...

A driver is a piece of software that controls an item of hardware. To make software easier to maintain, complete drivers are often designed in 'layers' or 'stacks'
This means that when a vendor brings out a new hardware item, say a SATA interface chip, it requires only a module at the lowest layer to make it work as everything above that is common to other SATA interfaces.

A firmware is some code or data that is loaded into a device to make it work. Usually so the device vendor can avoid providing some permanent storage in the device.
Your PCs BIOS is an example of firmware. Many USB devices need firmware loaded.

By DRM I assume you mean Direct Rendering Manager, not Digital Rights/Restrictions Management ?
DRM is a way of allowing programs to draw in pixel buffer, bypassing Xorg. programs may even be allowed to use 3D acceleration Directly. It gives a large graphics speed improvement over the alternative, which is indirect rendering.

A framebuffer device is literally a block of RAM. However, its usually a carefully chosen block of RAM, so that whatever is written there appears on the screen.
As its a block of RAM, its possible to plot individual screen pixels there. This is contrasted with a text console, where codes for the symbols that are to appear on the screen are written to a (much smaller) piece of RAM then decoded into the video scan lines 'on the fly' as the data is read out to draw the image on the screen.
Framebuffers may be accelerated or not. With an accelerated framebuffer, the GPU does some of the work, with an unaccelerated framebuffer, the CPU does everything.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GSnake
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2012
Posts: 100
Location: Italy

PostPosted: Mon Dec 03, 2012 11:42 am    Post subject: Reply with quote

Thank you guys! What a great community!

One last question: can I build the kernel drivers as MODULES and choose which one I may use "on the road"? I mean, I build as module the "radeon" one (without setting it as default one) and then I download the "fglrx" one. May I choose which one to use?
Back to top
View user's profile Send private message
mvaterlaus
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2010
Posts: 147
Location: Switzerland

PostPosted: Mon Dec 03, 2012 12:42 pm    Post subject: Reply with quote

yes you can by loading the modules via modprobe. but be aware, that you do not have framebuffer in the bootup console. also, you must load a driver module before you start X. so without any framebuffer, your bootup console will look pretty ugly.
Back to top
View user's profile Send private message
GSnake
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2012
Posts: 100
Location: Italy

PostPosted: Mon Dec 03, 2012 1:00 pm    Post subject: Reply with quote

And what should I load for "radeon" and what for "fglrx"? (other than modprobe radeon / fglrx)
Back to top
View user's profile Send private message
mvaterlaus
Tux's lil' helper
Tux's lil' helper


Joined: 01 Oct 2010
Posts: 147
Location: Switzerland

PostPosted: Mon Dec 03, 2012 1:56 pm    Post subject: Reply with quote

I don't understand your question. you need to load the appropriate module (radeon or fglrx). what i missed out previous, you also need to set the correct opengl driver with eselect. otherwise you won't have any 3d acceleration and probably also a lot of errors.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2439

PostPosted: Mon Dec 03, 2012 2:10 pm    Post subject: Reply with quote

I don't have a lot of experience with this, but what I do have suggests that what's really necessary is to build the DRM, etc stuff as modules, and then blacklist it. You want to prevent the kernel from autoloading ANY of it. But then you can tweak your X configuration, and X will autoload whatever is necessary when it tries to start.

I have an annoying (ancient) M-Pro Xeon machine with Rambus memory. Though it has a GForce 7xxx card, I haven't been able to run anything newer than the nvidia-drivers-173 "legacy" series on it reliably. At one point I went to the effort to "dual configure" so I could run nouveau or nvidia-drivers, but even nouveau doesn't run reliably - only the nvidia-drivers-173 series.

I also have a machine at home with Radeon 4200 onboard, and briefly played with an nvidia card using the nouveau drivers, same way.

All of this was a year or more ago, so my memories may be a bit rusty. But I believe blacklisting modules was the key, and I don't believe I had to do any explicit modprobes.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31723
Location: 56N 3W

PostPosted: Mon Dec 03, 2012 5:38 pm    Post subject: Reply with quote

GSnake,

Yes and no.

Normally you can unload modules, however the kernel will not allow you to unload modules that are in use.
Even if you make Radeon as a loadable module, its loaded very early in the boot sequence and is then always in use so you can't unload it.

Further, the fglrx Xorg driver does not provide any console driver, so swapping between radeon and fglrx using modprobe is, in practical terms, not useful.
You also need to change xorg.conf files, as Xorg will not use a binary blob driver unless its forced to in the xorg.conf.

You can still do what you want to do. You must have two kernels, one for Radeon and one for fglrx and a small script that switches xorg.conf files to suit.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2439

PostPosted: Tue Dec 04, 2012 2:00 pm    Post subject: Reply with quote

With the blacklist technique I talked about, I wasn't able to switch drivers on the fly, or anything like that. My whole point was to be able to do the job with one kernel. I haven't done it in a year, but I believe the other point was that the kernel/display ends up remaining in text mode until X starts - at that point using whatever driver was selected with xorg.conf. Normally something gets modprobed early in startup, and the screen changes from text to framebuffer while the kernel is still booting. With blacklisting that changeover doesn't happen.

But in agreement with NeddySeagoon, once you've picked a driver, that's it for that boot. It's just that with blacklisting you can defer that choice until starting X.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2642
Location: Slovenia

PostPosted: Tue Dec 04, 2012 3:05 pm    Post subject: Reply with quote

depontius wrote:
once you've picked a driver, that's it for that boot.

Not really. You can detach a KMS driver from the console and then unload the module. You need to turn on the CONFIG_VT_HW_CONSOLE_BINDING option in the kernel for that to work.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2439

PostPosted: Tue Dec 04, 2012 3:12 pm    Post subject: Reply with quote

I'll have to take a look at that one.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum