diff options
author | Dave Airlie <airlied@redhat.com> | 2009-11-20 12:15:02 +1000 |
---|---|---|
committer | Dave Airlie <airlied@itt42.(none)> | 2009-11-23 13:04:44 +1000 |
commit | e20af9c94982ec6487dae42c141d33cf6a7a2eb4 (patch) | |
tree | 6c933d03f4b0978751d5b6277f5ff3741f9035a3 /src/radeon_kms.c | |
parent | dd3eab848cf352bb96c3d01fe6028d8a4a8e451e (diff) |
radeon: avoid using hw pixmaps when we have little VRAM.
This patch returns NULL for pixmap creation when we are using
mixed pixmaps and the pixmap has a size.
The size check is necessary for the front buffer.
We add a flag to force pixmap creation for certain pixmaps
that need to be hw, like the DRI2 and Xv ones.
Idea from Michel and workarounds from Ben Skeggs.
v2: add Option "EXALowVRAM" to allow configuring this, value in MBs.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r-- | src/radeon_kms.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 5a4255f9..e624f86d 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -67,6 +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 }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -450,6 +451,20 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) (unsigned long long)mminfo.vram_visible); } } + + 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 %lld\n", + info->exa_low_vram_threshhold_mb, + info->vram_size / (1024*1024)); + info->exa_low_vram_threshhold_mb = 32; + } + } + RADEONSetPitch(pScrn); /* Set display resolution */ |