NetBSD/sys/external/bsd/drm/dist
bjs 8151294949 - for DRM_NETBSD_HANDLE2ADDR/ADDR2HANDLE, do what uvm does to recover
the virtual address from a uoffset, e.g. uoffset + vm_map_min(kernel_map).

- Eliminate the bus_space_read/write-based DRM_READ/WRITE macros.  The
  memory we're reading/writing from is not always allocated with bus_space,
  and so this will not do.  Instead, since all of our bus_space maps are
  linear, volatile pointer dereferences will do just fine.

- Unify members of struct drm_dma_handle amongst freebsd and netbsd:
  the 'addr' member was superfluous; also, set dmah->tag from
  dev->pa.pa_dmat and use that.

- we don't need BUS_DMA_ALLOCNOW, as bus_dmamap_load is called immediately
  following bus_dmamap_create(), so there's no need to avoid deferring
  allocation to load time.

- Add check for nsegs != 1 in drm_pci_alloc().

- We don't need the DRM_PCI_DMAADDR macro right now--it was only
  used once.
2008-07-25 06:54:33 +00:00
..
bsd-core - for DRM_NETBSD_HANDLE2ADDR/ADDR2HANDLE, do what uvm does to recover 2008-07-25 06:54:33 +00:00
libdrm
scripts
shared-core merge git-change-2580a065d81be645a14af1e91b8441f7e72fcbe4. 2008-07-25 05:30:08 +00:00
tests
Makefile.am
README
autogen.sh
configure.ac
libdrm.pc.in

README

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 i915.ko).



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:

	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.