diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2005-01-01 20:32:23 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2005-01-01 20:32:23 +0000 |
commit | 8fad99f52106c64bf7f5c88b2246313338286f54 (patch) | |
tree | 3ad68ac2503f71a4a966243ee7f4e22b123fbe20 /src/savage_sarea.h | |
parent | d0e9c3ad1cb9babbe841926c9a373ebe40dfe62c (diff) |
Updates to support the new Savage DRM driver (version 2.0.x) which was just
committed to DRM CVS. Cleaned up the interface to the DRI driver.
Bumped the Savage DDX version to 2.0.0 due to incompatible changes in
that interface.
Diffstat (limited to 'src/savage_sarea.h')
-rw-r--r-- | src/savage_sarea.h | 51 |
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__ */ |