History

drm/nouveau: exec: report max pushs through getparam

Report the maximum number of IBs that can be pushed with a single DRM_IOCTL_NOUVEAU_EXEC through DRM_IOCTL_NOUVEAU_GETPARAM. While the maximum number of IBs per ring might vary between chipsets, the kernel will make sure that userspace can only push a fraction of the maximum number of IBs per ring per job, such that we avoid a situation where there's only a single job occupying the ring, which could potentially lead to the ring run dry. Using DRM_IOCTL_NOUVEAU_GETPARAM to report the maximum number of IBs that can be pushed with a single DRM_IOCTL_NOUVEAU_EXEC implies that all channels of a given device have the same ring size.

Danilo Krummrich committed 3 years ago

Commit d59e75e1 parent bbe08a06 files · +49 −4Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/drm/nouveau_drm.h+10−0
@@ -44,6 +44,16 @@ extern "C" { · 43 unmodified lines
44#define NOUVEAU_GETPARAM_PTIMER_TIME 1444#define NOUVEAU_GETPARAM_PTIMER_TIME 14
45#define NOUVEAU_GETPARAM_HAS_BO_USAGE 1545#define NOUVEAU_GETPARAM_HAS_BO_USAGE 15
46#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 1646#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16
47
48/**
49 * @NOUVEAU_GETPARAM_EXEC_PUSH_MAX
50 *
51 * Query the maximum amount of IBs that can be pushed through a single
52 * &drm_nouveau_exec structure and hence a single &DRM_IOCTL_NOUVEAU_EXEC
53 * ioctl().
54 */
55#define NOUVEAU_GETPARAM_EXEC_PUSH_MAX 17
56
47struct drm_nouveau_getparam {57struct drm_nouveau_getparam {
48 __u64 param;58 __u64 param;
49 __u64 value;59 __u64 value;