summaryrefslogtreecommitdiff
path: root/src/savage_sarea.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/savage_sarea.h')
-rw-r--r--src/savage_sarea.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/src/savage_sarea.h b/src/savage_sarea.h
index d4287cf..1debc6d 100644
--- a/src/savage_sarea.h
+++ b/src/savage_sarea.h
@@ -1,6 +1,7 @@
-/*
- * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
- * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
+/* savage_sarea.h -- Public header for the savage driver (SAREA)
+ *
+ * Copyright 2004 Felix Kuehling
+ * All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -22,36 +23,36 @@
* DEALINGS IN THE SOFTWARE.
*/
-
#ifndef __SAVAGE_SAREA_H__
#define __SAVAGE_SAREA_H__
-#include "drm.h"
-
-/* WARNING: If you change any of these defines, make sure to change
- * the kernel include file as well (savage_drm.h)
- */
#ifndef __SAVAGE_SAREA_DEFINES__
#define __SAVAGE_SAREA_DEFINES__
-#endif
-typedef drm_savage_sarea_t SAVAGESAREAPrivRec;
-typedef drm_savage_sarea_t *SAVAGESAREAPrivPtr;
-
-
-
-#endif
-
-
-
-
-
-
-
-
-
+/* 2 heaps (1 for card, 1 for agp), each divided into upto 128
+ * regions, subject to a minimum region size of (1<<16) == 64k.
+ *
+ * Clients may subdivide regions internally, but when sharing between
+ * clients, the region size is the minimum granularity.
+ */
+#define SAVAGE_CARD_HEAP 0
+#define SAVAGE_AGP_HEAP 1
+#define SAVAGE_NR_TEX_HEAPS 2
+#define SAVAGE_NR_TEX_REGIONS 16
+#define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16
+#endif /* __SAVAGE_SAREA_DEFINES__ */
+typedef struct {
+ /* LRU lists for texture memory in agp space and on the card.
+ */
+ drm_tex_region_t texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS+1];
+ unsigned int texAge[SAVAGE_NR_TEX_HEAPS];
+ /* Mechanism to validate card state.
+ */
+ int ctxOwner;
+} SAVAGESAREAPrivRec, *SAVAGESAREAPrivPtr;
+#endif /* __SAVAGE_SAREA_H__ */