[Intel-gfx] [PATCH] Remove configured SW cursor support.
Eric Anholt
eric at anholt.net
Sat Feb 28 09:54:06 CET 2009
Any time we actually need SW cursors, it gets enabled automatically.
---
man/intel.man | 5 -----
src/i830.h | 1 -
src/i830_driver.c | 37 +++++++++++--------------------------
src/i830_memory.c | 11 +++++------
4 files changed, 16 insertions(+), 38 deletions(-)
diff --git a/man/intel.man b/man/intel.man
index c7a3c61..4456833 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -59,11 +59,6 @@ are supported
.BI "Option \*qNoAccel\*q \*q" boolean \*q
Disable or enable acceleration. Default: acceleration is enabled.
.TP
-.BI "Option \*qSWCursor\*q \*q" boolean \*q
-Disable or enable software cursor. Default: software cursor is disable
-and a hardware cursor is used for configurations where the hardware cursor
-is available.
-.TP
.BI "Option \*qColorKey\*q \*q" integer \*q
This sets the default pixel value for the YUV video overlay key.
Default: undefined.
diff --git a/src/i830.h b/src/i830.h
index ffb2732..2408ea9 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -497,7 +497,6 @@ typedef struct _I830Rec {
Bool fence_used[FENCE_NEW_NR];
accel_method_t accel;
- Bool SWCursor;
#ifdef I830_USE_XAA
XAAInfoRecPtr AccelInfoRec;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 472e189..19af695 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -302,7 +302,6 @@ static PciChipsets I830PciChipsets[] = {
typedef enum {
OPTION_ACCELMETHOD,
OPTION_NOACCEL,
- OPTION_SW_CURSOR,
OPTION_CACHE_LINES,
OPTION_DRI,
OPTION_PAGEFLIP,
@@ -327,7 +326,6 @@ typedef enum {
static OptionInfoRec I830Options[] = {
{OPTION_ACCELMETHOD, "AccelMethod", OPTV_ANYSTR, {0}, FALSE},
{OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE},
- {OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_CACHE_LINES, "CacheLines", OPTV_INTEGER, {0}, FALSE},
{OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, TRUE},
{OPTION_XVIDEO, "XVideo", OPTV_BOOLEAN, {0}, TRUE},
@@ -1505,6 +1503,10 @@ I830LoadSyms(ScrnInfoPtr pScrn)
return FALSE;
xf86LoaderReqSymLists(I810vgahwSymbols, NULL);
+ if (!xf86LoadSubModule(pScrn, "ramdac"))
+ return FALSE;
+ xf86LoaderReqSymLists(I810ramdacSymbols, NULL);
+
return TRUE;
}
@@ -1624,10 +1626,6 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
accel_name[pI830->accel]);
}
- if (xf86ReturnOptValBool(pI830->Options, OPTION_SW_CURSOR, FALSE)) {
- pI830->SWCursor = TRUE;
- }
-
pI830->directRenderingType = DRI_NONE;
if (!xf86ReturnOptValBool(pI830->Options, OPTION_DRI, TRUE))
pI830->directRenderingType = DRI_DISABLED;
@@ -1976,13 +1974,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
default:
break;
}
- if (!pI830->SWCursor) {
- if (!xf86LoadSubModule(pScrn, "ramdac")) {
- PreInitCleanup(pScrn);
- return FALSE;
- }
- xf86LoaderReqSymLists(I810ramdacSymbols, NULL);
- }
if (!pI830->use_drm_mode) {
i830CompareRegsToSnapshot(pScrn, "After PreInit");
@@ -3034,8 +3025,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* If DRI hasn't been explicitly disabled, try to initialize it.
* It will be used by the memory allocator.
*/
- if (pI830->directRenderingType == DRI_NONE && pI830->SWCursor)
- pI830->directRenderingType = DRI_DISABLED;
if (!pI830->can_resize && pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
pI830->directRenderingType = DRI_XF86DRI;
@@ -3164,9 +3153,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) {
+ if (pI830->accel == ACCEL_NONE) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "DRI is disabled because it "
- "needs HW cursor and 2D accel.\n");
+ "needs 2D acceleration.\n");
pI830->directRenderingType = DRI_NONE;
}
}
@@ -3259,13 +3248,10 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86SetSilkenMouse(pScreen);
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
- if (!pI830->SWCursor) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing HW Cursor\n");
- if (!I830CursorInit(pScreen))
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Hardware cursor initialization failed\n");
- } else
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing SW Cursor!\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing HW Cursor\n");
+ if (!I830CursorInit(pScreen))
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Hardware cursor initialization failed\n");
#ifdef XF86DRI
/* Must be called before EnterVT, so we can acquire the DRI lock when
@@ -3557,8 +3543,7 @@ I830EnterVT(int scrnIndex, int flags)
i830_stop_ring(pScrn, FALSE);
i830_start_ring(pScrn);
}
- if (!pI830->SWCursor)
- I830InitHWCursor(pScrn);
+ I830InitHWCursor(pScrn);
/* Tell the BIOS that we're in control of mode setting now. */
i830_init_bios_control(pScrn);
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 0fd5d5b..84262af 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1448,11 +1448,10 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
i830_setup_fb_compression(pScrn);
/* Next, allocate other fixed-size allocations we have. */
- if (!pI830->SWCursor && !i830_allocate_cursor_buffers(pScrn)) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Disabling HW cursor because the cursor memory "
- "allocation failed.\n");
- pI830->SWCursor = TRUE;
+ if (!i830_allocate_cursor_buffers(pScrn)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to allocate HW cursor space.\n");
+ return FALSE;
}
if (pI830->memory_manager == NULL) {
@@ -1997,7 +1996,7 @@ i830_bind_all_memory(ScrnInfoPtr pScrn)
FatalError("Couldn't bind memory for BO %s\n", mem->name);
}
}
- if (!pI830->SWCursor && !pI830->use_drm_mode)
+ if (!pI830->use_drm_mode)
i830_update_cursor_offsets(pScrn);
return TRUE;
--
1.5.6.5
More information about the Intel-gfx
mailing list