64-bit fixes. Bumped driver date and patchlevel.
#define DRIVER_NAME "via"
#define DRIVER_DESC "VIA Unichrome / Pro"
-#define DRIVER_DATE "20050508"
+#define DRIVER_DATE "20050523"
#define DRIVER_MAJOR 2
#define DRIVER_MINOR 6
#include "via_verifier.h"
-#define VIA_PCI_BUF_SIZE 120000
-#define VIA_FIRE_BUF_SIZE 2048
+#define VIA_PCI_BUF_SIZE 60000
+#define VIA_FIRE_BUF_SIZE 1024
#define VIA_NUM_IRQS 2
/* Set Data Structure */
#define SET_SIZE 5000
-typedef unsigned int ITEM_TYPE;
+typedef unsigned long ITEM_TYPE;
typedef struct {
ITEM_TYPE val;
if (i < MAX_CONTEXT) {
set_t *set;
- unsigned int item;
+ ITEM_TYPE item;
int retval;
DRM_DEBUG("find socket %d, context = %d\n", i, context);
set = global_ppriv[i].sets[0];
retval = via_setFirst(set, &item);
while (retval) {
- DRM_DEBUG("free video memory 0x%x\n", item);
+ DRM_DEBUG("free video memory 0x%lx\n", item);
via_mmFreeMem((PMemBlock) item);
retval = via_setNext(set, &item);
}
set = global_ppriv[i].sets[1];
retval = via_setFirst(set, &item);
while (retval) {
- DRM_DEBUG("free agp memory 0x%x\n", item);
+ DRM_DEBUG("free agp memory 0x%lx\n", item);
via_mmFreeMem((PMemBlock) item);
retval = via_setNext(set, &item);
}
block = via_mmAllocMem(FBHeap, fb.size, 5, 0);
if (block) {
fb.offset = block->ofs;
- fb.free = (unsigned int)block;
+ fb.free = (unsigned long)block;
if (!add_alloc_set(fb.context, VIDEO, fb.free)) {
DRM_DEBUG("adding to allocation set fails\n");
via_mmFreeMem((PMemBlock) fb.free);
block = via_mmAllocMem(AgpHeap, agp.size, 5, 0);
if (block) {
agp.offset = block->ofs;
- agp.free = (unsigned int)block;
+ agp.free = (unsigned long)block;
if (!add_alloc_set(agp.context, AGP, agp.free)) {
DRM_DEBUG("adding to allocation set fails\n");
via_mmFreeMem((PMemBlock) agp.free);
retval = -1;
}
- DRM_DEBUG("free fb, free = %d\n", fb.free);
+ DRM_DEBUG("free fb, free = %ld\n", fb.free);
return retval;
}
retval = -1;
}
- DRM_DEBUG("free agp, free = %d\n", agp.free);
+ DRM_DEBUG("free agp, free = %ld\n", agp.free);
return retval;
}
unsigned int context;
unsigned int size;
unsigned long offset;
- unsigned int free;
+ unsigned long free;
} drm_via_mm_t;
typedef struct {
#define DRIVER_NAME "via"
#define DRIVER_DESC "VIA Unichrome / Pro"
-#define DRIVER_DATE "20050508"
+#define DRIVER_DATE "20050523"
#define DRIVER_MAJOR 2
#define DRIVER_MINOR 6
#include "via_drm.h"
#include "via_verifier.h"
-#define VIA_PCI_BUF_SIZE 120000
-#define VIA_FIRE_BUF_SIZE 2048
+#define VIA_PCI_BUF_SIZE 60000
+#define VIA_FIRE_BUF_SIZE 1024
#define VIA_NUM_IRQS 2
/* Set Data Structure */
#define SET_SIZE 5000
-typedef unsigned int ITEM_TYPE;
+typedef unsigned long ITEM_TYPE;
typedef struct {
ITEM_TYPE val;
if (i < MAX_CONTEXT) {
set_t *set;
- unsigned int item;
+ ITEM_TYPE item;
int retval;
DRM_DEBUG("find socket %d, context = %d\n", i, context);
set = global_ppriv[i].sets[0];
retval = via_setFirst(set, &item);
while (retval) {
- DRM_DEBUG("free video memory 0x%x\n", item);
+ DRM_DEBUG("free video memory 0x%lx\n", item);
via_mmFreeMem((PMemBlock) item);
retval = via_setNext(set, &item);
}
set = global_ppriv[i].sets[1];
retval = via_setFirst(set, &item);
while (retval) {
- DRM_DEBUG("free agp memory 0x%x\n", item);
+ DRM_DEBUG("free agp memory 0x%lx\n", item);
via_mmFreeMem((PMemBlock) item);
retval = via_setNext(set, &item);
}
global_ppriv[i].used = 0;
}
+ via_release_futex(dev_priv, context);
+
#if defined(__linux__)
/* Linux specific until context tracking code gets ported to BSD */
block = via_mmAllocMem(FBHeap, fb.size, 5, 0);
if (block) {
fb.offset = block->ofs;
- fb.free = (unsigned int)block;
+ fb.free = (unsigned long)block;
if (!add_alloc_set(fb.context, VIDEO, fb.free)) {
DRM_DEBUG("adding to allocation set fails\n");
via_mmFreeMem((PMemBlock) fb.free);
block = via_mmAllocMem(AgpHeap, agp.size, 5, 0);
if (block) {
agp.offset = block->ofs;
- agp.free = (unsigned int)block;
+ agp.free = (unsigned long)block;
if (!add_alloc_set(agp.context, AGP, agp.free)) {
DRM_DEBUG("adding to allocation set fails\n");
via_mmFreeMem((PMemBlock) agp.free);
retval = -1;
}
- DRM_DEBUG("free fb, free = %d\n", fb.free);
+ DRM_DEBUG("free fb, free = %ld\n", fb.free);
return retval;
}
retval = -1;
}
- DRM_DEBUG("free agp, free = %d\n", agp.free);
+ DRM_DEBUG("free agp, free = %ld\n", agp.free);
return retval;
}
unsigned int context;
unsigned int size;
unsigned long offset;
- unsigned int free;
+ unsigned long free;
} drm_via_mm_t;
typedef struct {