drm: execution context for GEM buffers v7
authorChristian König <christian.koenig@amd.com>
Thu, 7 Apr 2022 06:17:51 +0000 (08:17 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 12 Jul 2023 12:14:20 +0000 (14:14 +0200)
commit09593216bff15866f95c8ad406cb7fdcec1ee40a
tree61b98888a7b579e112629282c72e1bc1d2687a78
parentf1b215fdcd01ff3cc74f1e4194c866573af8034b
drm: execution context for GEM buffers v7

This adds the infrastructure for an execution context for GEM buffers
which is similar to the existing TTMs execbuf util and intended to replace
it in the long term.

The basic functionality is that we abstracts the necessary loop to lock
many different GEM buffers with automated deadlock and duplicate handling.

v2: drop xarray and use dynamic resized array instead, the locking
    overhead is unnecessary and measurable.
v3: drop duplicate tracking, radeon is really the only one needing that.
v4: fixes issues pointed out by Danilo, some typos in comments and a
    helper for lock arrays of GEM objects.
v5: some suggestions by Boris Brezillon, especially just use one retry
    macro, drop loop in prepare_array, use flags instead of bool
v6: minor changes suggested by Thomas, Boris and Danilo
v7: minor typos pointed out by checkpatch.pl fixed

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Tested-by: Danilo Krummrich <dakr@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230711133122.3710-2-christian.koenig@amd.com
Documentation/gpu/drm-mm.rst
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/drm_exec.c [new file with mode: 0644]
include/drm/drm_exec.h [new file with mode: 0644]