summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2014-01-15 11:04:05 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2014-01-15 11:11:55 +0100
commit8da981712f62050076cff53e1b40ed1e307fcca8 (patch)
treea66d0ded5562b52969728d33d2b049f6946d1c6a
parent31bff9f7f3d9a68fd1449532e8ab50065de63857 (diff)
vmware/vmwgfx: Always allocate shared hardware surfaces.
Hardware surfaces are all likely to be shared at some point, and we *really* don't want to change a hardware surface that is bound as a drm framebuffer. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
-rw-r--r--vmwgfx/vmwgfx_saa.c2
-rw-r--r--vmwgfx/vmwgfx_xa_surface.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index 8c97618..b56b05f 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -811,7 +811,7 @@ vmwgfx_create_hw(struct vmwgfx_saa *vsaa,
return TRUE;
new_flags = (vpix->xa_flags & ~vpix->staging_remove_flags) |
- vpix->staging_add_flags;
+ vpix->staging_add_flags | XA_FLAG_SHARED;
hw = xa_surface_create(vsaa->xat,
pixmap->drawable.width,
diff --git a/vmwgfx/vmwgfx_xa_surface.c b/vmwgfx/vmwgfx_xa_surface.c
index 2f23c57..189bfdc 100644
--- a/vmwgfx/vmwgfx_xa_surface.c
+++ b/vmwgfx/vmwgfx_xa_surface.c
@@ -318,7 +318,7 @@ vmwgfx_hw_commit(PixmapPtr pixmap)
uint32_t new_flags;
new_flags = (vpix->xa_flags & ~vpix->staging_remove_flags) |
- vpix->staging_add_flags;
+ vpix->staging_add_flags | XA_FLAG_SHARED;
if (vpix->staging_format != xa_surface_format(vpix->hw))
LogMessage(X_INFO, "Changing hardware format.\n");