summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-01 10:53:07 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-02-01 10:53:55 +0100
commit9677c5ecc6b97ef75b3141b671fb5cfbbf8a3fa8 (patch)
tree119f76bf756e57fee000da3a4cb0185d9e93c667 /linux-core
parent333c6af47a906461678b5a8b2af415936d30babc (diff)
Prepare for removal of the ttm_object type.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index c0064bb7..2453c756 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -650,6 +650,11 @@ typedef struct drm_ref_object {
#include "drm_ttm.h"
+#define _DRM_FLAG_MEMTYPE_FIXED 0x00000001 /* Fixed (on-card) PCI memory */
+#define _DRM_FLAG_MEMTYPE_MAPPABLE 0x00000002 /* Memory mappable */
+#define _DRM_FLAG_MEMTYPE_CACHED 0x00000004 /* Supports cached binding */
+#define _DRM_FLAG_NEEDS_IOREMAP 0x00000008 /* Fixed memory needs ioremap
+ before kernel access. */
typedef struct drm_mem_type_manager {
int has_type;
@@ -795,11 +800,16 @@ typedef struct drm_fence_manager{
atomic_t count;
} drm_fence_manager_t;
-#define _DRM_FLAG_MEMTYPE_FIXED 0x00000001 /* Fixed (on-card) PCI memory */
-#define _DRM_FLAG_MEMTYPE_MAPPABLE 0x00000002 /* Memory mappable */
-#define _DRM_FLAG_MEMTYPE_CACHED 0x00000004 /* Supports cached binding */
-#define _DRM_FLAG_NEEDS_IOREMAP 0x00000008 /* Fixed memory needs ioremap
- before kernel access. */
+
+typedef struct drm_bo_mem_region {
+ drm_mm_node_t *node;
+ uint32_t memory_type;
+ drm_ttm_t *ttm;
+ unsigned long bus_offset;
+ unsigned long num_pages;
+ uint32_t vm_flags;
+} drm_bo_mem_region_t;
+
typedef struct drm_buffer_manager{
struct mutex init_mutex;
@@ -1005,8 +1015,6 @@ typedef struct drm_buffer_object{
atomic_t usage;
drm_ttm_object_t *ttm_object;
- drm_ttm_t *ttm;
- unsigned long num_pages;
unsigned long buffer_start;
drm_bo_type_t type;
unsigned long offset;
@@ -1016,7 +1024,7 @@ typedef struct drm_buffer_object{
uint32_t mask;
uint32_t mem_type;
- drm_mm_node_t *mm_node; /* MM node for on-card RAM */
+ drm_mm_node_t *mm_node;
struct list_head lru;
struct list_head ddestroy;
@@ -1026,6 +1034,16 @@ typedef struct drm_buffer_object{
uint32_t priv_flags;
wait_queue_head_t event_queue;
struct mutex mutex;
+
+ /* For vm */
+
+ drm_mm_node_t *node;
+ uint32_t memory_type;
+ drm_ttm_t *ttm;
+ unsigned long bus_offset;
+ unsigned long num_pages;
+ uint32_t vm_flags;
+
} drm_buffer_object_t;
#define _DRM_BO_FLAG_UNFENCED 0x00000001