From da63f4ba0f15c3ae614eba92c8219670c674727e Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Sat, 22 Sep 2007 13:34:33 +0200 Subject: Add fence error member. Modify the TTM backend bind arguments. Export a number of functions needed for driver-specific super-ioctls. Add a function to map buffer objects from the kernel, regardless of where they're currently placed. A number of error fixes. --- shared-core/drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 30c7a1a3..21386a57 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -639,6 +639,7 @@ struct drm_set_version { #define DRM_FENCE_FLAG_SHAREABLE 0x00000002 #define DRM_FENCE_FLAG_WAIT_LAZY 0x00000004 #define DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS 0x00000008 +#define DRM_FENCE_FLAG_NO_USER 0x00000010 /* Reserved for driver use */ #define DRM_FENCE_MASK_DRIVER 0xFF000000 @@ -651,7 +652,7 @@ struct drm_fence_arg { unsigned int type; unsigned int flags; unsigned int signaled; - unsigned int pad64; + unsigned int error; uint64_t expand_pad[3]; /*Future expansion */ }; -- cgit v1.2.3 From 03c47f1420bf17a1e0f2b86be500656ae5a4c95b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 25 Sep 2007 16:16:14 +1000 Subject: drm: use fence_class as name instead of class --- shared-core/drm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 30c7a1a3..b4754ead 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -647,11 +647,11 @@ struct drm_set_version { struct drm_fence_arg { unsigned int handle; - unsigned int class; + unsigned int fence_class; unsigned int type; unsigned int flags; unsigned int signaled; - unsigned int pad64; + unsigned int sequence; uint64_t expand_pad[3]; /*Future expansion */ }; -- cgit v1.2.3 From 440fc5113ef1ffb1a22bff92cf34eaf23896db8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5Butf-8=5D=20Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Oct 2007 21:09:29 -0400 Subject: Eliminate support for fake buffers. --- shared-core/drm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 19292344..279f858f 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -757,7 +757,6 @@ struct drm_fence_arg { enum drm_bo_type { drm_bo_type_dc, drm_bo_type_user, - drm_bo_type_fake, drm_bo_type_kernel, /* for initial kernel allocations */ }; -- cgit v1.2.3 From dccefba71a65566e7e1628b3be67621866000411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Oct 2007 21:09:30 -0400 Subject: Take bo type argument out of the ioctl interface. The buffer object type is still tracked internally, but it is no longer part of the user space visible ioctl interface. If the bo create ioctl specifies a non-NULL buffer address we assume drm_bo_type_user, otherwise drm_bo_type_dc. Kernel side allocations call drm_buffer_object_create() directly and can still specify drm_bo_type_kernel. Not 100% this makes sense either, but with this patch, the buffer type is no longer exported and we can clean up the internals later on. --- shared-core/drm.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 279f858f..568b1003 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -754,12 +754,6 @@ struct drm_fence_arg { #define DRM_BO_INIT_MINOR 1 -enum drm_bo_type { - drm_bo_type_dc, - drm_bo_type_user, - drm_bo_type_kernel, /* for initial kernel allocations */ -}; - struct drm_bo_info_req { uint64_t mask; uint64_t flags; @@ -775,8 +769,6 @@ struct drm_bo_create_req { uint64_t buffer_start; unsigned int hint; unsigned int page_alignment; - enum drm_bo_type type; - unsigned int pad64; }; struct drm_bo_op_req { -- cgit v1.2.3 From a69c85fec8ed323bffb1324ea08157b3897e97db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 9 Oct 2007 21:09:31 -0400 Subject: Drop destroy ioctls for fences and buffer objects. We now always create a drm_ref_object for user objects and this is then the only things that holds a reference to the user object. This way unreference on will destroy the user object when the last drm_ref_object goes way. --- shared-core/drm.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 568b1003..30650bd9 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -962,7 +962,6 @@ struct drm_mm_init_arg { #define DRM_IOCTL_MM_UNLOCK DRM_IOWR(0xc3, struct drm_mm_type_arg) #define DRM_IOCTL_FENCE_CREATE DRM_IOWR(0xc4, struct drm_fence_arg) -#define DRM_IOCTL_FENCE_DESTROY DRM_IOWR(0xc5, struct drm_fence_arg) #define DRM_IOCTL_FENCE_REFERENCE DRM_IOWR(0xc6, struct drm_fence_arg) #define DRM_IOCTL_FENCE_UNREFERENCE DRM_IOWR(0xc7, struct drm_fence_arg) #define DRM_IOCTL_FENCE_SIGNALED DRM_IOWR(0xc8, struct drm_fence_arg) @@ -972,7 +971,6 @@ struct drm_mm_init_arg { #define DRM_IOCTL_FENCE_BUFFERS DRM_IOWR(0xcc, struct drm_fence_arg) #define DRM_IOCTL_BO_CREATE DRM_IOWR(0xcd, struct drm_bo_create_arg) -#define DRM_IOCTL_BO_DESTROY DRM_IOWR(0xce, struct drm_bo_handle_arg) #define DRM_IOCTL_BO_MAP DRM_IOWR(0xcf, struct drm_bo_map_wait_idle_arg) #define DRM_IOCTL_BO_UNMAP DRM_IOWR(0xd0, struct drm_bo_handle_arg) #define DRM_IOCTL_BO_REFERENCE DRM_IOWR(0xd1, struct drm_bo_reference_info_arg) -- cgit v1.2.3