diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-20 12:52:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-25 13:18:01 +0100 |
commit | 797d173a9af12055ba2609293182b616dd673ef4 (patch) | |
tree | 0bc73734fa5e5bb1e57715d448bc7a6da88aba5a /src/legacy/i810/i810_dri.h | |
parent | cd61531a78b9a2cbdd6019199c43258f83e6e2ce (diff) |
i810: Move into a legacy directory.
The driver is still built but is no longer under active development so
move it and supporting files to a new directory.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/legacy/i810/i810_dri.h')
-rw-r--r-- | src/legacy/i810/i810_dri.h | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/src/legacy/i810/i810_dri.h b/src/legacy/i810/i810_dri.h new file mode 100644 index 00000000..16b6f087 --- /dev/null +++ b/src/legacy/i810/i810_dri.h @@ -0,0 +1,131 @@ + +#ifndef _I810_DRI_ +#define _I810_DRI_ + +#include "xf86drm.h" +#include "i810_common.h" + +#define I810_MAX_DRAWABLES 256 + +#define I810_MAJOR_VERSION 1 +#define I810_MINOR_VERSION 7 +#define I810_PATCHLEVEL 4 + +typedef struct { + drm_handle_t regs; + drmSize regsSize; + + drmSize backbufferSize; + drm_handle_t backbuffer; + + drmSize depthbufferSize; + drm_handle_t depthbuffer; + + drm_handle_t textures; + int textureSize; + + drm_handle_t agp_buffers; + drmSize agp_buf_size; + + int deviceID; + int width; + int height; + int mem; + int cpp; + int bitsPerPixel; + int fbOffset; + int fbStride; + + int backOffset; + int depthOffset; + + int auxPitch; + int auxPitchBits; + + int logTextureGranularity; + int textureOffset; + + /* For non-dma direct rendering. + */ + int ringOffset; + int ringSize; + + drmBufMapPtr drmBufs; + int irq; + unsigned int sarea_priv_offset; + +} I810DRIRec, *I810DRIPtr; + +/* WARNING: Do not change the SAREA structure without changing the kernel + * as well */ + +#define I810_UPLOAD_TEX0IMAGE 0x1 /* handled clientside */ +#define I810_UPLOAD_TEX1IMAGE 0x2 /* handled clientside */ +#define I810_UPLOAD_CTX 0x4 +#define I810_UPLOAD_BUFFERS 0x8 +#define I810_UPLOAD_TEX0 0x10 +#define I810_UPLOAD_TEX1 0x20 +#define I810_UPLOAD_CLIPRECTS 0x40 + +typedef struct { + unsigned char next, prev; /* indices to form a circular LRU */ + unsigned char in_use; /* owned by a client, or free? */ + int age; /* tracked by clients to update local LRU's */ +} I810TexRegionRec, *I810TexRegionPtr; + +typedef struct { + unsigned int ContextState[I810_CTX_SETUP_SIZE]; + unsigned int BufferState[I810_DEST_SETUP_SIZE]; + unsigned int TexState[2][I810_TEX_SETUP_SIZE]; + unsigned int dirty; + + unsigned int nbox; + drm_clip_rect_t boxes[I810_NR_SAREA_CLIPRECTS]; + + /* Maintain an LRU of contiguous regions of texture space. If + * you think you own a region of texture memory, and it has an + * age different to the one you set, then you are mistaken and + * it has been stolen by another client. If global texAge + * hasn't changed, there is no need to walk the list. + * + * These regions can be used as a proxy for the fine-grained + * texture information of other clients - by maintaining them + * in the same lru which is used to age their own textures, + * clients have an approximate lru for the whole of global + * texture space, and can make informed decisions as to which + * areas to kick out. There is no need to choose whether to + * kick out your own texture or someone else's - simply eject + * them all in LRU order. + */ + + drmTextureRegion texList[I810_NR_TEX_REGIONS + 1]; + + /* Last elt is sentinal */ + int texAge; /* last time texture was uploaded */ + + int last_enqueue; /* last time a buffer was enqueued */ + int last_dispatch; /* age of the most recently dispatched buffer */ + int last_quiescent; /* */ + + int ctxOwner; /* last context to upload state */ + + int vertex_prim; + + int pf_enabled; /* is pageflipping allowed? */ + int pf_active; /* is pageflipping active right now? */ + int pf_current_page; /* which buffer is being displayed? */ + + +} I810SAREARec, *I810SAREAPtr; + +typedef struct { + /* Nothing here yet */ + int dummy; +} I810ConfigPrivRec, *I810ConfigPrivPtr; + +typedef struct { + /* Nothing here yet */ + int dummy; +} I810DRIContextRec, *I810DRIContextPtr; + +#endif |