Merge 92f5895a93 on remote branch

Change-Id: Ia5c185fdc200f7d96093dafc3f67215253caf906
This commit is contained in:
Linux Build Service Account
2023-04-30 18:27:23 -07:00
2 changed files with 12 additions and 1 deletions

View File

@@ -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<int>(sizeof(native_handle));
numInts = NumInts();

View File

@@ -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 */