Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Advice about ati-drivers? [50% SOLVED]
Date: Tue, 03 Apr 2012 15:39:55
Message-Id: CA+czFiDxKB+mZR+Dxbd+U2-wxCKFeTTOq6HK=nRJKv2-X+m2hA@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: Advice about ati-drivers? [50% SOLVED] by Michael Hampicke
1 On Tue, Apr 3, 2012 at 9:54 AM, Michael Hampicke <gentoo-user@××××.biz> wrote:
2 >
3 >
4 > Am 03.04.2012 13:28, schrieb Nikos Chantziaras:
5 >> On 03/04/12 03:16, Michael Hampicke wrote:
6 >>>> However, now that the firmware loading problem is fixed, my screen still
7 >>>> goes
8 >>>> black on bootup.  But now it's instantaneous instead of 60 seconds
9 >>>> delayed :(
10 >>>>
11 >>>> I'm back to functioning vesa mode if I boot with radeon.memset=0, but
12 >>>> that's
13 >>>> not really my goal...yet :p
14 >>>
15 >>> Last time I reinstalled gentoo, I tried kms too (with my Radeon HD2600
16 >>> card). And I had lots of problems with it - in combination with
17 >>> ati-drivers fglrx module (blank on boot, freeze while starting X,
18 >>> generell crashes and kernel panics, low performence...,...). So I
19 >>> finally decided not to use kms disable everything related to kms. Since
20 >>> then everything is running smoothly. Two weeks ago, I purchased an new
21 >>> video card (Radeon HD7770) and gave kms another shot. And again,
22 >>> everything went down the crapper. So disabled it. I can live without it
23 >>> for the time being. But still, I would be interested in the "why?".
24 >>
25 >> You cannot use two drivers at once.  Either use the kernel driver (which
26 >> does KMS), or ati-drivers.  You cannot mix drivers.  Not in Linux, and
27 >> not in any other OS I'm aware of.
28 >>
29 >>
30 >
31 >        Seems like there have been some changes on that subject in time. Keep
32 > in mind, up until a few months ago I was running Windows7 on my
33 > workstation. I'm not new to linux, as I've been using linux on servers
34 > since a very long time, but the whole X stuff is kinda new for me.
35 >
36 > In the past I always experimented with linux in dual boot, and I vaguely
37 > recall that there were (or are?) different kinds of video drivers on
38 > linux. You had the drivers provided by the kernel, the drivers of Xorg -
39 > like xf86-video-ati - and third party drivers like ati-drivers fglrx.
40 > And now there's kms too, which I understand is not a driver, but a means
41 > for the kernel to setup the driver itself (resolution, color depth).
42 >
43 > So, if I now use the kernels radeon driver, i could use kms, but cannot
44 > use xf86-video-ati or fglrx, if I use xf86-video-ati or fglrx, I cannot
45 > use kms?
46 >
47 > It would be great if someone could link me to some reading material on
48 > that subject. Something that explains, the difference between kernel
49 > video drivers, framebuffer console, Xorg video drivers and 3rd party
50 > drivers.
51 >
52
53 Just noticed this, and thought of you and this thread:
54
55 https://www.osadl.org/Single-View.111+M5afc75f7e68.0.html
56
57 Also, if you really want to be able to dig in and do interesting
58 things without the aid of GNOME, KDE or XFCE, I highly recommend X
59 Power Tools. The book predates KMS, but then so will anything
60 resembling a thorough treatment.
61
62 http://shop.oreilly.com/product/9780596101954.do
63
64 But a quick rundown regarding the difference between kernel video
65 drivers, framebuffer, Xorg and 3rd-party drivers:
66
67 There are two halves to the story. The kernel and userland. Both sides
68 have their own halves of drivers for whatever functionality you need.
69
70 Kernel:
71
72 1) Console drivers. These typically access the video adapter's
73 built-in text display mode. They don't provide for graphics outside
74 the glyphs built into the video cards. These are typically
75 *incredibly* fast for text-mode usage, in comparison to framebuffer
76 drivers. Enough that if you don't silence build output, you can
77 measure differences in compile times of a large program that come from
78 the compiler waiting to flush its stdout stream buffer.
79
80 2) Framebuffer drivers. These are simple drivers taking advantage of
81 basic raster graphics capabilities in the video adapter. The kernel
82 framebuffer drivers treat the display as a giant image, and draw text
83 glyphs and other graphics onto them.
84
85 3) Direct Rendering Management (DRM) drivers. These have traditionally
86 been how X has been allowed low-level access to 3D graphics
87 accelerators. (I'm simplifying here a bit). The DRM subsystem has
88 undergone at least two major revisions. It's also specific to Linux,
89 and isn't available (AFAIK) on other systems which can run X. DRM in
90 this context has nothing to do with 'Digital Rights Management'.
91
92 4) Kernel Mode Setting (KMS). Historically, once X launched, X used
93 its own hardware drivers (unless you had it talk to a kernel
94 framebuffer driver) to talk to video devices. Once X started, the
95 kernel gave control over graphics hardware to X, and depended on X to
96 hand it back if you wanted to switch to a virtual terminal for a plain
97 console. That meant that if X crashed, your video setup was left
98 pretty much in complete disarray, and you had to use a SysRq sequence
99 to get it back. (I swear, I'll need to add that to my email signature
100 before I'll remember it...) KMS is supposed to keep that
101 responsibility with the kernel, with the kernel telling the video
102 adapter which display modes to use.
103
104 3rd-party drivers from AMD and NVidia have generally hung out in the
105 DRM area. I don't know if either AMD or NVidia have been adding
106 support for KMS to their drivers.
107
108 And that's just the kernel side of the story. The userland side mostly
109 involves extensions to the X protocol. The big ones you should care
110 about are the Xv extension and the GLX extension.
111
112 The Xv extension is used for basic acceleration of 2D operations,
113 especially blitting and stretching of images. That's particularly
114 useful in video playback. The Xv extension needs to be implemented by
115 the X11 half of the video drivers.
116
117 The GLX extension implements OpenGL (more correctly,
118 OpenGL-like...there's a trademark thing going on there, but it's more
119 a legal thing than a technical thing.) for X11, giving X applications
120 access to standard definitions and methods for manipulating 3D
121 primitives like textures, meshes, polygons, viewpoints, lighting. Some
122 time in the last decase, on-GPU programs called pixel shaders and
123 vertex shaders also became available. (This have more recently been
124 generalized, which is what's driving the whole thing behind CUDA and
125 OpenCL.)
126
127 --
128 :wq

Replies

Subject Author
Re: [gentoo-user] Re: Advice about ati-drivers? [50% SOLVED] Michael Hampicke <gentoo-user@××××.biz>