diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2017-10-04 08:16:42 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-05 21:24:42 -0700 |
commit | 14033e0013b5cc0ffc5af59dda7c377d46ec761d (patch) | |
tree | 258406d2122bc858bbf07eb20e90832c16b8198f | |
parent | cfb88767557632701252c1545d3c17905c6c0f83 (diff) |
minigbm: Revert "minigbm: flush buffer instead of unmapping"
It looks like munmap is probably necessary for i915 and serves
some important function. Let's revert until we can figure
out what's going on.
BUG=b:67073097
TEST=android.view.cts.SurfaceViewSyncTests#testVideoSurfaceViewCornerCoverage
This reverts commit 254dbb19c49fad4ab4f28b2d1f2982bd10bb7c0b.
Change-Id: Idac50930f9f13b4867110a31fadb1a2547d05d07
Reviewed-on: https://chromium-review.googlesource.com/699802
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
-rw-r--r-- | cros_gralloc/cros_gralloc_buffer.cc | 9 | ||||
-rw-r--r-- | gbm.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/cros_gralloc/cros_gralloc_buffer.cc b/cros_gralloc/cros_gralloc_buffer.cc index a78390f..f799129 100644 --- a/cros_gralloc/cros_gralloc_buffer.cc +++ b/cros_gralloc/cros_gralloc_buffer.cc @@ -87,9 +87,12 @@ int32_t cros_gralloc_buffer::unlock() return -EINVAL; } - --lockcount_; - if (lock_data_[0]) - return drv_bo_flush(bo_, lock_data_[0]); + if (!--lockcount_) { + if (lock_data_[0]) { + drv_bo_unmap(bo_, lock_data_[0]); + lock_data_[0] = nullptr; + } + } return 0; } @@ -239,7 +239,7 @@ PUBLIC void *gbm_bo_map(struct gbm_bo *bo, uint32_t x, uint32_t y, uint32_t widt PUBLIC void gbm_bo_unmap(struct gbm_bo *bo, void *map_data) { assert(bo); - drv_bo_flush(bo->bo, map_data); + drv_bo_unmap(bo->bo, map_data); } PUBLIC uint32_t gbm_bo_get_width(struct gbm_bo *bo) |