1 /* TSI 2023.xmo */ 2 /******************************************************************************* 3 * Copyright (c) 2023 Think Silicon Single Member PC 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a copy 6 * of this header file and/or associated documentation files to use, copy, 7 * modify, merge, publish, distribute, sublicense, and/or sell copies of the 8 * Materials, and to permit persons to whom the Materials are furnished to do 9 * so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Materials. 13 * 14 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS 15 * NEMAGFX API. THE UNMODIFIED, NORMATIVE VERSIONS OF THINK-SILICON NEMAGFX 16 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT: 17 * https://think-silicon.com/products/software/nemagfx-api 18 * 19 * The software is provided 'as is', without warranty of any kind, express or 20 * implied, including but not limited to the warranties of merchantability, 21 * fitness for a particular purpose and noninfringement. In no event shall 22 * Think Silicon Single Member PC be liable for any claim, damages or other 23 * liability, whether in an action of contract, tort or otherwise, arising 24 * from, out of or in connection with the software or the use or other dealings 25 * in the software. 26 ******************************************************************************/ 27 28 #ifndef NEMA_ERROR_H__ 29 #define NEMA_ERROR_H__ 30 31 #include "nema_sys_defs.h" 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 // Error Handling 38 39 #define NEMA_ERR_NO_ERROR (0x00000000U) /**< No error has occured */ 40 #define NEMA_ERR_SYS_INIT_FAILURE (0x00000001U) /**< System initialization failure */ 41 #define NEMA_ERR_GPU_ABSENT (0x00000002U) /**< Nema GPU is absent */ 42 #define NEMA_ERR_RB_INIT_FAILURE (0x00000004U) /**< Ring buffer initialization failure */ 43 #define NEMA_ERR_NON_EXPANDABLE_CL_FULL (0x00000008U) /**< Non expandable command list is full*/ 44 #define NEMA_ERR_CL_EXPANSION (0x00000010U) /**< Command list expansion error */ 45 #define NEMA_ERR_OUT_OF_GFX_MEMORY (0x00000020U) /**< Graphics memory is full */ 46 #define NEMA_ERR_OUT_OF_HOST_MEMORY (0x00000040U) /**< Host memory is full */ 47 #define NEMA_ERR_NO_BOUND_CL (0x00000080U) /**< There is no bound command list */ 48 #define NEMA_ERR_NO_BOUND_FONT (0x00000100U) /**< There is no bound font */ 49 #define NEMA_ERR_GFX_MEMORY_INIT (0x00000200U) /**< Graphics memory initialization failure */ 50 #define NEMA_ERR_DRIVER_FAILURE (0x00000400U) /**< Nema GPU Kernel Driver failure*/ 51 #define NEMA_ERR_MUTEX_INIT (0x00000800U) /**< Mutex initialization failure*/ 52 #define NEMA_ERR_INVALID_BO (0x00001000U) /**< Invalid buffer provided*/ 53 #define NEMA_ERR_INVALID_CL (0x00002000U) /**< Invalid CL provided*/ 54 #define NEMA_ERR_INVALID_CL_ALIGMENT (0x00004000U) /**< Invalid CL buffer alignment*/ 55 #define NEMA_ERR_NO_INIT (0x00008000U) /**< GFX uninitialised*/ 56 57 /** \brief Return Error Id 58 * 59 * \return 0 if no error exists 60 * 61 */ 62 uint32_t nema_get_error(void); 63 64 65 #ifdef __cplusplus 66 } 67 #endif 68 69 #endif // NEMA_ERROR_H__ 70