1 /* 2 * Copyright (C) 2020 ARM Limited. All rights reserved. 3 * 4 * Copyright (C) 2008 The Android Open Source Project 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 #pragma once 19 20 #include "mali_gralloc_formats.h" 21 22 extern mali_gralloc_format_caps cpu_runtime_caps; 23 extern mali_gralloc_format_caps dpu_runtime_caps; 24 extern mali_gralloc_format_caps vpu_runtime_caps; 25 extern mali_gralloc_format_caps gpu_runtime_caps; 26 extern mali_gralloc_format_caps cam_runtime_caps; 27 extern mali_gralloc_format_caps bo_runtime_caps; 28 extern mali_gralloc_format_caps bw_runtime_caps; 29 extern mali_gralloc_format_caps mfc_runtime_caps; 30 31 /* 32 * Obtains the capabilities of each media system IP that form the producers 33 * and consumers. Default capabilities are assigned (within this function) for 34 * each IP, based on CFLAGS which specify the version of each IP (or, for GPU, 35 * explicit features): 36 * - GPU: MALI_GPU_SUPPORT_* 37 * - DPU: MALI_DISPLAY_VERSION 38 * - VPU: MALI_VIDEO_VERSION 39 * 40 * See src/Android.mk for default values. 41 * 42 * These defaults can be overridden by runtime capabilities defined in the 43 * userspace drivers (*.so) loaded for each IP. The drivers should define a 44 * symbol named MALI_GRALLOC_FORMATCAPS_SYM_NAME, which contains all 45 * capabilities from set MALI_GRALLOC_FORMAT_CAPABILITY_* 46 * 47 * @return none. 48 * 49 * NOTE: although no capabilities are returned, global variables global variables 50 * named '*_runtime_caps' are updated. 51 */ 52 void get_ip_capabilities(void); 53 54 #ifdef __cplusplus 55 extern "C" { 56 #endif 57 58 void mali_gralloc_get_caps(struct mali_gralloc_format_caps *gpu_caps, 59 struct mali_gralloc_format_caps *vpu_caps, 60 struct mali_gralloc_format_caps *dpu_caps, 61 struct mali_gralloc_format_caps *cam_caps); 62 #ifdef __cplusplus 63 } 64 #endif 65