drm_hwcomposer: Remove hardcoded PAGE_SIZE usage in gralloc_helper
Use getpagesize() to make drm_hwcomposer work with multiple page sizes. This benefits Android as AOSP no longer relies on bionic's PAGE_SIZE macro. Change-Id: I9af7436ac9ca6c052f67cdd296a960b51b8ba67a Signed-off-by: Vilas Bhat <vilasbhat@google.com>
This commit is contained in:
parent
ffe783c849
commit
407362538c
1 changed files with 2 additions and 1 deletions
|
|
@ -47,7 +47,8 @@
|
|||
|
||||
static inline size_t round_up_to_page_size(size_t x)
|
||||
{
|
||||
return (x + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
|
||||
const size_t page_size = getpagesize();
|
||||
return (x + (page_size - 1)) & ~(page_size - 1);
|
||||
}
|
||||
|
||||
#endif /* GRALLOC_HELPER_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue