summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-08-14 09:12:36 +1000
committerDave Airlie <airlied@redhat.com>2008-08-14 09:12:36 +1000
commit18020e5e9647e218caf8f1566cdc053aac126f23 (patch)
tree68c848116c64533e9588a6a91303e3c6a4659552 /shared-core
parentd59f41b8cf0634a433be7d11f6b473035060c5e1 (diff)
radeon: make buffer swap for older drivers work again on GEM
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_drv.h1
-rw-r--r--shared-core/radeon_state.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h
index 138db794..aa5b4ba8 100644
--- a/shared-core/radeon_drv.h
+++ b/shared-core/radeon_drv.h
@@ -1664,6 +1664,7 @@ extern void radeon_master_destroy(struct drm_device *dev, struct drm_master *mas
extern void radeon_cp_dispatch_flip(struct drm_device * dev, struct drm_master *master);
extern int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *fpriv);
extern int radeon_cs_init(struct drm_device *dev);
+void radeon_gem_update_offsets(struct drm_device *dev, struct drm_master *master);
#define MARK_SAFE 1
#define MARK_CHECK_OFFSET 2
diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c
index 01ee71f6..1a828be8 100644
--- a/shared-core/radeon_state.c
+++ b/shared-core/radeon_state.c
@@ -2223,6 +2223,9 @@ static int radeon_cp_swap(struct drm_device *dev, void *data, struct drm_file *f
if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
+ if (dev_priv->mm.vram_offset)
+ radeon_gem_update_offsets(dev, file_priv->master);
+
radeon_cp_dispatch_swap(dev, file_priv->master);
sarea_priv->ctx_owner = 0;