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_dri2.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_dri2.c')
-rw-r--r-- | src/radeon_dri2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index db46d27a..56c00a32 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -65,6 +65,8 @@ radeon_dri2_create_buffers(DrawablePtr drawable, int count) { ScreenPtr pScreen = drawable->pScreen; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); BufferPtr buffers; struct dri2_buffer_priv *privates; PixmapPtr pixmap, depth_pixmap; @@ -120,7 +122,9 @@ radeon_dri2_create_buffers(DrawablePtr drawable, if (attachments[i] == DRI2BufferDepth) { depth_pixmap = pixmap; } + info->exa_force_create = TRUE; exaMoveInPixmap(pixmap); + info->exa_force_create = FALSE; driver_priv = exaGetPixmapDriverPrivate(pixmap); r = radeon_gem_get_kernel_name(driver_priv->bo, &buffers[i].name); if (r) @@ -143,6 +147,8 @@ radeon_dri2_create_buffer(DrawablePtr drawable, unsigned int format) { ScreenPtr pScreen = drawable->pScreen; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + RADEONInfoPtr info = RADEONPTR(pScrn); BufferPtr buffers; struct dri2_buffer_priv *privates; PixmapPtr pixmap, depth_pixmap; @@ -198,7 +204,9 @@ radeon_dri2_create_buffer(DrawablePtr drawable, if (attachment == DRI2BufferDepth) { depth_pixmap = pixmap; } + info->exa_force_create = TRUE; exaMoveInPixmap(pixmap); + info->exa_force_create = FALSE; driver_priv = exaGetPixmapDriverPrivate(pixmap); r = radeon_gem_get_kernel_name(driver_priv->bo, &buffers->name); if (r) |