drm/radeon: introduce kernel modesetting for radeon hardware
authorJerome Glisse <jglisse@redhat.com>
Fri, 5 Jun 2009 12:42:42 +0000 (14:42 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 15 Jun 2009 02:01:53 +0000 (12:01 +1000)
commit771fe6b912fca54f03e8a72eb63058b582775362
tree58aa5469ba8058c2b564d50807395ad6cd7bd7e4
parentba4e7d973dd09b66912ac4c0856add8b0703a997
drm/radeon: introduce kernel modesetting for radeon hardware

Add kernel modesetting support to radeon driver, use the ttm memory
manager to manage memory and DRM/GEM to provide userspace API.
In order to avoid backward compatibility issue and to allow clean
design and code the radeon kernel modesetting use different code path
than old radeon/drm driver.

When kernel modesetting is enabled the IOCTL of radeon/drm
driver are considered as invalid and an error message is printed
in the log and they return failure.

KMS enabled userspace will use new API to talk with the radeon/drm
driver. The new API provide functions to create/destroy/share/mmap
buffer object which are then managed by the kernel memory manager
(here TTM). In order to submit command to the GPU the userspace
provide a buffer holding the command stream, along this buffer
userspace have to provide a list of buffer object used by the
command stream. The kernel radeon driver will then place buffer
in GPU accessible memory and will update command stream to reflect
the position of the different buffers.

The kernel will also perform security check on command stream
provided by the user, we want to catch and forbid any illegal use
of the GPU such as DMA into random system memory or into memory
not owned by the process supplying the command stream. This part
of the code is still incomplete and this why we propose that patch
as a staging driver addition, future security might forbid current
experimental userspace to run.

This code support the following hardware : R1XX,R2XX,R3XX,R4XX,R5XX
(radeon up to X1950). Works is underway to provide support for R6XX,
R7XX and newer hardware (radeon from HD2XXX to HD4XXX).

Authors:
    Jerome Glisse <jglisse@redhat.com>
    Dave Airlie <airlied@redhat.com>
    Alex Deucher <alexdeucher@gmail.com>

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
58 files changed:
drivers/gpu/drm/Kconfig
drivers/gpu/drm/radeon/Kconfig [new file with mode: 0644]
drivers/gpu/drm/radeon/Makefile
drivers/gpu/drm/radeon/ObjectID.h [new file with mode: 0644]
drivers/gpu/drm/radeon/atom-bits.h [new file with mode: 0644]
drivers/gpu/drm/radeon/atom-names.h [new file with mode: 0644]
drivers/gpu/drm/radeon/atom-types.h [new file with mode: 0644]
drivers/gpu/drm/radeon/atom.c [new file with mode: 0644]
drivers/gpu/drm/radeon/atom.h [new file with mode: 0644]
drivers/gpu/drm/radeon/atombios.h [new file with mode: 0644]
drivers/gpu/drm/radeon/atombios_crtc.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r100.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r300.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r300_reg.h
drivers/gpu/drm/radeon/r420.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r500_reg.h [new file with mode: 0644]
drivers/gpu/drm/radeon/r520.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r600.c [new file with mode: 0644]
drivers/gpu/drm/radeon/r600_reg.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_agp.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_asic.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_atombios.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_benchmark.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_bios.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_clocks.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_combios.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_connectors.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_cs.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_cursor.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_device.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_display.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_encoders.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_fb.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_fence.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_fixed.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_gart.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_gem.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_i2c.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_irq_kms.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_kms.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_legacy_crtc.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_legacy_encoders.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_mode.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_object.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_object.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_reg.h [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_ring.c [new file with mode: 0644]
drivers/gpu/drm/radeon/radeon_ttm.c [new file with mode: 0644]
drivers/gpu/drm/radeon/rs400.c [new file with mode: 0644]
drivers/gpu/drm/radeon/rs600.c [new file with mode: 0644]
drivers/gpu/drm/radeon/rs690.c [new file with mode: 0644]
drivers/gpu/drm/radeon/rs780.c [new file with mode: 0644]
drivers/gpu/drm/radeon/rv515.c [new file with mode: 0644]
drivers/gpu/drm/radeon/rv770.c [new file with mode: 0644]
drivers/staging/Kconfig
include/drm/radeon_drm.h