summaryrefslogtreecommitdiff
path: root/gralloc
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2022-06-02 22:45:00 +0800
committeralk3pInjection <webmaster@raspii.tech>2022-06-02 22:45:00 +0800
commite9927ccb838cab876fed88c39cd491de68999907 (patch)
tree6f5a92db659d4bec0eacd22a642c05d4310f78b4 /gralloc
parentd2a2c64672eee75bd32267ccd96e00340d3051d1 (diff)
parente01cb1b6f38e36dde4de076d14174916ed709056 (diff)
Merge tag 'LA.QSSI.12.0.r1-07600-qssi.0' into sugisawa-mr1HEADsugisawa-mr1
"LA.QSSI.12.0.r1-07600-qssi.0" Change-Id: I6380d854cbc830ae7b45a03a322f699fed0d2376
Diffstat (limited to 'gralloc')
-rw-r--r--gralloc/QtiGrallocDefs.h1
-rw-r--r--gralloc/QtiGrallocPriv.h46
-rw-r--r--gralloc/gr_priv_handle.h46
3 files changed, 87 insertions, 6 deletions
diff --git a/gralloc/QtiGrallocDefs.h b/gralloc/QtiGrallocDefs.h
index d37f327e..8f8c59c4 100644
--- a/gralloc/QtiGrallocDefs.h
+++ b/gralloc/QtiGrallocDefs.h
@@ -138,6 +138,7 @@
// UBWC aligned Venus format
#define HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC 0x7FA30C06
+#define HAL_PIXEL_FORMAT_YCbCr_420_SP_4R_UBWC 0x7FA30C07
#define HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC 0x7FA30C09
// Khronos ASTC formats
diff --git a/gralloc/QtiGrallocPriv.h b/gralloc/QtiGrallocPriv.h
index 9d04903b..3c9bbaec 100644
--- a/gralloc/QtiGrallocPriv.h
+++ b/gralloc/QtiGrallocPriv.h
@@ -27,6 +27,43 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+* Changes from Qualcomm Innovation Center are provided under the following license:
+*
+* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted (subject to the limitations in the
+* disclaimer below) provided that the following conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided
+* with the distribution.
+*
+* * Neither the name of Qualcomm Innovation Center, Inc. nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#ifndef __QTIGRALLOCPRIV_H__
#define __QTIGRALLOCPRIV_H__
@@ -131,6 +168,7 @@ struct private_handle_t : public native_handle_t {
uint64_t base;
uint64_t base_metadata;
uint64_t gpuaddr;
+ unsigned int reserved_size;
static const int kNumFds = 2;
static const int kMagic = 'gmsm';
@@ -158,7 +196,8 @@ struct private_handle_t : public native_handle_t {
offset_metadata(0),
base(0),
base_metadata(0),
- gpuaddr(0) {
+ gpuaddr(0),
+ reserved_size(0) {
version = static_cast<int>(sizeof(native_handle));
numInts = NumInts();
numFds = kNumFds;
@@ -192,9 +231,10 @@ struct private_handle_t : public native_handle_t {
static void Dump(const private_handle_t *hnd) {
ALOGD("handle id:%" PRIu64
" wxh:%dx%d uwxuh:%dx%d size: %d fd:%d fd_meta:%d flags:0x%x "
- "usage:0x%" PRIx64 " format:0x%x layer_count: %d",
+ "usage:0x%" PRIx64 " format:0x%x layer_count: %d reserved_size = %d",
hnd->id, hnd->width, hnd->height, hnd->unaligned_width, hnd->unaligned_height, hnd->size,
- hnd->fd, hnd->fd_metadata, hnd->flags, hnd->usage, hnd->format, hnd->layer_count);
+ hnd->fd, hnd->fd_metadata, hnd->flags, hnd->usage, hnd->format, hnd->layer_count,
+ hnd->reserved_size);
}
};
#pragma pack(pop)
diff --git a/gralloc/gr_priv_handle.h b/gralloc/gr_priv_handle.h
index 98f9f694..a53fdf59 100644
--- a/gralloc/gr_priv_handle.h
+++ b/gralloc/gr_priv_handle.h
@@ -17,6 +17,43 @@
* limitations under the License.
*/
+/*
+* Changes from Qualcomm Innovation Center are provided under the following license:
+*
+* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted (subject to the limitations in the
+* disclaimer below) provided that the following conditions are met:
+*
+* * Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* * Redistributions in binary form must reproduce the above
+* copyright notice, this list of conditions and the following
+* disclaimer in the documentation and/or other materials provided
+* with the distribution.
+*
+* * Neither the name of Qualcomm Innovation Center, Inc. nor the
+* names of its contributors may be used to endorse or promote
+* products derived from this software without specific prior
+* written permission.
+*
+* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
#ifndef __GR_PRIV_HANDLE_H__
#define __GR_PRIV_HANDLE_H__
@@ -92,6 +129,7 @@ struct private_handle_t {
uint64_t base;
uint64_t base_metadata;
uint64_t gpuaddr;
+ unsigned int reserved_size;
#ifdef __cplusplus
static const int kNumFds = 2;
static const int kMagic = 'gmsm';
@@ -120,7 +158,8 @@ struct private_handle_t {
offset_metadata(0),
base(0),
base_metadata(0),
- gpuaddr(0) {
+ gpuaddr(0),
+ reserved_size(0) {
version = static_cast<int>(sizeof(native_handle));
numInts = NumInts();
numFds = kNumFds;
@@ -161,9 +200,10 @@ struct private_handle_t {
static void Dump(const private_handle_t *hnd) {
ALOGD("handle id:%" PRIu64
" wxh:%dx%d uwxuh:%dx%d size: %d fd:%d fd_meta:%d flags:0x%x "
- "usage:0x%" PRIx64 " format:0x%x layer_count: %d",
+ "usage:0x%" PRIx64 " format:0x%x layer_count: %d reserved_size = %d",
hnd->id, hnd->width, hnd->height, hnd->unaligned_width, hnd->unaligned_height, hnd->size,
- hnd->fd, hnd->fd_metadata, hnd->flags, hnd->usage, hnd->format, hnd->layer_count);
+ hnd->fd, hnd->fd_metadata, hnd->flags, hnd->usage, hnd->format, hnd->layer_count,
+ hnd->reserved_size);
}
int GetUnalignedWidth() const { return unaligned_width; }