diff options
-rw-r--r-- | shared-core/via_drm.h | 15 | ||||
-rw-r--r-- | shared-core/via_drv.h | 4 | ||||
-rw-r--r-- | shared-core/via_mm.c | 16 |
3 files changed, 22 insertions, 13 deletions
diff --git a/shared-core/via_drm.h b/shared-core/via_drm.h index 292106ab..5fbbcc72 100644 --- a/shared-core/via_drm.h +++ b/shared-core/via_drm.h @@ -107,8 +107,13 @@ #define VIA_BACK 0x2 #define VIA_DEPTH 0x4 #define VIA_STENCIL 0x8 -#define VIDEO 0 -#define AGP 1 + +#define VIA_MEM_VIDEO 0 /* matches drm constant */ +#define VIA_MEM_AGP 1 /* matches drm constant */ +#define VIA_MEM_SYSTEM 2 +#define VIA_MEM_MIXED 3 +#define VIA_MEM_UNKNOWN 4 + typedef struct { uint32_t offset; uint32_t size; @@ -194,8 +199,12 @@ typedef struct _drm_via_sarea { unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS]; unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS]; - unsigned int XvMCCtxNoGrabbed; /* Last context to hold decoder */ + unsigned int XvMCCtxNoGrabbed; /* Last context to hold decoder */ + + /* Used by the 3d driver only at this point, for pageflipping: + */ + unsigned int pfCurrentOffset; } drm_via_sarea_t; typedef struct _drm_via_cmdbuf_size { diff --git a/shared-core/via_drv.h b/shared-core/via_drv.h index fd884223..0fa014aa 100644 --- a/shared-core/via_drv.h +++ b/shared-core/via_drv.h @@ -28,11 +28,11 @@ #define DRIVER_NAME "via" #define DRIVER_DESC "VIA Unichrome / Pro" -#define DRIVER_DATE "20050925" +#define DRIVER_DATE "20051022" #define DRIVER_MAJOR 2 #define DRIVER_MINOR 7 -#define DRIVER_PATCHLEVEL 1 +#define DRIVER_PATCHLEVEL 2 #include "via_verifier.h" diff --git a/shared-core/via_mm.c b/shared-core/via_mm.c index 13921f3c..d7a55ed2 100644 --- a/shared-core/via_mm.c +++ b/shared-core/via_mm.c @@ -198,13 +198,13 @@ int via_mem_alloc(DRM_IOCTL_ARGS) sizeof(mem)); switch (mem.type) { - case VIDEO: + case VIA_MEM_VIDEO: if (via_fb_alloc(&mem) < 0) return -EFAULT; DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem)); return 0; - case AGP: + case VIA_MEM_AGP: if (via_agp_alloc(&mem) < 0) return -EFAULT; DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, @@ -231,7 +231,7 @@ static int via_fb_alloc(drm_via_mem_t * mem) if (block) { fb.offset = block->ofs; fb.free = (unsigned long)block; - if (!add_alloc_set(fb.context, VIDEO, fb.free)) { + if (!add_alloc_set(fb.context, VIA_MEM_VIDEO, fb.free)) { DRM_DEBUG("adding to allocation set fails\n"); via_mmFreeMem((PMemBlock) fb.free); retval = -1; @@ -268,7 +268,7 @@ static int via_agp_alloc(drm_via_mem_t * mem) if (block) { agp.offset = block->ofs; agp.free = (unsigned long)block; - if (!add_alloc_set(agp.context, AGP, agp.free)) { + if (!add_alloc_set(agp.context, VIA_MEM_AGP, agp.free)) { DRM_DEBUG("adding to allocation set fails\n"); via_mmFreeMem((PMemBlock) agp.free); retval = -1; @@ -296,11 +296,11 @@ int via_mem_free(DRM_IOCTL_ARGS) switch (mem.type) { - case VIDEO: + case VIA_MEM_VIDEO: if (via_fb_free(&mem) == 0) return 0; break; - case AGP: + case VIA_MEM_AGP: if (via_agp_free(&mem) == 0) return 0; break; @@ -328,7 +328,7 @@ static int via_fb_free(drm_via_mem_t * mem) via_mmFreeMem((PMemBlock) fb.free); - if (!del_alloc_set(fb.context, VIDEO, fb.free)) { + if (!del_alloc_set(fb.context, VIA_MEM_VIDEO, fb.free)) { retval = -1; } @@ -351,7 +351,7 @@ static int via_agp_free(drm_via_mem_t * mem) via_mmFreeMem((PMemBlock) agp.free); - if (!del_alloc_set(agp.context, AGP, agp.free)) { + if (!del_alloc_set(agp.context, VIA_MEM_AGP, agp.free)) { retval = -1; } |