xf86-video-ati: Branch 'master' - 8 commits
Michel Dänzer
michel at daenzer.net
Mon Sep 3 01:36:47 PDT 2012
On Son, 2012-09-02 at 20:10 -0700, Dave Airlie wrote:
>
> commit ca8b61e916998458203dfa4b9d0c997fa7d90ba9
> Author: Dave Airlie <airlied at redhat.com>
> Date: Mon Sep 3 13:08:37 2012 +1000
>
> radeon: allocated shared pixmaps as untiled gtt.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
> diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c
> index ccdf7eb..593c690 100644
> --- a/src/radeon_bo_helper.c
> +++ b/src/radeon_bo_helper.c
> @@ -73,7 +73,7 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth,
> uint32_t tiling = 0;
> struct radeon_surface surface;
> struct radeon_bo *bo;
> -
> + int domain = RADEON_GEM_DOMAIN_VRAM;
> if (usage_hint) {
> if (info->allowColorTiling) {
> if (usage_hint & RADEON_CREATE_PIXMAP_TILING_MACRO)
> @@ -84,6 +84,12 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth,
> if (usage_hint & RADEON_CREATE_PIXMAP_DEPTH)
> tiling |= RADEON_TILING_MACRO | RADEON_TILING_MICRO;
>
> +#ifdef CREATE_PIXMAP_USAGE_SHARED
> + if ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED) {
> + tiling = 0;
> + domain = RADEON_GEM_DOMAIN_GTT;
> + }
> +#endif
> }
>
> /* Small pixmaps must not be macrotiled on R300, hw cannot sample them
> @@ -166,7 +172,7 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth,
> }
>
> bo = radeon_bo_open(info->bufmgr, 0, size, base_align,
> - RADEON_GEM_DOMAIN_VRAM, 0);
> + domain, 0);
>
> if (bo && tiling && radeon_bo_set_tiling(bo, tiling, pitch) == 0)
> *new_tiling = tiling;
I think you also need to prevent the acceleration code from using
RADEON_GEM_DOMAIN_VRAM when these are used for the destination, or they
will be migrated into VRAM anyway?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg-driver-ati
mailing list