summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOwain G. Ainsworth <oga@openbsd.org>2009-01-13 17:09:00 +0000
committerKristian Høgsberg <krh@redhat.com>2009-01-20 12:11:01 -0500
commitc82adfd0169317efb6c2f9de0f315651f9adbae1 (patch)
treee87d36aeae818ad1d57158be11b48c3e35754fb5 /src
parentada44c1c0edcd3ea9e41ed6b6fdb2bf0e87c9c67 (diff)
Remove triple-buffering support
It never worked with any upstream linux kernel, and is quite heavily deprecated. A new solution based around DRI2 will probably be forthcoming. Pageflipping itself is next.
Diffstat (limited to 'src')
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_accel.c5
-rw-r--r--src/i830_dri.c32
-rw-r--r--src/i830_driver.c8
-rw-r--r--src/i830_memory.c11
-rw-r--r--src/i830_xaa.c6
6 files changed, 5 insertions, 59 deletions
diff --git a/src/i830.h b/src/i830.h
index fcf88843..10f7bf69 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -465,7 +465,6 @@ typedef struct _I830Rec {
#ifdef XF86DRI
i830_memory *back_buffer;
- i830_memory *third_buffer;
i830_memory *depth_buffer;
i830_memory *textures; /**< Compatibility texture memory */
i830_memory *memory_manager; /**< DRI memory manager aperture */
@@ -488,7 +487,6 @@ typedef struct _I830Rec {
Bool NeedRingBufferLow;
Bool allowPageFlip;
- Bool TripleBuffer;
Bool tiling;
Bool fb_compression;
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 5ee53bb1..9155c927 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -255,11 +255,6 @@ I830SelectBuffer(ScrnInfoPtr pScrn, int buffer)
if (pI830->back_buffer->tiling == TILE_YMAJOR)
return FALSE;
break;
- case I830_SELECT_THIRD:
- pI830->bufferOffset = pI830->third_buffer->offset;
- if (pI830->third_buffer->tiling == TILE_YMAJOR)
- return FALSE;
- break;
case I830_SELECT_DEPTH:
pI830->bufferOffset = pI830->depth_buffer->offset;
if (pI830->depth_buffer->tiling == TILE_YMAJOR)
diff --git a/src/i830_dri.c b/src/i830_dri.c
index c4440ce8..98df2acc 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -848,7 +848,6 @@ I830DRIDoMappings(ScreenPtr pScreen)
/* init to zero to be safe */
sarea->front_handle = 0;
sarea->back_handle = 0;
- sarea->third_handle = 0;
sarea->depth_handle = 0;
sarea->tex_handle = 0;
@@ -1079,10 +1078,6 @@ I830DRIRefreshArea (ScrnInfoPtr pScrn, int num, BoxPtr pbox)
I830DRIDoRefreshArea(pScrn, num, pbox, pI830->back_buffer->offset);
- if (pI830->third_buffer) {
- I830DRIDoRefreshArea(pScrn, num, pbox, pI830->third_buffer->offset);
- }
-
DamageEmpty(pI830->pDamage);
}
#endif
@@ -1169,14 +1164,14 @@ I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
if (sPriv->pf_current_page & (0x3 << 2)) {
sPriv->pf_current_page = sPriv->pf_current_page & 0x3;
- sPriv->pf_current_page |= (sPriv->third_handle ? 2 : 1) << 2;
+ sPriv->pf_current_page |= 1 << 2;
flip.pipes |= 0x2;
}
if (sPriv->pf_current_page & 0x3) {
sPriv->pf_current_page = sPriv->pf_current_page & (0x3 << 2);
- sPriv->pf_current_page |= sPriv->third_handle ? 2 : 1;
+ sPriv->pf_current_page |= 1;
flip.pipes |= 0x1;
}
@@ -1208,8 +1203,6 @@ I830DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 index)
first_buffer = I830_SELECT_BACK;
last_buffer = I830_SELECT_DEPTH;
- if (I830PTR(pScrn)->third_buffer)
- last_buffer = I830_SELECT_THIRD;
for (buffer = first_buffer; buffer <= last_buffer; buffer++) {
pbox = REGION_RECTS(prgn);
@@ -1358,8 +1351,6 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
I830EmitFlush(pScrn);
first_buffer = I830_SELECT_BACK;
last_buffer = I830_SELECT_DEPTH;
- if (pI830->third_buffer)
- last_buffer = I830_SELECT_THIRD;
for (buffer = first_buffer; buffer <= last_buffer; buffer++) {
if (!I830SelectBuffer(pScrn, buffer))
@@ -1591,10 +1582,6 @@ i830_update_sarea(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
sarea->front_tiled = (pI830->front_buffer->tiling != TILE_NONE);
sarea->back_tiled = (pI830->back_buffer->tiling != TILE_NONE);
- if (pI830->third_buffer != NULL)
- sarea->third_tiled = (pI830->third_buffer->tiling != TILE_NONE);
- else
- sarea->third_tiled = FALSE;
sarea->depth_tiled = (pI830->depth_buffer->tiling != TILE_NONE);
sarea->rotated_tiled = FALSE;
@@ -1602,7 +1589,6 @@ i830_update_sarea(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
sarea->front_bo_handle = i830_name_buffer (pScrn, pI830->front_buffer);
sarea->back_bo_handle = i830_name_buffer (pScrn, pI830->back_buffer);
- sarea->third_bo_handle = i830_name_buffer (pScrn, pI830->third_buffer);
sarea->depth_bo_handle = i830_name_buffer (pScrn, pI830->depth_buffer);
/* The rotation is now handled entirely by the X Server, so just leave the
@@ -1695,17 +1681,9 @@ i830_update_dri_mappings(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
return FALSE;
}
- if (pI830->third_buffer) {
- if (!i830_do_addmap(pScrn, pI830->third_buffer, &sarea->third_handle,
- &sarea->third_size, &sarea->third_offset)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling DRI.\n");
- return FALSE;
- }
- } else {
- sarea->third_handle = 0;
- sarea->third_offset = 0;
- sarea->third_size = 0;
- }
+ sarea->third_handle = 0;
+ sarea->third_offset = 0;
+ sarea->third_size = 0;
if (!i830_do_addmap(pScrn, pI830->depth_buffer, &sarea->depth_handle,
&sarea->depth_size, &sarea->depth_offset)) {
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 411d79c5..b5e77c75 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -336,7 +336,6 @@ static OptionInfoRec I830Options[] = {
{OPTION_LEGACY3D, "Legacy3D", OPTV_BOOLEAN, {0}, FALSE},
#endif
{OPTION_LVDSFIXEDMODE, "LVDSFixedMode", OPTV_BOOLEAN, {0}, FALSE},
- {OPTION_TRIPLEBUFFER, "TripleBuffer", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_FORCEENABLEPIPEA, "ForceEnablePipeA", OPTV_BOOLEAN, {0}, FALSE},
#ifdef INTEL_XVMC
{OPTION_XVMC, "XvMC", OPTV_BOOLEAN, {0}, TRUE},
@@ -1810,13 +1809,6 @@ I830DriOptsInit(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, from, "Will%s try to enable page flipping\n",
pI830->allowPageFlip ? "" : " not");
- pI830->TripleBuffer = FALSE;
- from = (pI830->directRenderingType != DRI_DISABLED &&
- xf86GetOptValBool(pI830->Options, OPTION_TRIPLEBUFFER,
- &pI830->TripleBuffer)) ? X_CONFIG : X_DEFAULT;
-
- xf86DrvMsg(pScrn->scrnIndex, from, "Triple buffering %sabled\n",
- pI830->TripleBuffer ? "en" : "dis");
#endif /* XF86DRI */
}
diff --git a/src/i830_memory.c b/src/i830_memory.c
index b6d80263..ab4e5ce2 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -351,7 +351,6 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
pI830->power_context = NULL;
#ifdef XF86DRI
pI830->back_buffer = NULL;
- pI830->third_buffer = NULL;
pI830->depth_buffer = NULL;
pI830->textures = NULL;
#endif
@@ -367,8 +366,6 @@ i830_free_3d_memory(ScrnInfoPtr pScrn)
#ifdef XF86DRI
i830_free_memory(pScrn, pI830->back_buffer);
pI830->back_buffer = NULL;
- i830_free_memory(pScrn, pI830->third_buffer);
- pI830->third_buffer = NULL;
i830_free_memory(pScrn, pI830->depth_buffer);
pI830->depth_buffer = NULL;
i830_free_memory(pScrn, pI830->textures);
@@ -1753,14 +1750,6 @@ i830_allocate_3d_memory(ScrnInfoPtr pScrn)
if (!i830_allocate_backbuffer(pScrn, &pI830->back_buffer, "back buffer"))
return FALSE;
- if (pI830->TripleBuffer && !i830_allocate_backbuffer(pScrn,
- &pI830->third_buffer,
- "third buffer")) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Failed to allocate third buffer, triple buffering "
- "inactive\n");
- }
-
if (!i830_allocate_depthbuffer(pScrn))
return FALSE;
diff --git a/src/i830_xaa.c b/src/i830_xaa.c
index e5e849d2..76849788 100644
--- a/src/i830_xaa.c
+++ b/src/i830_xaa.c
@@ -292,12 +292,6 @@ I830CheckTiling(ScrnInfoPtr pScrn)
{
return TRUE;
}
- if (pI830->third_buffer != NULL &&
- pI830->bufferOffset == pI830->third_buffer->offset &&
- pI830->third_buffer->tiling != TILE_NONE)
- {
- return TRUE;
- }
#endif
return FALSE;