1 /* 2 * 3 * (C) COPYRIGHT 2010, 2012-2015, 2018 ARM Limited. All rights reserved. 4 * 5 * This program is free software and is provided to you under the terms of the 6 * GNU General Public License version 2 as published by the Free Software 7 * Foundation, and any use by you of this program is subject to the terms 8 * of such GNU licence. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, you can access it online at 17 * http://www.gnu.org/licenses/gpl-2.0.html. 18 * 19 * SPDX-License-Identifier: GPL-2.0 20 * 21 */ 22 23 /** 24 * @file mali_uk.h 25 * Types and definitions that are common across OSs for both the user 26 * and kernel side of the User-Kernel interface. 27 */ 28 29 #ifndef H_UK_H_ 30 #define H_UK_H_ 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif /* __cplusplus */ 35 36 /** 37 * @addtogroup base_api 38 * @{ 39 */ 40 41 /** 42 * @defgroup uk_api User-Kernel Interface API 43 * 44 * The User-Kernel Interface abstracts the communication mechanism between the user and kernel-side code of device 45 * drivers developed as part of the Midgard DDK. Currently that includes the Base driver. 46 * 47 * It exposes an OS independent API to user-side code (UKU) which routes functions calls to an OS-independent 48 * kernel-side API (UKK) via an OS-specific communication mechanism. 49 * 50 * This API is internal to the Midgard DDK and is not exposed to any applications. 51 * 52 * @{ 53 */ 54 55 /** 56 * These are identifiers for kernel-side drivers implementing a UK interface, aka UKK clients. The 57 * UK module maps this to an OS specific device name, e.g. "gpu_base" -> "GPU0:". Specify this 58 * identifier to select a UKK client to the uku_open() function. 59 * 60 * When a new UKK client driver is created a new identifier needs to be added to the uk_client_id 61 * enumeration and the uku_open() implemenation for the various OS ports need to be updated to 62 * provide a mapping of the identifier to the OS specific device name. 63 * 64 */ 65 enum uk_client_id { 66 /** 67 * Value used to identify the Base driver UK client. 68 */ 69 UK_CLIENT_MALI_T600_BASE, 70 71 /** The number of uk clients supported. This must be the last member of the enum */ 72 UK_CLIENT_COUNT 73 }; 74 75 /** @} end group uk_api */ 76 77 /** @} */ /* end group base_api */ 78 79 #ifdef __cplusplus 80 } 81 #endif /* __cplusplus */ 82 #endif /* _UK_H_ */ 83