Performance oriented customized Linux kernel based on the mainline kernel.
Find a file
Chris Wilson b81dde7194 drm/i915: Allow userspace to clone contexts on creation
A usecase arose out of handling context recovery in mesa, whereby they
wish to recreate a context with fresh logical state but preserving all
other details of the original. Currently, they create a new context and
iterate over which bits they want to copy across, but it would much more
convenient if they were able to just pass in a target context to clone
during creation. This essentially extends the setparam during creation
to pull the details from a target context instead of the user supplied
parameters.

The ideal here is that we don't expose control over anything more than
can be obtained via CONTEXT_PARAM. That is userspace retains explicit
control over all features, and this api is just convenience.

For example, you could replace

	struct context_param p = { .param = CONTEXT_PARAM_VM };

	param.ctx_id = old_id;
	gem_context_get_param(&p.param);

	new_id = gem_context_create();

	param.ctx_id = new_id;
	gem_context_set_param(&p.param);

	gem_vm_destroy(param.value); /* drop the ref to VM_ID handle */

with

	struct create_ext_param p = {
	  { .name = CONTEXT_CREATE_CLONE },
	  .clone_id = old_id,
	  .flags = CLONE_FLAGS_VM
	}
	new_id = gem_context_create_ext(&p);

and not have to worry about stray namespace pollution etc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190521211134.16117-5-chris@chris-wilson.co.uk
2019-05-22 08:40:37 +01:00
arch Merge tag 'drm-intel-next-2019-04-17' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2019-04-24 10:02:20 +10:00
block
certs
crypto
Documentation drm: revocation check at drm subsystem 2019-05-09 09:44:41 +02:00
drivers drm/i915: Allow userspace to clone contexts on creation 2019-05-22 08:40:37 +01:00
fs Merge branch 'page-refs' (page ref overflow) 2019-04-14 15:09:40 -07:00
include drm/i915: Allow userspace to clone contexts on creation 2019-05-22 08:40:37 +01:00
init
ipc
kernel Merge branch 'page-refs' (page ref overflow) 2019-04-14 15:09:40 -07:00
lib
LICENSES
mm Merge branch 'page-refs' (page ref overflow) 2019-04-14 15:09:40 -07:00
net
samples
scripts
security
sound Linux 5.1-rc5 2019-04-15 15:51:49 +10:00
tools for-linus-20190412 2019-04-13 16:23:16 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS drm-misc-next for v5.2: 2019-04-24 10:12:50 +10:00
Makefile Linux 5.1-rc5 2019-04-14 15:17:41 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.