diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/common.h b/src/common.h index b5520536..1b98d695 100644 --- a/src/common.h +++ b/src/common.h @@ -124,7 +124,7 @@ extern void I830DPRINTF_stub(const char *filename, int line, #if 1 #define ADVANCE_LP_RING() do { \ - RecPtr->LpRing.tail = outring; \ + RecPtr->LpRing->tail = outring; \ if (outring & 0x07) \ ErrorF("ADVANCE_LP_RING: " \ "outring (0x%x) isn't on a QWord boundary", outring); \ @@ -132,7 +132,7 @@ extern void I830DPRINTF_stub(const char *filename, int line, } while (0) #else #define ADVANCE_LP_RING() { \ - RecPtr->LpRing.tail = outring; \ + RecPtr->LpRing->tail = outring; \ if (outring & 0x07) \ ErrorF("ADVANCE_LP_RING: " \ "outring (0x%x) isn't on a QWord boundary", outring); \ @@ -179,19 +179,19 @@ extern void I830DPRINTF_stub(const char *filename, int line, if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) \ DO_RING_IDLE(); \ needed = (n) * 4; \ - if ((RecPtr->LpRing.tail > RecPtr->LpRing.tail_mask - AVOID_SIZE) || \ - (RecPtr->LpRing.tail + needed) > \ - RecPtr->LpRing.tail_mask - AVOID_SIZE) { \ - needed += RecPtr->LpRing.tail_mask + 1 - RecPtr->LpRing.tail; \ + if ((RecPtr->LpRing->tail > RecPtr->LpRing->tail_mask - AVOID_SIZE) || \ + (RecPtr->LpRing->tail + needed) > \ + RecPtr->LpRing->tail_mask - AVOID_SIZE) { \ + needed += RecPtr->LpRing->tail_mask + 1 - RecPtr->LpRing->tail; \ ErrorF("BEGIN_LP_RING: skipping last 64 bytes of " \ "ring (%d vs %d)\n", needed, (n) * 4); \ } \ - if (RecPtr->LpRing.space < needed) \ + if (RecPtr->LpRing->space < needed) \ WaitRingFunc(pScrn, needed, 0); \ - RecPtr->LpRing.space -= needed; \ - outring = RecPtr->LpRing.tail; \ - ringmask = RecPtr->LpRing.tail_mask; \ - virt = RecPtr->LpRing.virtual_start; \ + RecPtr->LpRing->space -= needed; \ + outring = RecPtr->LpRing->tail; \ + ringmask = RecPtr->LpRing->tail_mask; \ + virt = RecPtr->LpRing->virtual_start; \ while (needed > (n) * 4) { \ ErrorF("BEGIN_LP_RING: putting MI_NOOP at 0x%x (remaining %d)\n", \ outring, needed - (n) * 4); \ @@ -212,12 +212,12 @@ extern void I830DPRINTF_stub(const char *filename, int line, if ((n) > 2 && (I810_DEBUG&DEBUG_ALWAYS_SYNC)) \ DO_RING_IDLE(); \ needed = (n) * 4; \ - if (RecPtr->LpRing.space < needed) \ + if (RecPtr->LpRing->space < needed) \ WaitRingFunc(pScrn, needed, 0); \ - RecPtr->LpRing.space -= needed; \ - outring = RecPtr->LpRing.tail; \ - ringmask = RecPtr->LpRing.tail_mask; \ - virt = RecPtr->LpRing.virtual_start; \ + RecPtr->LpRing->space -= needed; \ + outring = RecPtr->LpRing->tail; \ + ringmask = RecPtr->LpRing->tail_mask; \ + virt = RecPtr->LpRing->virtual_start; \ if (I810_DEBUG & DEBUG_VERBOSE_RING) \ ErrorF( "BEGIN_LP_RING %d in %s\n", n, FUNCTION_NAME); @@ -257,10 +257,8 @@ extern void I830DPRINTF_stub(const char *filename, int line, * preprocessor symbol, and equal to zero. */ #if 1 -#ifndef I810_DEBUG #define I810_DEBUG 0 #endif -#endif #ifndef I810_DEBUG #warning "Debugging enabled - expect reduced performance" extern int I810_DEBUG; @@ -302,6 +300,11 @@ extern int I810_DEBUG; #define PCI_CHIP_I865_G_BRIDGE 0x2570 #endif +#ifndef PCI_CHIP_I915_G +#define PCI_CHIP_I915_G 0x2582 +#define PCI_CHIP_I915_G_BRIDGE 0x2580 +#endif + #define IS_I810(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I810 || \ pI810->PciInfo->chipType == PCI_CHIP_I810_DC100 || \ pI810->PciInfo->chipType == PCI_CHIP_I810_E) @@ -310,6 +313,7 @@ extern int I810_DEBUG; #define IS_845G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_845_G) #define IS_I85X(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I855_GM) #define IS_I865G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I865_G) +#define IS_I915G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_G) #define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810)) @@ -322,6 +326,7 @@ extern int I810_DEBUG; #define MIN_SCRATCH_BUFFER_SIZE KB(16) #define MAX_SCRATCH_BUFFER_SIZE KB(64) #define HWCURSOR_SIZE GTT_PAGE_SIZE +#define HWCURSOR_SIZE_ARGB GTT_PAGE_SIZE * 4 #define OVERLAY_SIZE GTT_PAGE_SIZE /* Use a 64x64 HW cursor */ |