summaryrefslogtreecommitdiff
path: root/gralloc4/src/capabilities/gralloc_capabilities.h
blob: 3578b285d51808f86991d51d7ee3c0b081f9ff46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Copyright (C) 2020 ARM Limited. All rights reserved.
 *
 * 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.
 */
#pragma once

#include "mali_gralloc_formats.h"

extern mali_gralloc_format_caps cpu_runtime_caps;
extern mali_gralloc_format_caps dpu_runtime_caps;
extern mali_gralloc_format_caps vpu_runtime_caps;
extern mali_gralloc_format_caps gpu_runtime_caps;
extern mali_gralloc_format_caps cam_runtime_caps;
extern mali_gralloc_format_caps bo_runtime_caps;
extern mali_gralloc_format_caps bw_runtime_caps;
extern mali_gralloc_format_caps mfc_runtime_caps;

/*
 * Obtains the capabilities of each media system IP that form the producers
 * and consumers. Default capabilities are assigned (within this function) for
 * each IP, based on CFLAGS which specify the version of each IP (or, for GPU,
 * explicit features):
 * - GPU: MALI_GPU_SUPPORT_*
 * - DPU: MALI_DISPLAY_VERSION
 * - VPU: MALI_VIDEO_VERSION
 *
 * See src/Android.mk for default values.
 *
 * These defaults can be overridden by runtime capabilities defined in the
 * userspace drivers (*.so) loaded for each IP. The drivers should define a
 * symbol named MALI_GRALLOC_FORMATCAPS_SYM_NAME, which contains all
 * capabilities from set MALI_GRALLOC_FORMAT_CAPABILITY_*
 *
 * @return none.
 *
 * NOTE: although no capabilities are returned, global variables global variables
 * named '*_runtime_caps' are updated.
 */
void get_ip_capabilities(void);

#ifdef __cplusplus
extern "C" {
#endif

void mali_gralloc_get_caps(struct mali_gralloc_format_caps *gpu_caps,
                           struct mali_gralloc_format_caps *vpu_caps,
                           struct mali_gralloc_format_caps *dpu_caps,
                           struct mali_gralloc_format_caps *cam_caps);
#ifdef __cplusplus
}
#endif