OSDN Git Service

44d8241d428f52e38306cba3727e4b18b7243d6e
[android-x86/external-minigbm.git] / cros_gralloc / i915_private_android_types.h
1 /*
2  * Copyright 2017 The Chromium OS Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 /*
8  * Android graphics.h defines the formats and leaves 0x100 - 0x1FF
9  * range available for HAL implementation specific formats.
10  */
11
12 #ifndef i915_PRIVATE_ANDROID_TYPES_H_
13 #define i915_PRIVATE_ANDROID_TYPES_H_
14
15 #ifdef USE_GRALLOC1
16 #include <hardware/gralloc1.h>
17 #endif
18
19 enum { HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL = 0x100,
20        HAL_PIXEL_FORMAT_P010_INTEL = 0x110,
21        HAL_PIXEL_FORMAT_A2R10G10B10_INTEL = 0x113,
22        HAL_PIXEL_FORMAT_X2R10G10B10_INTEL = 0x119,
23        HAL_PIXEL_FORMAT_NV12 = 0x10F,
24 };
25
26 #ifdef USE_GRALLOC1
27 enum { GRALLOC1_FUNCTION_SET_MODIFIER = 101,
28        GRALLOC1_LAST_CUSTOM = 500 };
29
30 typedef int32_t /*gralloc1_error_t*/ (*GRALLOC1_PFN_SET_MODIFIER)(
31     gralloc1_device_t *device, gralloc1_buffer_descriptor_t descriptor, uint64_t modifier);
32 #endif
33
34 #endif