NetBSD/sys/external/bsd/drm/dist
mrg 50fcbdf26f merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c
with our changes and the work recently done by Arto Huusko
<arto.huusko@pp2.inet.fi> and FUKAUMI Naoki <fun@naobsd.org>.

it includes all the changes arto provided from both mesa-drm and
the r6xx-r7xx-support branch.  it does not yet include code to
handle the (deleted) drm_pciids.h file, but i'll probably just
check in a generated one for now.

i have not yet merged the changes from outside this dir.


from arto's messages to tech-x11:

The important change that was needed is that drm_scatter.c was
fixed to return pointer to all allocated pages, not just the
beginning of the allocated segments.

Other changes:

  - drm_scatter maps COHERENT memory
  - drm_drawable: drawable handle allocation is done
    inside lock
  - drm_memory: when mapping "agp" memory, store offset
    of mapped area, so that new requests to same offset
    return the same area instead of trying to remap
    and fail
  - drm_vm: use bus_space_mmap for frame buffer and registers

  - r600_cp.c: ioremapfree allocated gart range
  - radeon_cp.c: use mtsleep
  - some memset calls I had added had their args swapped,
    and no memory was cleared
2009-06-19 03:50:03 +00:00
..
bsd-core merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c 2009-06-19 03:50:03 +00:00
libdrm import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c. 2009-06-19 03:22:23 +00:00
scripts import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c. 2009-06-19 03:22:23 +00:00
shared-core merge the changes from drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c 2009-06-19 03:50:03 +00:00
tests import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c. 2009-06-19 03:22:23 +00:00
autogen.sh
configure.ac import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c. 2009-06-19 03:22:23 +00:00
libdrm_intel.pc.in import the missing file from mesa-drm at git change 2009-06-19 03:38:39 +00:00
libdrm.pc.in
Makefile.am import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c. 2009-06-19 03:22:23 +00:00
README import mesa-drm git from version 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c. 2009-06-19 03:22:23 +00:00

DRM README file


There are two main parts to this package: the DRM client library/interface
(libdrm.so) and kernel/hardware-specific device modules (such as radeon.ko).
The kernel device modules are not shipped with libdrm releases and should only
be built from the git tree by developers and bleeding-edge testers of
non-Intel hardware.  The Intel kernel modules are developed in the Linux
kernel tree.


Compiling
---------

By default, libdrm and the DRM header files will install into /usr/local/.
If you want to install this DRM to replace your system copy, say:

	./configure --prefix=/usr --exec-prefix=/

Then,
	make install


To build the device-specific kernel modules from the git tree:

	cd linux-core/
	make
	cp *.ko /lib/modules/VERSION/kernel/drivers/char/drm/
	   (where VERSION is your kernel version: uname -f)

Or,
	cd bsd-core/
	make
	copy the kernel modules to the appropriate place



Tips & Trouble-shooting
-----------------------

1. You'll need kernel sources.  If using Fedora Core 5, for example, you may
   need to install RPMs such as:

	kernel-smp-devel-2.6.15-1.2054_FC5.i686.rpm
	kernel-devel-2.6.15-1.2054_FC5.i686.rpm
	etc.


2. You may need to make a symlink from /lib/modules/VERSION/build to your
   kernel sources in /usr/src/kernels/VERSION (where version is `uname -r`):

	cd /lib/modules/VERSION
	ln -s /usr/src/kernels/VERSION build


3. If you've build the kernel modules but they won't load because of an
   error like this:

	$ /sbin/modprobe drm
	FATAL: Error inserting drm (/lib/modules/2.6.15-1.2054_FC5smp/kernel/drivers/char/drm/drm.ko): Invalid module format

   And 'dmesg|tail' says:

	drm: disagrees about version of symbol struct_module 

   Try recompiling your drm modules without the Module.symvers file.
   That is rm the /usr/src/kernels/2.6.15-1.2054_FC5-smp-i686/Module.symvers
   file (or rename it).  Then do a 'make clean' before rebuilding your drm
   modules.