display: Remove unused headers
These headers have moved to vendor/qcom/opensource/commonsys-intf
Change-Id: Idf6ee892b996bbc5050c178639b21ef459f4aaf9
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
index 2ae5778..22ac3c2 100644
--- a/gralloc/Android.mk
+++ b/gralloc/Android.mk
@@ -18,8 +18,6 @@
LOCAL_CLANG := true
LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) $(kernel_deps)
LOCAL_SRC_FILES := gr_device_impl.cpp
-LOCAL_COPY_HEADERS_TO := $(common_header_export_path)
-LOCAL_COPY_HEADERS := gr_device_impl.h gralloc_priv.h gr_priv_handle.h
include $(BUILD_SHARED_LIBRARY)
#libgrallocutils
diff --git a/gralloc/gr_priv_handle.h b/gralloc/gr_priv_handle.h
deleted file mode 100644
index 0968c5c..0000000
--- a/gralloc/gr_priv_handle.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
- * Not a Contribution
- *
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __GR_PRIV_HANDLE_H__
-#define __GR_PRIV_HANDLE_H__
-
-#include <log/log.h>
-#include <hardware/gralloc.h>
-#include <hardware/gralloc1.h>
-#ifdef __cplusplus
-#include <cinttypes>
-#endif
-
-#define GRALLOC1_FUNCTION_PERFORM 0x00001000
-
-#define DBG_HANDLE false
-
-typedef gralloc1_error_t (*GRALLOC1_PFN_PERFORM)(gralloc1_device_t *device, int operation, ...);
-
-#define PRIV_HANDLE_CONST(exp) static_cast<const private_handle_t *>(exp)
-
-#pragma pack(push, 4)
-#ifdef __cplusplus
-struct private_handle_t : public native_handle_t {
-#else
-struct private_handle_t {
- native_handle_t nativeHandle;
-#endif
- enum {
- PRIV_FLAGS_FRAMEBUFFER = 0x00000001,
- PRIV_FLAGS_USES_ION = 0x00000008,
- PRIV_FLAGS_NEEDS_FLUSH = 0x00000020,
- PRIV_FLAGS_INTERNAL_ONLY = 0x00000040,
- PRIV_FLAGS_NON_CPU_WRITER = 0x00000080,
- PRIV_FLAGS_CACHED = 0x00000200,
- PRIV_FLAGS_SECURE_BUFFER = 0x00000400,
- PRIV_FLAGS_EXTERNAL_ONLY = 0x00002000,
- PRIV_FLAGS_PROTECTED_BUFFER = 0x00004000,
- PRIV_FLAGS_VIDEO_ENCODER = 0x00010000,
- PRIV_FLAGS_CAMERA_WRITE = 0x00020000,
- PRIV_FLAGS_CAMERA_READ = 0x00040000,
- PRIV_FLAGS_HW_COMPOSER = 0x00080000,
- PRIV_FLAGS_HW_TEXTURE = 0x00100000,
- PRIV_FLAGS_ITU_R_601 = 0x00200000, // Unused from display
- PRIV_FLAGS_ITU_R_601_FR = 0x00400000, // Unused from display
- PRIV_FLAGS_ITU_R_709 = 0x00800000, // Unused from display
- PRIV_FLAGS_SECURE_DISPLAY = 0x01000000,
- PRIV_FLAGS_TILE_RENDERED = 0x02000000,
- PRIV_FLAGS_CPU_RENDERED = 0x04000000,
- PRIV_FLAGS_UBWC_ALIGNED = 0x08000000,
- PRIV_FLAGS_DISP_CONSUMER = 0x10000000,
- PRIV_FLAGS_CLIENT_ALLOCATED = 0x20000000, // Ion buffer allocated outside of gralloc
- PRIV_FLAGS_UBWC_ALIGNED_PI = 0x40000000, // PI format
- };
-
- // file-descriptors dup'd over IPC
- int fd;
- int fd_metadata;
-
- // values sent over IPC
- int magic;
- int flags;
- int width; // holds width of the actual buffer allocated
- int height; // holds height of the actual buffer allocated
- int unaligned_width; // holds width client asked to allocate
- int unaligned_height; // holds height client asked to allocate
- int format;
- int buffer_type;
- unsigned int layer_count;
- uint64_t id;
- uint64_t usage;
-
- unsigned int size;
- unsigned int offset;
- unsigned int offset_metadata;
- uint64_t base;
- uint64_t base_metadata;
- uint64_t gpuaddr;
-#ifdef __cplusplus
- static const int kNumFds = 2;
- static const int kMagic = 'gmsm';
-
- static inline int NumInts() {
- return ((sizeof(private_handle_t) - sizeof(native_handle_t)) / sizeof(int)) - kNumFds;
- }
-
- private_handle_t(int fd, int meta_fd, int flags, int width, int height, int uw, int uh,
- int format, int buf_type, unsigned int size, uint64_t usage = 0)
- : fd(fd),
- fd_metadata(meta_fd),
- magic(kMagic),
- flags(flags),
- width(width),
- height(height),
- unaligned_width(uw),
- unaligned_height(uh),
- format(format),
- buffer_type(buf_type),
- layer_count(1),
- id(0),
- usage(usage),
- size(size),
- offset(0),
- offset_metadata(0),
- base(0),
- base_metadata(0),
- gpuaddr(0) {
- version = static_cast<int>(sizeof(native_handle));
- numInts = NumInts();
- numFds = kNumFds;
- }
-
- // Legacy constructor used by some clients
- private_handle_t(int fd, unsigned int size, int usage, int buf_type, int format, int w, int h)
- : private_handle_t(fd, -1, PRIV_FLAGS_CLIENT_ALLOCATED, w, h, 0, 0, format, buf_type, size,
- static_cast<uint64_t>(usage)) {}
-
- ~private_handle_t() {
- magic = 0;
- ALOGE_IF(DBG_HANDLE, "Deleting buffer handle %p", this);
- }
-
- static int validate(const native_handle *h) {
- auto *hnd = static_cast<const private_handle_t *>(h);
- if (!h || h->version != sizeof(native_handle) || h->numInts != NumInts() ||
- h->numFds != kNumFds) {
- ALOGE("Invalid gralloc handle (at %p): ver(%d/%zu) ints(%d/%d) fds(%d/%d) ",
- h, h ? h->version : -1, sizeof(native_handle), h ? h->numInts : -1, NumInts(),
- h ? h->numFds : -1, kNumFds);
- return -EINVAL;
- }
- if (hnd->magic != kMagic) {
- ALOGE("magic(%c%c%c%c/%c%c%c%c)",
- hnd ? (((hnd->magic >> 24) & 0xFF) ? ((hnd->magic >> 24) & 0xFF) : '-') : '?',
- hnd ? (((hnd->magic >> 16) & 0xFF) ? ((hnd->magic >> 16) & 0xFF) : '-') : '?',
- hnd ? (((hnd->magic >> 8) & 0xFF) ? ((hnd->magic >> 8) & 0xFF) : '-') : '?',
- hnd ? (((hnd->magic >> 0) & 0xFF) ? ((hnd->magic >> 0) & 0xFF) : '-') : '?',
- (kMagic >> 24) & 0xFF, (kMagic >> 16) & 0xFF, (kMagic >> 8) & 0xFF, (kMagic >> 0) & 0xFF);
- return -EINVAL;
- }
-
- return 0;
- }
-
- 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",
- 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);
- }
-
- int GetUnalignedWidth() const { return unaligned_width; }
-
- int GetUnalignedHeight() const { return unaligned_height; }
-
- int GetColorFormat() const { return format; }
-
- unsigned int GetLayerCount() const { return layer_count; }
-
- int GetStride() const {
- // In handle we currently store aligned width after allocation.
- return width;
- }
-
- uint64_t GetUsage() const { return usage; }
-
- uint64_t GetBackingstore() const { return id; }
-#endif
-};
-#pragma pack(pop)
-
-#endif // __GR_PRIV_HANDLE_H__
diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h
deleted file mode 100644
index f9338d6..0000000
--- a/gralloc/gralloc_priv.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
- * Not a Contribution
- *
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __GRALLOC_PRIV_H__
-#define __GRALLOC_PRIV_H__
-
-#include <errno.h>
-#include <unistd.h>
-#include "gr_priv_handle.h"
-
-#define GRALLOC_PROP_PREFIX "vendor.gralloc."
-#define GRALLOC_PROP(prop_name) GRALLOC_PROP_PREFIX prop_name
-
-#define DISABLE_UBWC_PROP GRALLOC_PROP("disable_ubwc")
-#define DISABLE_AHARDWAREBUFFER_PROP GRALLOC_PROP("disable_ahardware_buffer")
-#define ENABLE_FB_UBWC_PROP GRALLOC_PROP("enable_fb_ubwc")
-#define MAP_FB_MEMORY_PROP GRALLOC_PROP("map_fb_memory")
-#define USE_SYSTEM_HEAP_FOR_SENSORS GRALLOC_PROP("use_system_heap_for_sensors")
-
-#define ROUND_UP_PAGESIZE(x) roundUpToPageSize(x)
-inline int roundUpToPageSize(int x) {
- return (x + (getpagesize() - 1)) & ~(getpagesize() - 1);
-}
-
-/* Gralloc usage bits indicating the type of allocation that should be used */
-/* Refer to BufferUsage in hardware/interfaces/graphics/common/<ver>/types.hal */
-
-/* The bits below are in officially defined vendor space
- * i.e bits 28-31 and 48-63*/
-/* Non linear, Universal Bandwidth Compression */
-#define GRALLOC_USAGE_PRIVATE_ALLOC_UBWC (UINT32_C(1) << 28)
-
-/* Set this for allocating uncached memory (using O_DSYNC),
- * cannot be used with noncontiguous heaps */
-#define GRALLOC_USAGE_PRIVATE_UNCACHED (UINT32_C(1) << 29)
-
-/* This flag is used to indicate 10 bit format.
- * When both GRALLOC_USAGE_PRIVATE_ALLOC_UBWC & GRALLOC_USAGE_PRIVATE_10BIT
- * are set then it will indicate UBWC_TP10 format.
- * When only GRALLOC_USAGE_PRIVATE_10BIT is set it will indicate linear P010 format.
- */
-#define GRALLOC_USAGE_PRIVATE_10BIT (UINT32_C(1) << 30)
-
-/* This flag is used for SECURE display usecase */
-#define GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY (UINT32_C(1) << 31)
-
-/* This flag is used to indicate video NV21 format */
-#define GRALLOC_USAGE_PRIVATE_VIDEO_NV21_ENCODER 1ULL << 48
-
-/* unused legacy flags */
-#define GRALLOC_USAGE_PRIVATE_MM_HEAP 0
-#define GRALLOC_USAGE_PRIVATE_IOMMU_HEAP 0
-
-/* TODO(user): move these to use sanctioned vendor bits
- * once end to end 64-bit support is available */
-/* This flag is set for WFD usecase */
-#define GRALLOC_USAGE_PRIVATE_WFD (UINT32_C(1) << 21)
-
-/* TODO(user): move these to use sanctioned vendor bits
- * once end to end 64-bit support is available */
-/* This flag is set for HEIF usecase */
-#define GRALLOC_USAGE_PRIVATE_HEIF (UINT32_C(1) << 27)
-
-/* TODO(user): Remove when clients stop referencing this flag */
-#define GRALLOC_USAGE_PRIVATE_10BIT_TP 0
-
-/* This flag indicates PI format is being used */
-#define GRALLOC_USAGE_PRIVATE_ALLOC_UBWC_PI 1ULL << 49
-
-/* This flag is set while CDSP accesses the buffer */
-#define GRALLOC_USAGE_PRIVATE_CDSP 1ULL << 50
-
-/* Legacy gralloc1 definitions */
-/* Some clients may still be using the old flags */
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_ADSP_HEAP GRALLOC_USAGE_PRIVATE_ADSP_HEAP
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_ALLOC_UBWC GRALLOC_USAGE_PRIVATE_ALLOC_UBWC
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_UNCACHED GRALLOC_USAGE_PRIVATE_UNCACHED
-#define GRALLOC1_CONSUMER_USAGE_PRIVATE_SECURE_DISPLAY GRALLOC_USAGE_PRIVATE_SECURE_DISPLAY
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_MM_HEAP GRALLOC_USAGE_PRIVATE_MM_HEAP
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_10BIT GRALLOC_USAGE_PRIVATE_10BIT
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_10BIT_TP GRALLOC_USAGE_PRIVATE_10BIT_TP
-#define GRALLOC1_CONSUMER_USAGE_PRIVATE_10BIT_TP GRALLOC_USAGE_PRIVATE_10BIT_TP
-#define GRALLOC1_PRODUCER_USAGE_PRIVATE_VIDEO_NV21_ENCODER GRALLOC_USAGE_PRIVATE_VIDEO_NV21_ENCODER
-
-// for PERFORM API :
-#define GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER 1
-#define GRALLOC_MODULE_PERFORM_GET_STRIDE 2
-#define GRALLOC_MODULE_PERFORM_GET_CUSTOM_STRIDE_FROM_HANDLE 3
-#define GRALLOC_MODULE_PERFORM_GET_CUSTOM_STRIDE_AND_HEIGHT_FROM_HANDLE 4
-#define GRALLOC_MODULE_PERFORM_GET_ATTRIBUTES 5
-#define GRALLOC_MODULE_PERFORM_GET_COLOR_SPACE_FROM_HANDLE 6
-#define GRALLOC_MODULE_PERFORM_GET_YUV_PLANE_INFO 7
-#define GRALLOC_MODULE_PERFORM_GET_MAP_SECURE_BUFFER_INFO 8
-#define GRALLOC_MODULE_PERFORM_GET_UBWC_FLAG 9
-#define GRALLOC_MODULE_PERFORM_GET_RGB_DATA_ADDRESS 10
-#define GRALLOC_MODULE_PERFORM_GET_IGC 11
-#define GRALLOC_MODULE_PERFORM_SET_IGC 12
-#define GRALLOC_MODULE_PERFORM_SET_SINGLE_BUFFER_MODE 13
-#define GRALLOC1_MODULE_PERFORM_GET_BUFFER_SIZE_AND_DIMENSIONS 14
-#define GRALLOC1_MODULE_PERFORM_GET_INTERLACE_FLAG 15
-#define GRALLOC_MODULE_PERFORM_GET_GRAPHICS_METADATA 16
-
-// OEM specific HAL formats
-#define HAL_PIXEL_FORMAT_RGBA_5551 6
-#define HAL_PIXEL_FORMAT_RGBA_4444 7
-#define HAL_PIXEL_FORMAT_NV12_ENCODEABLE 0x102
-#define HAL_PIXEL_FORMAT_NV21_ENCODEABLE 0x7FA30C00
-#define HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS 0x7FA30C04
-#define HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED 0x7FA30C03
-#define HAL_PIXEL_FORMAT_YCbCr_420_SP 0x109
-#define HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO 0x7FA30C01
-#define HAL_PIXEL_FORMAT_YCrCb_422_SP 0x10B
-#define HAL_PIXEL_FORMAT_R_8 0x10D
-#define HAL_PIXEL_FORMAT_RG_88 0x10E
-#define HAL_PIXEL_FORMAT_YCbCr_444_SP 0x10F
-#define HAL_PIXEL_FORMAT_YCrCb_444_SP 0x110
-#define HAL_PIXEL_FORMAT_YCrCb_422_I 0x111
-#define HAL_PIXEL_FORMAT_BGRX_8888 0x112
-#define HAL_PIXEL_FORMAT_NV21_ZSL 0x113
-#define HAL_PIXEL_FORMAT_YCrCb_420_SP_VENUS 0x114
-#define HAL_PIXEL_FORMAT_BGR_565 0x115
-#define HAL_PIXEL_FORMAT_RAW8 0x123
-#define HAL_PIXEL_FORMAT_NV12_HEIF 0x116
-
-// 10 bit
-#define HAL_PIXEL_FORMAT_ARGB_2101010 0x117
-#define HAL_PIXEL_FORMAT_RGBX_1010102 0x118
-#define HAL_PIXEL_FORMAT_XRGB_2101010 0x119
-#define HAL_PIXEL_FORMAT_BGRA_1010102 0x11A
-#define HAL_PIXEL_FORMAT_ABGR_2101010 0x11B
-#define HAL_PIXEL_FORMAT_BGRX_1010102 0x11C
-#define HAL_PIXEL_FORMAT_XBGR_2101010 0x11D
-#define HAL_PIXEL_FORMAT_YCbCr_420_P010 0x11F
-#define HAL_PIXEL_FORMAT_YCbCr_420_P010_UBWC 0x124
-#define HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS 0x7FA30C0A
-
-#define HAL_PIXEL_FORMAT_CbYCrY_422_I 0x120
-#define HAL_PIXEL_FORMAT_BGR_888 0x121
-
-#define HAL_PIXEL_FORMAT_INTERLACE 0x180
-
-// v4l2_fourcc('Y', 'U', 'Y', 'L'). 24 bpp YUYV 4:2:2 10 bit per component
-#define HAL_PIXEL_FORMAT_YCbCr_422_I_10BIT 0x4C595559
-
-// v4l2_fourcc('Y', 'B', 'W', 'C'). 10 bit per component. This compressed
-// format reduces the memory access bandwidth
-#define HAL_PIXEL_FORMAT_YCbCr_422_I_10BIT_COMPRESSED 0x43574259
-
-// UBWC aligned Venus format
-#define HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC 0x7FA30C06
-#define HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC 0x7FA30C09
-
-// Khronos ASTC formats
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
-#define HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
-#define HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
-
-/* possible values for inverse gamma correction */
-#define HAL_IGC_NOT_SPECIFIED 0
-#define HAL_IGC_s_RGB 1
-
-/* Color Space: Values maps to ColorSpace_t in qdMetadata.h */
-#define HAL_CSC_ITU_R_601 0
-#define HAL_CSC_ITU_R_601_FR 1
-#define HAL_CSC_ITU_R_709 2
-#define HAL_CSC_ITU_R_2020 3
-#define HAL_CSC_ITU_R_2020_FR 4
-
-/* possible formats for 3D content*/
-enum {
- HAL_NO_3D = 0x0,
- HAL_3D_SIDE_BY_SIDE_L_R = 0x1,
- HAL_3D_SIDE_BY_SIDE_R_L = 0x2,
- HAL_3D_TOP_BOTTOM = 0x4,
- HAL_3D_IN_SIDE_BY_SIDE_L_R = 0x10000, // unused legacy format
-};
-
-enum { BUFFER_TYPE_UI = 0, BUFFER_TYPE_VIDEO };
-
-#endif // __GRALLOC_PRIV_H__
diff --git a/include/Android.mk b/include/Android.mk
index a0bef56..f787fbc 100644
--- a/include/Android.mk
+++ b/include/Android.mk
@@ -7,11 +7,9 @@
# LOCAL_HEADER_LIBRARIES := display_headers
LOCAL_VENDOR_MODULE := true
LOCAL_COPY_HEADERS_TO := $(common_header_export_path)
-LOCAL_COPY_HEADERS := color_metadata.h \
- display_color_processing.h \
+LOCAL_COPY_HEADERS := display_color_processing.h \
display_properties.h \
../libqdutils/qd_utils.h \
- ../libqdutils/qdMetaData.h \
../libqdutils/display_config.h \
../libqservice/QServiceUtils.h \
../libqservice/IQService.h \
diff --git a/include/color_metadata.h b/include/color_metadata.h
deleted file mode 100644
index 25dc5b5..0000000
--- a/include/color_metadata.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without modification, are permitted
-* 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 The Linux Foundation nor the names of its contributors may be used to
-* endorse or promote products derived from this software without specific prior written
-* permission.
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 __COLOR_METADATA_H__
-#define __COLOR_METADATA_H__
-
-#ifdef __cplusplus
-extern "C" {
-#else
-#include <stdbool.h>
-#endif
-#include <stdint.h>
-
-typedef enum ColorRange {
- Range_Limited = 0,
- Range_Full = 1,
- Range_Extended = 2,
- Range_Max = 0xff,
-} ColorRange;
-
-// The following values matches the HEVC spec
-typedef enum ColorPrimaries {
- // Unused = 0;
- ColorPrimaries_BT709_5 = 1, // ITU-R BT.709-5 or equivalent
- /* Unspecified = 2, Reserved = 3*/
- ColorPrimaries_BT470_6M = 4, // ITU-R BT.470-6 System M or equivalent
- ColorPrimaries_BT601_6_625 = 5, // ITU-R BT.601-6 625 or equivalent
- ColorPrimaries_BT601_6_525 = 6, // ITU-R BT.601-6 525 or equivalent
- ColorPrimaries_SMPTE_240M = 7, // SMPTE_240M
- ColorPrimaries_GenericFilm = 8, // Generic Film
- ColorPrimaries_BT2020 = 9, // ITU-R BT.2020 or equivalent
- ColorPrimaries_SMPTE_ST428 = 10, // SMPTE_240M
- ColorPrimaries_AdobeRGB = 11,
- ColorPrimaries_DCIP3 = 12,
- ColorPrimaries_EBU3213 = 22,
- ColorPrimaries_Max = 0xff,
-} ColorPrimaries;
-
-typedef enum GammaTransfer {
- // Unused = 0;
- Transfer_sRGB = 1, // ITR-BT.709-5
- /* Unspecified = 2, Reserved = 3 */
- Transfer_Gamma2_2 = 4,
- Transfer_Gamma2_8 = 5,
- Transfer_SMPTE_170M = 6, // BT.601-6 525 or 625
- Transfer_SMPTE_240M = 7, // SMPTE_240M
- Transfer_Linear = 8,
- Transfer_Log = 9,
- Transfer_Log_Sqrt = 10,
- Transfer_XvYCC = 11, // IEC 61966-2-4
- Transfer_BT1361 = 12, // Rec.ITU-R BT.1361 extended gamut
- Transfer_sYCC = 13, // IEC 61966-2-1 sRGB or sYCC
- Transfer_BT2020_2_1 = 14, // Rec. ITU-R BT.2020-2 (same as the values 1, 6, and 15)
- Transfer_BT2020_2_2 = 15, // Rec. ITU-R BT.2020-2 (same as the values 1, 6, and 14)
- Transfer_SMPTE_ST2084 = 16, // 2084
- // transfers unlikely to be required by Android
- Transfer_ST_428 = 17, // SMPTE ST 428-1
- Transfer_HLG = 18, // ARIB STD-B67
- Transfer_Max = 0xff,
-} GammaTransfer;
-
-typedef enum MatrixCoEfficients {
- MatrixCoEff_Identity = 0,
- MatrixCoEff_BT709_5 = 1,
- /* Unspecified = 2, Reserved = 3 */
- MatrixCoeff_FCC_73_682 = 4,
- MatrixCoEff_BT601_6_625 = 5,
- MatrixCoEff_BT601_6_525 = 6,
- MatrixCoEff_SMPTE240M = 7, // used with 601_525_Unadjusted
- MatrixCoEff_YCgCo = 8,
- MatrixCoEff_BT2020 = 9,
- MatrixCoEff_BT2020Constant = 10,
- MatrixCoEff_BT601_6_Unadjusted = 11, // Used with BT601_625(KR=0.222, KB=0.071)
- MatrixCoEff_DCIP3 = 12,
- MatrixCoEff_Chroma_NonConstant = 13,
- MatrixCoEff_Max = 0xff,
-} MatrixCoEfficients;
-
-typedef struct Primaries {
- uint32_t rgbPrimaries[3][2]; // unit 1/50000;
- uint32_t whitePoint[2]; // unit 1/50000;
-} Primaries;
-
-typedef struct MasteringDisplay {
- bool colorVolumeSEIEnabled;
- Primaries primaries;
- uint32_t maxDisplayLuminance; // unit: cd/m^2.
- uint32_t minDisplayLuminance; // unit: 1/10000 cd/m^2.
-} MasteringDisplay;
-
-typedef struct ContentLightLevel {
- bool lightLevelSEIEnabled;
- uint32_t maxContentLightLevel; // unit: cd/m^2.
- uint32_t minPicAverageLightLevel; // unit: 1/10000 cd/m^2.
-} ContentLightLevel;
-
-typedef struct ColorRemappingInfo {
- bool criEnabled;
- uint32_t crId;
- uint32_t crCancelFlag;
- uint32_t crPersistenceFlag;
- uint32_t crVideoSignalInfoPresentFlag;
- uint32_t crRange;
- ColorPrimaries crPrimaries;
- GammaTransfer crTransferFunction;
- MatrixCoEfficients crMatrixCoefficients;
- uint32_t crInputBitDepth;
- uint32_t crOutputBitDepth;
- uint32_t crPreLutNumValMinusOne[3];
- uint32_t crPreLutCodedValue[3*33];
- uint32_t crPreLutTargetValue[3*33];
- uint32_t crMatrixPresentFlag;
- uint32_t crLog2MatrixDenom;
- int32_t crCoefficients[3*3];
- uint32_t crPostLutNumValMinusOne[3];
- uint32_t crPostLutCodedValue[3*33];
- uint32_t crPostLutTargetValue[3*33];
-} ColorRemappingInfo;
-
-#define HDR_DYNAMIC_META_DATA_SZ 1024
-typedef struct ColorMetaData {
- // Default values based on sRGB, needs to be overridden in gralloc
- // based on the format and size.
- ColorPrimaries colorPrimaries;
- ColorRange range;
- GammaTransfer transfer;
- MatrixCoEfficients matrixCoefficients;
-
- MasteringDisplay masteringDisplayInfo;
- ContentLightLevel contentLightLevel;
- ColorRemappingInfo cRI;
-
- // Dynamic meta data elements
- bool dynamicMetaDataValid;
- uint32_t dynamicMetaDataLen;
- uint8_t dynamicMetaDataPayload[HDR_DYNAMIC_META_DATA_SZ];
-} ColorMetaData;
-
-typedef struct Color10Bit {
- uint32_t R: 10;
- uint32_t G: 10;
- uint32_t B: 10;
- uint32_t A: 2;
-} Color10Bit;
-
-typedef struct Lut3d {
- uint16_t dim; // dimension of each side of LUT cube (ex: 13, 17)in lutEntries
- uint16_t gridSize; // number of elements in the gridEntries
- /* Matrix ordering convension
- for (b = 0; b < dim; b++) {
- for (g = 0; g < dim; g++) {
- for (r = 0; r < dim; r++) {
- read/write [mR mG mB] associated w/ 3DLUT[r][g][b] to/from file
- }
- }
- } */
- Color10Bit *lutEntries;
- bool validLutEntries; // Indicates if entries are valid and can be used.
- /*
- The grid is a 1D LUT for each of the R,G,B channels that can be
- used to apply an independent nonlinear transformation to each
- channel before it is used as a coordinate for addressing
- the uniform 3D LUT. This effectively creates a non-uniformly
- sampled 3D LUT. This is useful for having independent control
- of the sampling grid density along each dimension for greater
- precision in spite of having a relatively small number of samples.i
- */
- Color10Bit *gridEntries;
- bool validGridEntries; // Indicates if entries are valid and can be used.
-} Lut3d;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // __COLOR_METADATA_H__
diff --git a/libqdutils/qdMetaData.h b/libqdutils/qdMetaData.h
deleted file mode 100644
index 195fdd2..0000000
--- a/libqdutils/qdMetaData.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted 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 The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 _QDMETADATA_H
-#define _QDMETADATA_H
-
-#include <color_metadata.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_UBWC_STATS_LENGTH 32
-#define GRAPHICS_METADATA_SIZE 4096
-
-enum ColorSpace_t{
- ITU_R_601,
- ITU_R_601_FR,
- ITU_R_709,
- ITU_R_2020,
- ITU_R_2020_FR,
-};
-
-enum IGC_t {
- IGC_NotSpecified,
- IGC_sRGB,
-};
-
-struct HSICData_t {
- int32_t hue;
- float saturation;
- int32_t intensity;
- float contrast;
-};
-
-struct BufferDim_t {
- int32_t sliceWidth;
- int32_t sliceHeight;
-};
-
-enum UBWC_Version {
- UBWC_UNUSED = 0,
- UBWC_1_0 = 0x1,
- UBWC_2_0 = 0x2,
- UBWC_MAX_VERSION = 0xFF,
-};
-
-struct UBWC_2_0_Stats {
- uint32_t nCRStatsTile32; /**< UBWC Stats info for 32 Byte Tile */
- uint32_t nCRStatsTile64; /**< UBWC Stats info for 64 Byte Tile */
- uint32_t nCRStatsTile96; /**< UBWC Stats info for 96 Byte Tile */
- uint32_t nCRStatsTile128; /**< UBWC Stats info for 128 Byte Tile */
- uint32_t nCRStatsTile160; /**< UBWC Stats info for 160 Byte Tile */
- uint32_t nCRStatsTile192; /**< UBWC Stats info for 192 Byte Tile */
- uint32_t nCRStatsTile256; /**< UBWC Stats info for 256 Byte Tile */
-};
-
-struct UBWCStats {
- enum UBWC_Version version; /* Union depends on this version. */
- uint8_t bDataValid; /* If [non-zero], CR Stats data is valid.
- * Consumers may use stats data.
- * If [zero], CR Stats data is invalid.
- * Consumers *Shall* not use stats data */
- union {
- struct UBWC_2_0_Stats ubwc_stats;
- uint32_t reserved[MAX_UBWC_STATS_LENGTH]; /* This is for future */
- };
-};
-
-struct S3DGpuComp_t {
- int32_t displayId; /* on which display S3D is composed by client */
- uint32_t s3dMode; /* the S3D format of this layer to be accessed by client */
-};
-
-typedef struct GraphicsMetadata {
- uint32_t size;
- uint32_t data[GRAPHICS_METADATA_SIZE];
-} GraphicsMetadata;
-
-struct MetaData_t {
- int32_t operation;
- int32_t interlaced;
- struct BufferDim_t bufferDim;
- float refreshrate;
- enum ColorSpace_t colorSpace;
- enum IGC_t igc;
- /* Gralloc sets PRIV_SECURE_BUFFER flag to inform that the buffers are from
- * ION_SECURE. which should not be mapped. However, for GPU post proc
- * feature, GFX needs to map this buffer, in the client context and in SF
- * context, it should not. Hence to differentiate, add this metadata field
- * for clients to set, and GPU will to read and know when to map the
- * SECURE_BUFFER(ION) */
- int32_t mapSecureBuffer;
- /* The supported formats are defined in gralloc_priv.h to
- * support legacy code*/
- uint32_t s3dFormat;
- /* VENUS output buffer is linear for UBWC Interlaced video */
- uint32_t linearFormat;
- /* Set by graphics to indicate that this buffer will be written to but not
- * swapped out */
- uint32_t isSingleBufferMode;
- /* Indicate GPU to draw S3D layer on dedicate display device */
- struct S3DGpuComp_t s3dComp;
-
- /* Set by camera to program the VT Timestamp */
- uint64_t vtTimeStamp;
- /* Color Aspects + HDR info */
- ColorMetaData color;
- /* Consumer should read this data as follows based on
- * Gralloc flag "interlaced" listed above.
- * [0] : If it is progressive.
- * [0] : Top field, if it is interlaced.
- * [1] : Do not read, if it is progressive.
- * [1] : Bottom field, if it is interlaced.
- */
- struct UBWCStats ubwcCRStats[2];
- /* Set by camera to indicate that this buffer will be used for a High
- * Performance Video Usecase */
- uint32_t isVideoPerfMode;
- /* Populated and used by adreno during buffer size calculation.
- * Set only for RGB formats. */
- GraphicsMetadata graphics_metadata;
-};
-
-enum DispParamType {
- SET_VT_TIMESTAMP = 0x0001,
- COLOR_METADATA = 0x0002,
- PP_PARAM_INTERLACED = 0x0004,
- SET_VIDEO_PERF_MODE = 0x0008,
- SET_GRAPHICS_METADATA = 0x0010,
- SET_UNUSED = 0x0020,
- SET_UBWC_CR_STATS_INFO = 0x0040,
- UPDATE_BUFFER_GEOMETRY = 0x0080,
- UPDATE_REFRESH_RATE = 0x0100,
- UPDATE_COLOR_SPACE = 0x0200,
- MAP_SECURE_BUFFER = 0x0400,
- S3D_FORMAT = 0x0800,
- LINEAR_FORMAT = 0x1000,
- SET_IGC = 0x2000,
- SET_SINGLE_BUFFER_MODE = 0x4000,
- SET_S3D_COMP = 0x8000,
-};
-
-enum DispFetchParamType {
- GET_VT_TIMESTAMP = 0x0001,
- GET_COLOR_METADATA = 0x0002,
- GET_PP_PARAM_INTERLACED = 0x0004,
- GET_VIDEO_PERF_MODE = 0x0008,
- GET_GRAPHICS_METADATA = 0x0010,
- GET_UNUSED = 0X0020,
- GET_UBWC_CR_STATS_INFO = 0x0040,
- GET_BUFFER_GEOMETRY = 0x0080,
- GET_REFRESH_RATE = 0x0100,
- GET_COLOR_SPACE = 0x0200,
- GET_MAP_SECURE_BUFFER = 0x0400,
- GET_S3D_FORMAT = 0x0800,
- GET_LINEAR_FORMAT = 0x1000,
- GET_IGC = 0x2000,
- GET_SINGLE_BUFFER_MODE = 0x4000,
- GET_S3D_COMP = 0x8000,
-};
-
-struct private_handle_t;
-int setMetaData(struct private_handle_t *handle, enum DispParamType paramType,
- void *param);
-int setMetaDataVa(struct MetaData_t* data, enum DispParamType paramType,
- void *param);
-
-int getMetaData(struct private_handle_t *handle,
- enum DispFetchParamType paramType,
- void *param);
-int getMetaDataVa(struct MetaData_t* data, enum DispFetchParamType paramType,
- void *param);
-
-int copyMetaData(struct private_handle_t *src, struct private_handle_t *dst);
-int copyMetaDataVaToHandle(struct MetaData_t *src, struct private_handle_t *dst);
-int copyMetaDataHandleToVa(struct private_handle_t* src, struct MetaData_t *dst);
-int copyMetaDataVaToVa(struct MetaData_t *src, struct MetaData_t *dst);
-
-int clearMetaData(struct private_handle_t *handle, enum DispParamType paramType);
-int clearMetaDataVa(struct MetaData_t *data, enum DispParamType paramType);
-
-unsigned long getMetaDataSize();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _QDMETADATA_H */
-