OSDN Git Service

drm/amdgpu: add interface for editing a foreign process's priority v3
authorAndres Rodriguez <andresx7@gmail.com>
Mon, 26 Jun 2017 20:17:13 +0000 (16:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Oct 2017 20:30:24 +0000 (16:30 -0400)
commit52c6a62c64fac03a434cdacf6ef671c6a9e9000f
treeff79a90d966d6eeeccee08fdc93d428c8e4553d5
parentc23be4ae1d50e8d93f805de7ae3e8ea49a4ad781
drm/amdgpu: add interface for editing a foreign process's priority v3

The AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE ioctls are used to set
the priority of a different process in the current system.

When a request is dropped, the process's contexts will be
restored to the priority specified at context creation time.

A request can be dropped by setting the override priority to
AMDGPU_CTX_PRIORITY_UNSET.

An fd is used to identify the remote process. This is simpler than
passing a pid number, which is vulnerable to re-use, etc.

This functionality is limited to DRM_MASTER since abuse of this
interface can have a negative impact on the system's performance.

v2: removed unused output structure
v3: change refcounted interface for a regular set operation

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h [new file with mode: 0644]
include/uapi/drm/amdgpu_drm.h