diff options
author | Russell King <rmk@arm.linux.org.uk> | 2014-07-23 11:31:20 +0100 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2014-07-23 11:33:22 +0100 |
commit | dfdbdf253c2893050551b88fecd6ec6cef6015d5 (patch) | |
tree | 7d3e2f27a7dd1e9972e9b1dd115bfebe1642e7dd /src | |
parent | fbbbe515431f253e1790bc5c8c6dfe44c6a07165 (diff) |
Fix bug in vivante pixmap dumping functions
The vivante pixmap functions we not restoring the mapping state of the
pixmap correctly. Fix this.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/vivante_utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vivante_utils.c b/src/vivante_utils.c index a53459a..0567c61 100644 --- a/src/vivante_utils.c +++ b/src/vivante_utils.c @@ -307,11 +307,17 @@ static void dump_pix(struct vivante *vivante, struct vivante_pixmap *vPix, { struct drm_armada_bo *bo = vPix->bo; static int idx; + unsigned owner = vPix->owner; char fn[160], n[80]; int fd; - if (vPix->bo->type == DRM_ARMADA_BO_SHMEM && vPix->owner == GPU) + if (vPix->bo->type != DRM_ARMADA_BO_SHMEM) + owner = CPU; + + if (owner == GPU) { vivante_unmap_gpu(vivante, vPix); + vPix->owner = CPU; + } vsprintf(n, fmt, ap); sprintf(fn, "/tmp/X.%04u.%s-%u.%u.%u.%u.pam", @@ -345,7 +351,7 @@ static void dump_pix(struct vivante *vivante, struct vivante_pixmap *vPix, close(fd); } - if (vPix->owner == GPU && vPix->bo->type == DRM_ARMADA_BO_SHMEM) + if (owner == GPU) vivante_map_gpu(vivante, vPix); } |