Othewise bo_unmap won't work. Also add a ifdef guard for PAGE_SIZE
to make it also compile under ARC++.
BUG=b:
70179880
TEST=Run /usr/local/autotest/bin/screenshot.py with qemu+virgl
TEST=Run Android App under ARC++ with qemu+virgl
Change-Id: I586446c56da091dd82d9bc9c1010d9b4ee4d92ee
Reviewed-on: https://chromium-review.googlesource.com/959527
Commit-Ready: Lepton Wu <lepton@chromium.org>
Tested-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
#include "util.h"
#include "virgl_hw.h"
+#ifndef PAGE_SIZE
#define PAGE_SIZE 0x1000
+#endif
#define PIPE_TEXTURE_2D 2
static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
return MAP_FAILED;
}
+ vma->length = bo->total_size;
return mmap(0, bo->total_size, drv_get_prot(map_flags), MAP_SHARED, bo->drv->fd,
gem_map.offset);
}