diff --git a/gralloc/QtiGrallocPriv.h b/gralloc/QtiGrallocPriv.h index 2214291f..125777c5 100644 --- a/gralloc/QtiGrallocPriv.h +++ b/gralloc/QtiGrallocPriv.h @@ -180,6 +180,8 @@ struct private_handle_t : public native_handle_t { unsigned int custom_content_md_reserved_size; static const int kNumFds = 2; static const int kMagic = 'gmsm'; + unsigned int linear_size; + int ubwcp_format; static inline int NumInts() { return ((sizeof(private_handle_t) - sizeof(native_handle_t)) / sizeof(int)) - kNumFds; @@ -207,6 +209,8 @@ struct private_handle_t : public native_handle_t { base_metadata(0), gpuaddr(0), reserved_size(0), + linear_size(0), + ubwcp_format(format), custom_content_md_reserved_size(0) { version = static_cast(sizeof(native_handle)); numInts = NumInts(); diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h index 7d9019db..c0b64c2e 100644 --- a/gralloc/gralloc_priv.h +++ b/gralloc/gralloc_priv.h @@ -53,6 +53,13 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + #ifndef __GRALLOC_PRIV_H__ #define __GRALLOC_PRIV_H__ @@ -74,7 +81,7 @@ #define ROUND_UP_PAGESIZE(x) roundUpToPageSize(x) inline size_t roundUpToPageSize(size_t x) { - return (x + (getpagesize() - 1)) & ~(getpagesize() - 1); + return (x + (size_t(getpagesize()) - 1)) & ~(size_t(getpagesize()) - 1); } /* Legacy gralloc1 definitions */