why drm?

Anton Shterenlikht mexas at bristol.ac.uk
Tue Feb 19 08:23:04 UTC 2013


I'm confused about DRM/DRI.
I've done some brief reading but still
not clear what these do, or
even if DRM and DRI do the same thing?

I've a laptop with 

# pciconf -lv |grep Rade
    device     = 'RS690M [Radeon X1200 Series]'
#

which seems to be driven by

x11-drivers/xf86-video-ati

And that seems to work ok.

If I build a kernel with drm:

# grep drm /root/kernels/BUZI
device          drm             # DRM core module required by DRM drivers
device          i915drm         # Intel i830 through i915
device          r128drm         # ATI Rage 128
device          radeondrm       # ATI Radeon
device          viadrm          # VIA
#

(I probably don't need all these drm options)
then I get these messages:

 [drm:pid1077:drm_open] open_count = 0
 [drm:pid1077:drm_open_helper] pid = 1077, device = dri/card0
 [drm:pid1077:radeon_driver_open] 
 [drm:pid1077:drm_addmap] offset = 0x00000000, size = 0x00002000, type = 2
 [drm:pid1077:drm_addmap] 8192 13 0xffffff800281b000
 [drm:pid1077:drm_addmap] Added map 2 0xffffff800281b000/0x2000
 [drm:pid1077:drm_addmap] offset = 0xc0100000, size = 0x08000000, type = 0
 [drm:pid1077:drm_addmap] Added map 0 0xc0100000/0x8000000
 [drm:pid1077:drm_firstopen] 
 [drm:pid1077:drm_ioctl] pid=1077, cmd=0xc0406400, nr=0x00, dev 0xfffffe00028e3200, auth=1
 [drm:pid1077:drm_ioctl] pid=1077, cmd=0xc0406400, nr=0x00, dev 0xfffffe00028e3200, auth=1
 [drm:pid1077:drm_close] open_count = 1
 [drm:pid1077:drm_close] pid = 1077, device = 0xfffffe00028e3200, open_count = 1
 [drm:pid1077:drm_lastclose] 
 [drm:pid1077:radeon_do_cleanup_cp] 

Do these indicate that all is fine?

If I then start X (via xdm): I see
these lines in /var/log/Xorg.0.log:

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 10, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:05.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 10, (OK)
drmOpenByBusid: drmOpenMinor returns 10
drmOpenByBusid: drmGetBusid reports pci:0000:01:05.0

These also seem allright.

However, I just get a black screen from
which I cannot recover and have to reboot.

So my questions:

1. Do I need DRM/DRI. My understanding is
that X will do just as well without it,
perhaps a bit slower. Is that correct?

2. In my using of DRM did I miss any steps?

I'd be grateful for any advice or a link
to a relevant existing document.

Many thanks

Anton



More information about the freebsd-x11 mailing list