diff options
-rw-r--r-- | man/radeon.man | 11 | ||||
-rw-r--r-- | src/radeon.h | 4 | ||||
-rw-r--r-- | src/radeon_exa.c | 4 | ||||
-rw-r--r-- | src/radeon_kms.c | 24 |
4 files changed, 19 insertions, 24 deletions
diff --git a/man/radeon.man b/man/radeon.man index 5f6d9fb0..0ea866fe 100644 --- a/man/radeon.man +++ b/man/radeon.man @@ -607,14 +607,13 @@ This option enables modesetting on R/RV4xx chips using atombios. The default is .B off. .TP -.BI "Option \*qEXALowVRAM\*q \*q" integer \*q +.BI "Option \*qEXAPixmaps\*q \*q" boolean \*q (KMS Only) Under kernel modesetting to avoid thrashing pixmaps in/out -of VRAM on low memory cards, we set a threshhold for the amount of VRAM -a GPU should have before we start using VRAM to accelerate pixmaps that -aren't required to be used by the GPU. Value is in MB. This shouldn't -really be changed apart from testing. +of VRAM on low memory cards, we use a heuristic based on VRAM amount, +to determine whether to allow EXA to use VRAM for non-essential pixmaps. +This option allows us to override the heurisitc. The default is -.B 32. +.B on with > 32MB VRAM, off with < 32MB. .SH TEXTURED VIDEO ATTRIBUTES The driver supports the following X11 Xv attributes for Textured Video. diff --git a/src/radeon.h b/src/radeon.h index 4ee37b51..71357b3b 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -173,7 +173,7 @@ typedef enum { OPTION_PCIAPER_SIZE, #ifdef USE_EXA OPTION_ACCEL_DFS, - OPTION_EXA_LOW_VRAM, + OPTION_EXA_PIXMAPS, #endif #endif OPTION_IGNORE_EDID, @@ -898,6 +898,7 @@ typedef struct { Bool accelOn; Bool useEXA; #ifdef USE_EXA + Bool exa_pixmaps; Bool exa_force_create; XF86ModReqInfo exaReq; #endif @@ -1009,7 +1010,6 @@ typedef struct { uint64_t vram_size; uint64_t gart_size; drmmode_rec drmmode; - int exa_low_vram_threshhold_mb; #else /* fake bool */ Bool cs; diff --git a/src/radeon_exa.c b/src/radeon_exa.c index b53f3182..bff6ec05 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -394,7 +394,7 @@ void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align) #ifdef EXA_MIXED_PIXMAPS if (info->accel_state->exa->flags & EXA_MIXED_PIXMAPS) { if (size != 0 && !info->exa_force_create && - info->vram_size <= (info->exa_low_vram_threshhold_mb*1024*1024)) + info->exa_pixmaps == FALSE) return NULL; } #endif @@ -433,7 +433,7 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, #ifdef EXA_MIXED_PIXMAPS if (info->accel_state->exa->flags & EXA_MIXED_PIXMAPS) { if (width != 0 && height != 0 && !info->exa_force_create && - info->vram_size <= (info->exa_low_vram_threshhold_mb*1024*1024)) + info->exa_pixmaps == FALSE) return NULL; } #endif diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 68a63458..9ee08f3f 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -67,7 +67,7 @@ const OptionInfoRec RADEONOptions_KMS[] = { { OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_TVSTD, "TVStandard", OPTV_STRING, {0}, FALSE }, { OPTION_EXA_VSYNC, "EXAVSync", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_EXA_LOW_VRAM, "EXALowVRAM", OPTV_INTEGER, {0}, FALSE }, + { OPTION_EXA_PIXMAPS, "EXAPixmaps", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -460,19 +460,15 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) } } - info->exa_low_vram_threshhold_mb = 32; - if (xf86GetOptValInteger(info->Options, OPTION_EXA_LOW_VRAM, - &(info->exa_low_vram_threshhold_mb))) { - if (info->exa_low_vram_threshhold_mb < 0 || - info->exa_low_vram_threshhold_mb > (info->vram_size * 1024 * 1024)) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Illegal Low VRAM limit selected %d, total %u\n", - info->exa_low_vram_threshhold_mb, - (unsigned int)(info->vram_size / (1024*1024))); - info->exa_low_vram_threshhold_mb = 32; - } - } - + info->exa_pixmaps = xf86ReturnOptValBool(info->Options, + OPTION_EXA_PIXMAPS, + (info->vram_size > (32 * 1024 * 1024))); + if (info->exa_pixmaps) + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "EXA: Driver will allow EXA pixmaps in VRAM\n"); + else + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "EXA: Driver will not allow EXA pixmaps in VRAM\n"); RADEONSetPitch(pScrn); /* Set display resolution */ |