summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2014-03-20 17:57:38 +0000
committerRussell King <rmk@arm.linux.org.uk>2014-03-20 17:57:38 +0000
commit4f62e0956893fe43594ba516a152a6c03a555dfe (patch)
tree27e00c0ae878f320cf57f00a80f3e2b5ab250096
parent1f95c81c467069fe3f2f0d4174228dc50dd8f7f4 (diff)
downloadxf86-video-armada-4f62e0956893fe43594ba516a152a6c03a555dfe.tar.gz
Move owner checking into vivante_map_gpu()
Move the pixmap owner checking into vivante_map_gpu(), which is where the ownership is switched. This helps to keep all that logic localised. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--src/vivante_accel.c2
-rw-r--r--src/vivante_utils.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/vivante_accel.c b/src/vivante_accel.c
index 9999d72..1afbda4 100644
--- a/src/vivante_accel.c
+++ b/src/vivante_accel.c
@@ -304,7 +304,7 @@ gal_prepare_gpu(struct vivante *vivante, struct vivante_pixmap *vPix,
vivante_batch_wait(vivante, vPix);
#endif
- if (vPix->owner != GPU && !vivante_map_gpu(vivante, vPix))
+ if (!vivante_map_gpu(vivante, vPix))
return FALSE;
/*
diff --git a/src/vivante_utils.c b/src/vivante_utils.c
index 0a42a35..bae3221 100644
--- a/src/vivante_utils.c
+++ b/src/vivante_utils.c
@@ -165,6 +165,9 @@ Bool vivante_map_gpu(struct vivante *vivante, struct vivante_pixmap *vPix)
assert(vPix->in_use == 0);
#endif
+ if (vPix->owner == GPU)
+ return TRUE;
+
if (bo->type == DRM_ARMADA_BO_SHMEM) {
gceSTATUS err;
gctUINT32 addr;