aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2009-08-24 00:57:05 +0300
committerPauli Nieminen <[email protected]>2009-08-24 00:57:05 +0300
commit7bb0f880dbdee0c57693c3a1f331d7c0894e71e1 (patch)
treec46a42d33501c1a9d56596981f50ce98746aa040 /src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
parenteffda2e2a7f8ef7406d698c6b31dbbff408ed112 (diff)
parent4484ce9c7b196a686a3928f7e29dc8d9b6f3cae3 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/radeon/radeon_cmdbuf.h
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_bo_legacy.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_legacy.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
index b1cc155f71a..a10c6b73abc 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
@@ -542,6 +542,18 @@ static int bo_unmap(struct radeon_bo *bo)
return 0;
}
+static int bo_is_busy(struct radeon_bo *bo, uint32_t *domain)
+{
+ *domain = 0;
+ if (bo->domains & RADEON_GEM_DOMAIN_GTT)
+ *domain = RADEON_GEM_DOMAIN_GTT;
+ else
+ *domain = RADEON_GEM_DOMAIN_CPU;
+ if (legacy_is_pending(bo))
+ return -EBUSY;
+ else
+ return 0;
+}
static int bo_is_static(struct radeon_bo *bo)
{
@@ -559,6 +571,7 @@ static struct radeon_bo_funcs bo_legacy_funcs = {
bo_is_static,
NULL,
NULL,
+ bo_is_busy
};
static int bo_vram_validate(struct radeon_bo *bo,