nouveau: add support for DRM_NOUVEAU_GEM_CPU_PREP_TIMEOUT
PATCH 1/1 nouveau: add support for DRM_NOUVEAU_GEM_CPU_PREP_TIMEOUT
New ioctl is used internally by nouveau_bo_wait to properly handle timeouts with signals.
--- include/drm/nouveau_drm.h | 33 ++++++++++++++-------- nouveau/nouveau_bo.c | 66 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 77 insertions(+), 22 deletions(-)
include/drm/nouveau_drm.h +21 -12
@@ -25,6 +25,8 @@#ifndef __NOUVEAU_DRM_H__#define __NOUVEAU_DRM_H__ +#include <sys/time.h> +#define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 struct drm_nouveau_channel_alloc {
@@ -179,6 +181,12 @@ struct drm_nouveau_gem_cpu_prep {uint32_t flags; }; +struct drm_nouveau_gem_cpu_prep_timeout { +uint32_t handle; +uint32_t flags; +struct timespec timeout; +}; +struct drm_nouveau_gem_cpu_fini {uint32_t handle; };
@@ -192,17 +200,18 @@ enum nouveau_bus_type {struct drm_nouveau_sarea { }; -#define DRM_NOUVEAU_GETPARAM 0x00 -#define DRM_NOUVEAU_SETPARAM 0x01 -#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 -#define DRM_NOUVEAU_CHANNEL_FREE 0x03 -#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 -#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 -#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 -#define DRM_NOUVEAU_GEM_NEW 0x40 -#define DRM_NOUVEAU_GEM_PUSHBUF 0x41 -#define DRM_NOUVEAU_GEM_CPU_PREP 0x42 -#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 -#define DRM_NOUVEAU_GEM_INFO 0x44 +#define DRM_NOUVEAU_GETPARAM 0x00 +#define DRM_NOUVEAU_SETPARAM 0x01 +#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 +#define DRM_NOUVEAU_CHANNEL_FREE 0x03 +#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 +#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 +#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 +#define DRM_NOUVEAU_GEM_NEW 0x40 +#define DRM_NOUVEAU_GEM_PUSHBUF 0x41 +#define DRM_NOUVEAU_GEM_CPU_PREP 0x42 +#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 +#define DRM_NOUVEAU_GEM_INFO 0x44 +#define DRM_NOUVEAU_GEM_CPU_PREP_TIMEOUT 0x45#endif /* __NOUVEAU_DRM_H__ */
nouveau/nouveau_bo.c +56 -10
86 lines not on this page · raw message
Signature · 1 line
1.7.6.1