From Spice
Contents |
[edit]
DRM
[edit]
Summary
DRM (Direct Rendering Manager) driver for Linux.
[edit]
Owner
- Alon Levy
[edit]
Current Status
- Targeted Release: spice-0.12
- 50% complete
- git://anongit.freedesktop.org/~alon/linux qxl
- Fedora feature page: https://fedoraproject.org/wiki/Features/QXLKMSSupport
[edit]
Description
DRM driver for linux. Provides kernel mode setting (KMS), switch to qxl native mode from loading (instead of at X), follow up with rewriting of X driver to use it to allocate memory. Deallocation will still happen in the Kernel driver.
[edit]
Steps
[edit]
DRM driver standalone
- fb operations: single allocator carving up space for command+palette+image+chunk. optimize later
- single bo for ioctl allocated memory. use radeon scheme? 16 buffers corresponding to drawing buffers which are pixmaps.
- allocator: ttm
- fb mode image cache
- currently don't cache anything.
- can take the cache implementation from xf86-video-qxl (it's actually already there, just disabled).
- applications that have to work before next stage - anything using fb:
- regular console:
- plymouth
- X with modesetting driver
- X with qxl driver
[edit]
dumb ioctl
- work with xf86-video-modesetting
- by implementing the three dumb callbacks:
- .dumb_create = radeon_mode_dumb_create,
- DRM_IOCTL_MODE_CREATE_DUMB
- .dumb_map_offset = radeon_mode_dumb_mmap,
- drm_mode_mmap_dumb_ioctl / DRM_IOCTL_MODE_MAP_DUMB
- .dumb_destroy = radeon_mode_dumb_destroy,
- DRM_IOCTL_MODE_DESTROY_DUMB
- .dumb_create = radeon_mode_dumb_create,
[edit]
ioctl design
[edit]
ioctl implementation
[edit]
X driver
[edit]
Some graphics to show I know how to use asciio
C - changed N - new
.------------------.
| App |
| |
| .--------. |
| | libX11 | |
| '--------' |
'--------|---------'
v
.-------------------------.
| Xorg |
| |
| .CCCCCCCCCCCCCCCCCCCCC. |
| | qxl_drv.so | |
| | changes: use libdrm | |
| '---------------------' |
| |
| .NNNNNNNNNNNNNNN. |
| | libdrm_qxl | |
| '---------------' |
'------------|------------'
|
v
.---------------------------.
| kernel |
| |
| .NNNNNNNNNNNNNNN. |
| | qxl.ko | |
| '---------------' |
'------------|--------------'
|
v
.-----------------------.
| qemu |
| |
| .------------------. |
| . qxl . |
| '------------------' |
| | |
'------------|----------'
|
v
.---------------------.
| server |
| |
'---------------------'

