Overview
~~~~~~~~

Installation procedure described here just reflects what I did. Probably
there are better ways to obtain the same results.


Reference System
~~~~~~~~~~~~~~~~

Reference system is debian 5.0. Patches are applied against

- linux-image-2.6.26
- xserver-xorg-video-ati experimental
- xine-lib (1.1.16) or newer (HG)
- xineliboutput (1.0.2) or newer (CVS)
- drm (GIT)


Special Thanks
~~~~~~~~~~~~~~

parts of this installation documentation are copied from
'durchflieger' radeon_frame_rate_control_patch-v0.2.tgz patch.
Thank you a lot for this.


Build requisites for Debian V5.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/etc/apt/sources.list:

deb http://ftp.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.debian.org/debian/ testing main contrib non-free

deb http://ftp.debian.org/debian/ unstable main contrib non-free
deb-src http://ftp.debian.org/debian/ unstable main contrib non-free

deb http://ftp.debian.org/debian/ experimental main contrib non-free
deb-src http://ftp.debian.org/debian/ experimental main contrib non-free


/etc/apt/apt-conf:

APT::Default-Release testing;


/etc/apt/preferences:

Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 501


Needed packages:
        linux-image-2.6.26, linux-headers-2.6.26, fakeroot, kernel-package, git-core


Installation of xorg V7.4 (xserver V1.5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        apt-get -t experimental install xserver-xorg


Building and installing radeon Xserver-DDX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

	# before building the DDX patched 'radeon_drm.h' must be 
	# copied to /usr/include/drm/radeon_drm.h (see below).
        apt-get -t experimental build-dep xserver-xorg-video-ati
        apt-get -t experimental source xserver-xorg-video-ati
        cd xserver-xorg-video-ati-*
        patch -p1 < vga-sync-fields/patches/video-ati.patch
        dpkg-buildpackage
        cd ..
        dpkg -i xserver-xorg-video-radeon_*deb


Building and installing drm for running kernel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        git-clone git://anongit.freedesktop.org/git/mesa/drm
        cd drm
        patch -p1 < vga-sync-fields/patches/drm-radeon-intel.patch
        cd linux-core
        make DRM_MODULES="drm radeon"
        modprobe -r radeon drm
                # You should save the original drm before removing it!
        rm -r /lib/modules/`uname -r`/kernel/drivers/char/drm
        make DRM_MODULES="drm radeon" install
        depmod -a

	#don't forget to copy the patched header file before building the tools
	cp drivers/char/drm/radeon_drm.h /usr/include/drm/radeon_drm.h

	# then reload the new modules
	rmmod radeon
	rmmod drm
	modprobe radeon


How to get, patch, build and install the xine-lib
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- first get a more recent xine-lib. Mine as of 2008-08-20 shows good results.

hg clone http://hg.debian.org/hg/xine-lib/xine-lib

- get it patched. The patch causes frame update intervals sent to the 
  Xserver much more evenly spaced. Which allows the soft-PLL to lock earlier.

cd xine-lib
patch -p1 < vga-sync-fields/patches/xine-lib.patch

- get it configured, built and installed

./autogen.sh
make
make install


How to build the tools
~~~~~~~~~~~~~~~~~~~~~~

Before building the tools patched 'radeon_drm.h' must be copied (see above).

The tools being found in tools directory are easily compiled as denoted
at the top of each single program. There is no Makefile yet.


Optional patch of radeonfb kernel module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The standard radeonfb driver does not yet support interlaced mode nor does
it support low dot clocks as needed for RGB PAL. With this patch you
can use your TV-set as a computer monitor.

Before you apply the patch you should check what it does. It's quite easy. 
One part of the patch tries to patch kernels '.config'. This should be done 
rather manually via 'make menuconfig'.

- from top of kernel tree type

patch -p0 < vga-sync-fields/patches/radeonfb.patch

