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.
Showing the changes to include/uapi (1 of 6 files). Show all
Unified · Split
| @@ -44,6 +44,16 @@ extern "C" { · 43 unmodified lines | ||
| 44 | 44 | #define NOUVEAU_GETPARAM_PTIMER_TIME 14 |
| 45 | 45 | #define NOUVEAU_GETPARAM_HAS_BO_USAGE 15 |
| 46 | 46 | #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 | + | |
| 47 | 57 | struct drm_nouveau_getparam { |
| 48 | 58 | __u64 param; |
| 49 | 59 | __u64 value; |