summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-02-27 23:01:28 -0800
committerEric Anholt <eric@anholt.net>2009-03-06 13:26:10 -0800
commit917b20ead3cacf1e88314f20edde6a02b97b96d7 (patch)
treee7be80cd21940214d7f680516e0ee1ae864f18ab
parent73b7190421132ad73179c3fb7bb0e06c427dce5c (diff)
Remove StolenOnly support.
We rely on having AGPGART present to successfully allocate video memory as we configure it by default. Admit that fact, and remove support for non-AGPGART/KMS setups.
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_driver.c49
-rw-r--r--src/i830_memory.c8
3 files changed, 18 insertions, 41 deletions
diff --git a/src/i830.h b/src/i830.h
index 3d1a30a2..ffb2732d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -609,8 +609,6 @@ typedef struct _I830Rec {
Bool tv_present; /* TV connector present (from VBIOS) */
- Bool StolenOnly;
-
/* Driver phase/state information */
Bool preinit;
Bool starting;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index da560d87..908614ac 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1915,17 +1915,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
- /*
- * XXX If we knew the pre-initialised GTT format for certain, we could
- * probably figure out the physical address even in the StolenOnly case.
- */
- if (pI830->StolenOnly && pI830->CursorNeedsPhysical &&
- !pI830->SWCursor) {
- xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
- "HW Cursor disabled because it needs agpgart memory.\n");
- pI830->SWCursor = TRUE;
- }
-
if (pScrn->modes == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n");
PreInitCleanup(pScrn);
@@ -2874,25 +2863,19 @@ I830AdjustMemory(ScreenPtr pScreen)
/* Limit videoRam to how much we might be able to allocate from AGP */
sys_mem = I830CheckAvailableMemory(pScrn);
if (sys_mem == -1) {
- if (pScrn->videoRam > pI830->stolen_size / KB(1)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "/dev/agpgart is either not available, or no memory "
+ "is available\nfor allocation. Please enable agpgart\n.");
+ pScrn->videoRam = pI830->stolen_size / KB(1);
+ }
+ if (sys_mem + (pI830->stolen_size / 1024) < pScrn->videoRam) {
+ pScrn->videoRam = sys_mem + (pI830->stolen_size / 1024);
+ from = X_PROBED;
+ if (sys_mem + (pI830->stolen_size / 1024) <
+ pI830->pEnt->device->videoRam) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "/dev/agpgart is either not available, or no memory "
- "is available\nfor allocation. "
- "Using pre-allocated memory only.\n");
- pScrn->videoRam = pI830->stolen_size / KB(1);
- }
- pI830->StolenOnly = TRUE;
- } else {
- if (sys_mem + (pI830->stolen_size / 1024) < pScrn->videoRam) {
- pScrn->videoRam = sys_mem + (pI830->stolen_size / 1024);
- from = X_PROBED;
- if (sys_mem + (pI830->stolen_size / 1024) <
- pI830->pEnt->device->videoRam)
- {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "VideoRAM reduced to %d kByte "
- "(limited to available sysmem)\n", pScrn->videoRam);
- }
+ "VideoRAM reduced to %d kByte "
+ "(limited to available sysmem)\n", pScrn->videoRam);
}
}
@@ -3135,9 +3118,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
#ifdef I830_XV
pI830->XvEnabled = !pI830->XvDisabled;
if (pI830->XvEnabled) {
- if (pI830->accel == ACCEL_NONE || pI830->StolenOnly) {
+ if (pI830->accel == ACCEL_NONE) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
- "needs 2D accel and AGPGART.\n");
+ "needs 2D acceleration.\n");
pI830->XvEnabled = FALSE;
}
}
@@ -3179,9 +3162,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
* InitGLXVisuals call back.
*/
if (pI830->directRenderingType == DRI_XF86DRI) {
- if (pI830->accel == ACCEL_NONE || pI830->SWCursor || pI830->StolenOnly) {
+ if (pI830->accel == ACCEL_NONE || pI830->SWCursor) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "DRI is disabled because it "
- "needs HW cursor, 2D accel and AGPGART.\n");
+ "needs HW cursor and 2D accel.\n");
pI830->directRenderingType = DRI_NONE;
}
}
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 96f40083..0fd5d5b9 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1431,8 +1431,7 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
long size;
if (!pI830->use_drm_mode) {
- if (!pI830->StolenOnly &&
- (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex))) {
+ if (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"AGP GART support is either not available or cannot "
"be used.\n"
@@ -1970,7 +1969,7 @@ i830_bind_all_memory(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
- if (pI830->StolenOnly == TRUE || pI830->memory_list == NULL)
+ if (pI830->memory_list == NULL)
return TRUE;
if (pI830->use_drm_mode || (xf86AgpGARTSupported() &&
@@ -2010,9 +2009,6 @@ i830_unbind_all_memory(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
- if (pI830->StolenOnly == TRUE)
- return TRUE;
-
if (pI830->use_drm_mode || (xf86AgpGARTSupported() &&
pI830->gtt_acquired)) {
i830_memory *mem;