Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: another "little" problem appeared (ATI driver/direct rendering/kernel)
Date: Tue, 14 Nov 2006 17:48:55
Message-Id: ejcvcq$ufq$4@sea.gmane.org
In Reply to: [gentoo-amd64] another "little" problem appeared (ATI driver/direct rendering/kernel) by Michel Merinoff
1 Michel Merinoff <mike_merinov@××××××××.uk> posted
2 4559E1E8.40604@××××××××.uk, excerpted below, on Tue, 14 Nov 2006 18:34:00
3 +0300:
4
5 > Well, I had been using the kernel 2.6.17-r8 and everything seemed ok
6 > with the subj. But then I upgraded the kernel to 2.6.18-r1, and there's
7 > one feature I can't get started with.
8 > As it is said in a few faqs (including gentoo faq) of howto install DRI,
9 > in order to get the thing working you must enable kernel agp support
10 > with the proper driver installed. My driver seemed to be
11 > CONFIG_AGP_AMD64. It was enabled in the kernel previous, it is enabled
12 > in the kernel actual:
13 > michel@michelle /usr/src/linux $ cat .config|grep AGP_AMD64
14 > CONFIG_AGP_AMD64=y
15 >
16 > But it is not seen when I use make menuconfig. I syncronically checked
17 > all the options which were enabled at the previous kernel, but it did
18 > not appear, and I can't find out why. I tried to check dependencies, but
19 > didn't succeed.
20 >
21 > And the thing is dri doesn't work with 2.6.18-r1. I checked 2.6.17-r8,
22 > it does.
23
24 I was using kernel.org kernels before I started on Gentoo, and being
25 comfortable with that, saw/see no reason to change, so I know nothing
26 about the Gentoo patched kernel specifics. However, I have the kernel's
27 Radeon DRM driver and xorg's Radeon driver working here, now on 2.6.19-rc5
28 (IIRC), but they worked fine on 2.6.18 and 2.6.17 as well.
29
30 One setting is under Device Drivers > Character Devices > Direct Rendering
31 Manager > ATI Radeon. The Direct Rendering Manager (DRM, no, /not/
32 digital restrictions management, tho it seems the Linux kernel group
33 doesn't seem to have much of a problem with that, but anyway...) must be
34 configured Y/M before the individual manufacturer drivers are exposed as
35 choices.
36
37 AGP itself isn't shown as a choice here, it's shown, but not as an option,
38 because something else I have is apparently auto-selecting it. ... A bit
39 of educated guess checking later... I found it -- and probably figured out
40 why you may have lost that setting...
41
42 I don't remember exactly when it was, since I run the -rcs as well so have
43 been on the .19-rc series for some time now and this change would have
44 likely been introduced fairly early in the rc cycle so if it was for .18,
45 that was a long time ago for me and it's blurring into .17 and .16 and...
46 However, your post would seem to indicate it happened between .17 and .18.
47
48 So what is "it"? <g> Good question! <g> They changes the dependencies
49 for IOMMU worked.
50
51 A bit of background... The IOMMU is the adapter that lets legacy 32-bit
52 PCI devices (like many hard drive chipsets) do DMA to memory beyond the
53 32-bit (4-gig) memory barrier. The reserved driver address space at the
54 top of 32-bit memory is why folks with more than about 3.5 gig of memory
55 can't see it all without a BIOS trick reserving that area as a memory
56 hole, with the real memory behind those addresses remapped above the 4-gig
57 32-bit memory barrier. Just because amd64 CPUs can address 40-bits of
58 memory doesn't mean it can actually be used unless the chipset works
59 around that problem!
60
61 Now, true AMD64 CPUs have a hardware IOMMU built-in. Intel's em64t CPUs
62 lack that hardware IOMMU, so the kernel emulates it. It's configured by
63 the same option in either case, however, but that option was renamed and
64 changed locations not long ago -- it would seem between 2.6.17 and
65 2.6.18, given your report. IDR where it was before, but the new option is
66 CONFIG_IOMMU, located at Processor type and features > IOMMU support. As
67 I suspected (the educated guessing mentioned above), activating this
68 option auto-selects, that is, hard-enabled, AGP, so it's no longer an
69 option. That makes sense given that on AMD hardware the IOMMU is part of
70 the AGP unit and reserves part of the memory out of the BIOS AGP aperture,
71 and presumably the Linux software emulation of the same thing for Intel
72 hardware would be implemented in the same place. Of course, as I said,
73 this is for accessing memory addresses above the 4 gigabyte 32-bit
74 boundary, so if you have less than 4 gigs (well, less than 3.5 gigs, since
75 that last half-gig has to be relocated above the boundary if you have four
76 gigs or you lose access to it) of memory, no harm in disabling IOMMU.
77
78 So, the short version of the above is that if you have > 3.5 gig of memory,
79 you need IOMMU support enabled in ordered to be able to use it, and that
80 automatically activates AGP support, which is then no longer an option as
81 a result. < 3.5 gig, it's safe to disable IOMMU, which should return the
82 AGP option. With AGP on, you should get the DRM option. With that on,
83 you should be able to select ATI Radeon DRI/DRM, if you want/need it.
84 IOMMU is under processor type and features. AGP/DRM/Radeon-DRI/DRM is
85 under character drivers.
86
87 Hope that helps. =8^)
88
89 --
90 Duncan - List replies preferred. No HTML msgs.
91 "Every nonfree program has a lord, a master --
92 and if you use the program, he is your master." Richard Stallman
93
94 --
95 gentoo-amd64@g.o mailing list

Replies