DRM for Radeon HD 4650,4750 & PVOPS Kernel

The most recent DRM Radeon support features of Jeremy Fitzhardinge kernel have been enabled and tested at Xen 3.5 Dom0 on top of Ubuntu Karmic Koala (Beta) Server. Xen host been built reboots directly into Gnome Desktop environment on the box with Core2Quad 9550 CPU, 8 GB RAM, Radeon HD 4X50 Video Card. Tuning kernel described in details bellow with snapshots of every configuration step been taken. Deployment Xen Unstable to Ubuntu Karmic Server environment was done in same way as in [1] and is also briefly documented. Xen 3.5 Dom0 with pvops kernel has been verified via F12 (rawhide) PV DomU install.

First – install on Uubuntu 9.10 Server all packages required for Xen build:-

apt-get install libcurl4-openssl-dev \
xserver-xorg-dev \
python2.6-dev \
mercurial gitk \
build-essential \
libncurses5-dev \
uuid-dev gawk \
gettext texinfo bcc

Second step :-

# cd /usr/src
# hg clone http://xenbits.xensource.com/xen-unstable.hg
# cd xen-unstable.hg
Set in Config.mk
PYTHON = python
# make xen
# make tools
# make install-xen
# make install-tools

Tuning Config.mk results Xen packages to be placed into /usr/local/lib/python2.6/dist-packages due to Changeset 19594 in xen-unstable.hg. Otherwise, Xen packages would go to /usr/lib/python2.6/site-packages, which is not default location for python 2.6 on Ubuntu 9.10 ( vs F11,F12 ). Thus you won’t be able to start xend in Dom0.
Kernel tuning to turn on Xen Dom0 Support and DRM support for Radeon Video Card.

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
# cd linux-2.6-xen
# make menuconfig

# make -j(x)(number_of_kernels)
# make modules_install install
# mkinitramfs -o /boot/initrd-

Update file /etc/default/grub as follows

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
# Uncomment to disable graphical terminal (grub-pc only)
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
# Uncomment to disable generation of recovery mode menu entrys

Update /etc/grub.d/40_cutom as follows

exec tail -n +3 $0
# This file is an example on how to add custom entries
menuentry "Xen 3.5 / Ubuntu 9.10 kernel pvops" {
insmod ext2
set root=(hd1,1)
multiboot (hd1,1)/xen-3.5.gz
module (hd1,1)/vmlinuz-
module (hd1,1)/initrd-

Then run

# update-grub

To generate grub.cfg entry for loading Xen Host and reboot via new grub2 entry

Dmesg report fragment

[ 27.923278] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 27.923350] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.213592] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.213659] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.213719] mtrr: type mismatch for d0000000,10000000 old: write-back new: write-combining
[ 28.358978] [drm] Setting GART location based on new memory map
[ 28.374561] [drm] Loading RV730/RV740 PFP Microcode
[ 28.374585] [drm] Loading RV730/RV740 CP Microcode
[ 28.389638] [drm] Resetting GPU
[ 28.389695] [drm] writeback test succeeded in 1 usecs

Setup F12 PV DomU

# wget http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os/isolinux/vmlinuz
# wget http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os/isolinux/initrd.img

Create installation profile

disk = ['phy:/dev/sdc7,xvda,w' ]
vif = [ 'bridge=eth1' ]
vfb = [ 'type=vnc,vncunused=1']
kernel = "/home/boris/fedora/vmlinuz"
ramdisk = "/home/boris/fedora/initrd.img"
on_reboot = 'restart'
on_crash = 'restart'

# xm create f12.install
# vncviewer localhost:0

Runtime profile

disk = ['phy:/dev/sdc7,xvda,w' ]
vif = [ 'bridge=eth1' ]
root="/dev/mapper/vg_fedora-lv_root ro"
vfb = [ 'type=vnc,vncunused=1']
on_reboot = 'restart'
on_crash = 'restart'

1.Setup Xen 3.4.1 Dom0 on top of Ubuntu 9.04 Server via Marc – A. Dahlhaus’s UDEV patch


5 Responses to DRM for Radeon HD 4650,4750 & PVOPS Kernel

  1. Gedece says:

    This is kind of confusing, I don’t know if I should be happy or sad. Why do you use DRM without clarifying what it means? Is it Direct Rendering Manager or Digital Rights Management or other thing?

  2. dbaxps says:

    I am sorry, it’s Direct Rendering Manager.
    Please, take a look at third snapshot.

  3. AzP says:

    Gedece: If you are at all “in the loop” regarding Linux, I think it is impossible to NOT know what it means.

    Sure, clarifications are always good, but regarding the context which is was mentioned in, I would say it is pretty redundant.

  4. gedece says:

    I disagree, Azp. One only needs to explain one time what DRM means in the article, and then continue to use DRM. It takes very little effort to do that and makes the article far more usefull for a lot more people, not only those “in the loop”.

    Anyway, my confusion was because one of my greatest fears is that binary only drivers can contai the other kind of DRM, something I completely dread. Upon further reading and finding that the screen captures refer to a kernell configuration, now I can see I was mistaken in thinking so. Paranoia 1 Gedece 0.

    For me it all comes down to this: are we going to be elitysts or is open source and free software a movement that is really about inclusion? I prefer the second idea. So, I tend to prefer articles that contain important data but do not require people “on the loop” to be understood.

  5. tapas says:

    Its a great guide it solved many of my doubts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: