/*
* This confidential and proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
- * (C) COPYRIGHT 2008-2013 ARM Limited
+ * (C) COPYRIGHT 2008-2014 ARM Limited
* ALL RIGHTS RESERVED
* The entire notice above must be reproduced on all authorised
* copies and copies may only be made to the extent permitted
_MALI_UK_PP_SUBSYSTEM, /**< Fragment Processor Group of U/K calls */
_MALI_UK_GP_SUBSYSTEM, /**< Vertex Processor Group of U/K calls */
_MALI_UK_PROFILING_SUBSYSTEM, /**< Profiling Group of U/K calls */
- _MALI_UK_PMM_SUBSYSTEM, /**< Power Management Module Group of U/K calls */
_MALI_UK_VSYNC_SUBSYSTEM, /**< VSYNC Group of U/K calls */
} _mali_uk_subsystem_t;
_MALI_UK_WAIT_FOR_NOTIFICATION, /**< _mali_ukk_wait_for_notification() */
_MALI_UK_GET_API_VERSION, /**< _mali_ukk_get_api_version() */
_MALI_UK_POST_NOTIFICATION, /**< _mali_ukk_post_notification() */
- _MALI_UK_GET_MALI_VERSION_IN_RK30,
_MALI_UK_GET_USER_SETTING, /**< _mali_ukk_get_user_setting() *//**< [out] */
_MALI_UK_GET_USER_SETTINGS, /**< _mali_ukk_get_user_settings() *//**< [out] */
_MALI_UK_REQUEST_HIGH_PRIORITY, /**< _mali_ukk_request_high_priority() */
_MALI_UK_TIMELINE_CREATE_SYNC_FENCE, /**< _mali_ukk_timeline_create_sync_fence() */
_MALI_UK_SOFT_JOB_START, /**< _mali_ukk_soft_job_start() */
_MALI_UK_SOFT_JOB_SIGNAL, /**< _mali_ukk_soft_job_signal() */
-
+ _MALI_UK_GET_MALI_VERSION_IN_RK30,
/** Memory functions */
_MALI_UK_INIT_MEM = 0, /**< _mali_ukk_init_mem() */
_MALI_UK_TERM_MEM, /**< _mali_ukk_term_mem() */
- _MALI_UK_GET_BIG_BLOCK, /**< _mali_ukk_get_big_block() */
- _MALI_UK_FREE_BIG_BLOCK, /**< _mali_ukk_free_big_block() */
_MALI_UK_MAP_MEM, /**< _mali_ukk_mem_mmap() */
_MALI_UK_UNMAP_MEM, /**< _mali_ukk_mem_munmap() */
_MALI_UK_QUERY_MMU_PAGE_TABLE_DUMP_SIZE, /**< _mali_ukk_mem_get_mmu_page_table_dump_size() */
_MALI_UK_RELEASE_UMP_MEM, /**< _mali_ukk_release_ump_mem() */
_MALI_UK_MAP_EXT_MEM, /**< _mali_uku_map_external_mem() */
_MALI_UK_UNMAP_EXT_MEM, /**< _mali_uku_unmap_external_mem() */
- _MALI_UK_VA_TO_MALI_PA, /**< _mali_uku_va_to_mali_pa() */
_MALI_UK_MEM_WRITE_SAFE, /**< _mali_uku_mem_write_safe() */
/** Common functions for each core */
/** Profiling functions */
- _MALI_UK_PROFILING_START = 0, /**< __mali_uku_profiling_start() */
- _MALI_UK_PROFILING_ADD_EVENT, /**< __mali_uku_profiling_add_event() */
- _MALI_UK_PROFILING_STOP, /**< __mali_uku_profiling_stop() */
- _MALI_UK_PROFILING_GET_EVENT, /**< __mali_uku_profiling_get_event() */
- _MALI_UK_PROFILING_CLEAR, /**< __mali_uku_profiling_clear() */
- _MALI_UK_PROFILING_GET_CONFIG, /**< __mali_uku_profiling_get_config() */
+ _MALI_UK_PROFILING_ADD_EVENT = 0, /**< __mali_uku_profiling_add_event() */
_MALI_UK_PROFILING_REPORT_SW_COUNTERS,/**< __mali_uku_profiling_report_sw_counters() */
+ _MALI_UK_PROFILING_MEMORY_USAGE_GET, /**< __mali_uku_profiling_memory_usage_get() */
/** VSYNC reporting fuctions */
_MALI_UK_VSYNC_EVENT_REPORT = 0, /**< _mali_ukk_vsync_event_report() */
-
} _mali_uk_functions;
-/** @brief Get the size necessary for system info
- *
- * @see _mali_ukk_get_system_info_size()
- */
-typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 size; /**< [out] size of buffer necessary to hold system information data, in bytes */
-} _mali_uk_get_system_info_size_s;
-
-
/** @defgroup _mali_uk_getsysteminfo U/K Get System Info
* @{ */
*/
typedef u32 _mali_core_version;
-/**
- * Enum values for the different modes the driver can be put in.
- * Normal is the default mode. The driver then uses a job queue and takes job objects from the clients.
- * Job completion is reported using the _mali_ukk_wait_for_notification call.
- * The driver blocks this io command until a job has completed or failed or a timeout occurs.
- *
- * The 'raw' mode is reserved for future expansion.
- */
-typedef enum _mali_driver_mode {
- _MALI_DRIVER_MODE_RAW = 1, /**< Reserved for future expansion */
- _MALI_DRIVER_MODE_NORMAL = 2 /**< Normal mode of operation */
-} _mali_driver_mode;
-
-/** @brief List of possible cores
- *
- * add new entries to the end of this enum */
-typedef enum _mali_core_type {
- _MALI_GP2 = 2, /**< MaliGP2 Programmable Vertex Processor */
- _MALI_200 = 5, /**< Mali200 Programmable Fragment Processor */
- _MALI_400_GP = 6, /**< Mali400 Programmable Vertex Processor */
- _MALI_400_PP = 7, /**< Mali400 Programmable Fragment Processor */
- /* insert new core here, do NOT alter the existing values */
-} _mali_core_type;
-
-
-/** @brief Capabilities of Memory Banks
- *
- * These may be used to restrict memory banks for certain uses. They may be
- * used when access is not possible (e.g. Bus does not support access to it)
- * or when access is possible but not desired (e.g. Access is slow).
- *
- * In the case of 'possible but not desired', there is no way of specifying
- * the flags as an optimization hint, so that the memory could be used as a
- * last resort.
- *
- * @see _mali_mem_info
- */
-typedef enum _mali_bus_usage {
-
- _MALI_PP_READABLE = (1<<0), /** Readable by the Fragment Processor */
- _MALI_PP_WRITEABLE = (1<<1), /** Writeable by the Fragment Processor */
- _MALI_GP_READABLE = (1<<2), /** Readable by the Vertex Processor */
- _MALI_GP_WRITEABLE = (1<<3), /** Writeable by the Vertex Processor */
- _MALI_CPU_READABLE = (1<<4), /** Readable by the CPU */
- _MALI_CPU_WRITEABLE = (1<<5), /** Writeable by the CPU */
- _MALI_GP_L2_ALLOC = (1<<6), /** GP allocate mali L2 cache lines*/
- _MALI_MMU_READABLE = _MALI_PP_READABLE | _MALI_GP_READABLE, /** Readable by the MMU (including all cores behind it) */
- _MALI_MMU_WRITEABLE = _MALI_PP_WRITEABLE | _MALI_GP_WRITEABLE, /** Writeable by the MMU (including all cores behind it) */
-} _mali_bus_usage;
-
-typedef enum mali_memory_cache_settings {
- MALI_CACHE_STANDARD = 0,
- MALI_CACHE_GP_READ_ALLOCATE = 1,
-} mali_memory_cache_settings ;
-
-
-/** @brief Information about the Mali Memory system
- *
- * Information is stored in a linked list, which is stored entirely in the
- * buffer pointed to by the system_info member of the
- * _mali_uk_get_system_info_s arguments provided to _mali_ukk_get_system_info()
- *
- * Each element of the linked list describes a single Mali Memory bank.
- * Each allocation can only come from one bank, and will not cross multiple
- * banks.
- *
- * On Mali-MMU systems, there is only one bank, which describes the maximum
- * possible address range that could be allocated (which may be much less than
- * the available physical memory)
- *
- * The flags member describes the capabilities of the memory. It is an error
- * to attempt to build a job for a particular core (PP or GP) when the memory
- * regions used do not have the capabilities for supporting that core. This
- * would result in a job abort from the Device Driver.
- *
- * For example, it is correct to build a PP job where read-only data structures
- * are taken from a memory with _MALI_PP_READABLE set and
- * _MALI_PP_WRITEABLE clear, and a framebuffer with _MALI_PP_WRITEABLE set and
- * _MALI_PP_READABLE clear. However, it would be incorrect to use a framebuffer
- * where _MALI_PP_WRITEABLE is clear.
- */
-typedef struct _mali_mem_info {
- u32 size; /**< Size of the memory bank in bytes */
- _mali_bus_usage flags; /**< Capabilitiy flags of the memory */
- u32 maximum_order_supported; /**< log2 supported size */
- u32 identifier; /* mali_memory_cache_settings cache_settings; */
- struct _mali_mem_info * next; /**< Next List Link */
-} _mali_mem_info;
-
/** @} */ /* end group _mali_uk_core */
} _maligp_job_suspended_response_code;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 cookie; /**< [in] cookie from the _mali_uk_gp_job_suspended_s notification */
_maligp_job_suspended_response_code code; /**< [in] abort or resume response code, see \ref _maligp_job_suspended_response_code */
u32 arguments[2]; /**< [in] 0 when aborting a job. When resuming a job, the Mali start and end address for a new heap to resume the job with */
/** @defgroup _mali_uk_gpstartjob_s Vertex Processor Start Job
* @{ */
-/** @brief Status indicating the result of starting a Vertex or Fragment processor job */
-typedef enum {
- _MALI_UK_START_JOB_STARTED, /**< Job started */
- _MALI_UK_START_JOB_NOT_STARTED_DO_REQUEUE /**< Job could not be started at this time. Try starting the job again */
-} _mali_uk_start_job_status;
-
/** @brief Status indicating the result of the execution of a Vertex or Fragment processor job */
-
typedef enum {
- _MALI_UK_JOB_STATUS_END_SUCCESS = 1<<(16+0),
- _MALI_UK_JOB_STATUS_END_OOM = 1<<(16+1),
- _MALI_UK_JOB_STATUS_END_ABORT = 1<<(16+2),
- _MALI_UK_JOB_STATUS_END_TIMEOUT_SW = 1<<(16+3),
- _MALI_UK_JOB_STATUS_END_HANG = 1<<(16+4),
- _MALI_UK_JOB_STATUS_END_SEG_FAULT = 1<<(16+5),
- _MALI_UK_JOB_STATUS_END_ILLEGAL_JOB = 1<<(16+6),
- _MALI_UK_JOB_STATUS_END_UNKNOWN_ERR = 1<<(16+7),
- _MALI_UK_JOB_STATUS_END_SHUTDOWN = 1<<(16+8),
- _MALI_UK_JOB_STATUS_END_SYSTEM_UNUSABLE = 1<<(16+9)
+ _MALI_UK_JOB_STATUS_END_SUCCESS = 1 << (16 + 0),
+ _MALI_UK_JOB_STATUS_END_OOM = 1 << (16 + 1),
+ _MALI_UK_JOB_STATUS_END_ABORT = 1 << (16 + 2),
+ _MALI_UK_JOB_STATUS_END_TIMEOUT_SW = 1 << (16 + 3),
+ _MALI_UK_JOB_STATUS_END_HANG = 1 << (16 + 4),
+ _MALI_UK_JOB_STATUS_END_SEG_FAULT = 1 << (16 + 5),
+ _MALI_UK_JOB_STATUS_END_ILLEGAL_JOB = 1 << (16 + 6),
+ _MALI_UK_JOB_STATUS_END_UNKNOWN_ERR = 1 << (16 + 7),
+ _MALI_UK_JOB_STATUS_END_SHUTDOWN = 1 << (16 + 8),
+ _MALI_UK_JOB_STATUS_END_SYSTEM_UNUSABLE = 1 << (16 + 9)
} _mali_uk_job_status;
#define MALIGP2_NUM_REGS_FRAME (6)
*
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 user_job_ptr; /**< [in] identifier for the job in user space, a @c mali_gp_job_info* */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 user_job_ptr; /**< [in] identifier for the job in user space, a @c mali_gp_job_info* */
u32 priority; /**< [in] job priority. A lower number means higher priority */
u32 frame_registers[MALIGP2_NUM_REGS_FRAME]; /**< [in] core specific registers associated with this job */
u32 perf_counter_flag; /**< [in] bitmask indicating which performance counters to enable, see \ref _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE and related macro definitions */
u32 frame_builder_id; /**< [in] id of the originating frame builder */
u32 flush_id; /**< [in] flush id within the originating frame builder */
_mali_uk_fence_t fence; /**< [in] fence this job must wait on */
- u32 *timeline_point_ptr; /**< [in,out] pointer to location where point on gp timeline for this job will be written */
+ u64 timeline_point_ptr; /**< [in,out] pointer to u32: location where point on gp timeline for this job will be written */
} _mali_uk_gp_start_job_s;
#define _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE (1<<0) /**< Enable performance counter SRC0 for a job */
/** @} */ /* end group _mali_uk_gpstartjob_s */
typedef struct {
- u32 user_job_ptr; /**< [out] identifier for the job in user space */
+ u64 user_job_ptr; /**< [out] identifier for the job in user space */
_mali_uk_job_status status; /**< [out] status of finished job */
u32 heap_current_addr; /**< [out] value of the GP PLB PL heap start address register */
u32 perf_counter0; /**< [out] value of performance counter 0 (see ARM DDI0415A) */
} _mali_uk_gp_job_finished_s;
typedef struct {
- u32 user_job_ptr; /**< [out] identifier for the job in user space */
+ u64 user_job_ptr; /**< [out] identifier for the job in user space */
u32 cookie; /**< [out] identifier for the core in kernel space on which the job stalled */
} _mali_uk_gp_job_suspended_s;
*
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 user_job_ptr; /**< [in] identifier for the job in user space */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 user_job_ptr; /**< [in] identifier for the job in user space */
u32 priority; /**< [in] job priority. A lower number means higher priority */
u32 frame_registers[_MALI_PP_MAX_FRAME_REGISTERS]; /**< [in] core specific registers associated with first sub job, see ARM DDI0415A */
u32 frame_registers_addr_frame[_MALI_PP_MAX_SUB_JOBS - 1]; /**< [in] ADDR_FRAME registers for sub job 1-7 */
u32 wb1_registers[_MALI_PP_MAX_WB_REGISTERS];
u32 wb2_registers[_MALI_PP_MAX_WB_REGISTERS];
u32 dlbu_registers[_MALI_DLBU_MAX_REGISTERS]; /**< [in] Dynamic load balancing unit registers */
- u32 num_cores; /**< [in] Number of cores to set up (valid range: 1-4) */
+ u32 num_cores; /**< [in] Number of cores to set up (valid range: 1-8(M450) or 4(M400)) */
u32 perf_counter_flag; /**< [in] bitmask indicating which performance counters to enable, see \ref _MALI_PERFORMANCE_COUNTER_FLAG_SRC0_ENABLE and related macro definitions */
u32 perf_counter_src0; /**< [in] source id for performance counter 0 (see ARM DDI0415A, Table 3-60) */
u32 perf_counter_src1; /**< [in] source id for performance counter 1 (see ARM DDI0415A, Table 3-60) */
u32 tilesy; /**< [in] number of tiles in y direction (needed for reading the heatmap memory) */
u32 heatmap_mem; /**< [in] memory address to store counter values per tile (aka heatmap) */
u32 num_memory_cookies; /**< [in] number of memory cookies attached to job */
- u32 *memory_cookies; /**< [in] memory cookies attached to job */
+ u64 memory_cookies; /**< [in] pointer to array of u32 memory cookies attached to job */
_mali_uk_fence_t fence; /**< [in] fence this job must wait on */
- u32 *timeline_point_ptr; /**< [in,out] pointer to location where point on pp timeline for this job will be written */
+ u64 timeline_point_ptr; /**< [in,out] pointer to location of u32 where point on pp timeline for this job will be written */
} _mali_uk_pp_start_job_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- _mali_uk_gp_start_job_s *gp_args; /**< [in,out] GP uk arguments (see _mali_uk_gp_start_job_s) */
- _mali_uk_pp_start_job_s *pp_args; /**< [in,out] PP uk arguments (see _mali_uk_pp_start_job_s) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 gp_args; /**< [in,out] GP uk arguments (see _mali_uk_gp_start_job_s) */
+ u64 pp_args; /**< [in,out] PP uk arguments (see _mali_uk_pp_start_job_s) */
} _mali_uk_pp_and_gp_start_job_s;
/** @} */ /* end group _mali_uk_ppstartjob_s */
typedef struct {
- u32 user_job_ptr; /**< [out] identifier for the job in user space */
+ u64 user_job_ptr; /**< [out] identifier for the job in user space */
_mali_uk_job_status status; /**< [out] status of finished job */
u32 perf_counter0[_MALI_PP_MAX_SUB_JOBS]; /**< [out] value of perfomance counter 0 (see ARM DDI0415A), one for each sub job */
u32 perf_counter1[_MALI_PP_MAX_SUB_JOBS]; /**< [out] value of perfomance counter 1 (see ARM DDI0415A), one for each sub job */
} _mali_uk_pp_job_wbx_flag;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 fb_id; /**< [in] Frame builder ID of job to disable WB units for */
u32 wb0_memory;
u32 wb1_memory;
* @{ */
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 type; /**< [in] type of soft job */
- u32 user_job; /**< [in] identifier for the job in user space */
- u32 *job_id_ptr; /**< [in,out] pointer to location where job id will be written */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 user_job; /**< [in] identifier for the job in user space */
+ u64 job_id_ptr; /**< [in,out] pointer to location of u32 where job id will be written */
_mali_uk_fence_t fence; /**< [in] fence this job must wait on */
u32 point; /**< [out] point on soft timeline for this job */
+ u32 type; /**< [in] type of soft job */
} _mali_uk_soft_job_start_s;
typedef struct {
- u32 user_job; /**< [out] identifier for the job in user space */
+ u64 user_job; /**< [out] identifier for the job in user space */
} _mali_uk_soft_job_activated_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 job_id; /**< [in] id for soft job */
} _mali_uk_soft_job_signal_s;
typedef enum {
/** core notifications */
- _MALI_NOTIFICATION_CORE_SHUTDOWN_IN_PROGRESS = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x20,
- _MALI_NOTIFICATION_APPLICATION_QUIT = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x40,
- _MALI_NOTIFICATION_SETTINGS_CHANGED = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x80,
- _MALI_NOTIFICATION_SOFT_ACTIVATED = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x100,
+ _MALI_NOTIFICATION_CORE_SHUTDOWN_IN_PROGRESS = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x20,
+ _MALI_NOTIFICATION_APPLICATION_QUIT = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x40,
+ _MALI_NOTIFICATION_SETTINGS_CHANGED = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x80,
+ _MALI_NOTIFICATION_SOFT_ACTIVATED = (_MALI_UK_CORE_SUBSYSTEM << 16) | 0x100,
/** Fragment Processor notifications */
- _MALI_NOTIFICATION_PP_FINISHED = (_MALI_UK_PP_SUBSYSTEM << 16) | 0x10,
- _MALI_NOTIFICATION_PP_NUM_CORE_CHANGE = (_MALI_UK_PP_SUBSYSTEM << 16) | 0x20,
+ _MALI_NOTIFICATION_PP_FINISHED = (_MALI_UK_PP_SUBSYSTEM << 16) | 0x10,
+ _MALI_NOTIFICATION_PP_NUM_CORE_CHANGE = (_MALI_UK_PP_SUBSYSTEM << 16) | 0x20,
/** Vertex Processor notifications */
- _MALI_NOTIFICATION_GP_FINISHED = (_MALI_UK_GP_SUBSYSTEM << 16) | 0x10,
- _MALI_NOTIFICATION_GP_STALLED = (_MALI_UK_GP_SUBSYSTEM << 16) | 0x20,
+ _MALI_NOTIFICATION_GP_FINISHED = (_MALI_UK_GP_SUBSYSTEM << 16) | 0x10,
+ _MALI_NOTIFICATION_GP_STALLED = (_MALI_UK_GP_SUBSYSTEM << 16) | 0x20,
} _mali_uk_notification_type;
/* See mali_user_settings_db.c */
extern const char *_mali_uk_user_setting_descriptions[];
#define _MALI_UK_USER_SETTING_DESCRIPTIONS \
-{ \
- "sw_events_enable", \
- "colorbuffer_capture_enable", \
- "depthbuffer_capture_enable", \
- "stencilbuffer_capture_enable", \
- "per_tile_counters_enable", \
- "buffer_capture_compositor", \
- "buffer_capture_window", \
- "buffer_capture_other", \
- "buffer_capture_n_frames", \
- "buffer_capture_resize_factor", \
- "sw_counters_enable", \
-};
+ { \
+ "sw_events_enable", \
+ "colorbuffer_capture_enable", \
+ "depthbuffer_capture_enable", \
+ "stencilbuffer_capture_enable", \
+ "per_tile_counters_enable", \
+ "buffer_capture_compositor", \
+ "buffer_capture_window", \
+ "buffer_capture_other", \
+ "buffer_capture_n_frames", \
+ "buffer_capture_resize_factor", \
+ "sw_counters_enable", \
+ };
/** @brief struct to hold the value to a particular setting as seen in the kernel space
*/
* when the polygon list builder unit has run out of memory.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_notification_type type; /**< [out] Type of notification available */
union {
_mali_uk_gp_job_suspended_s gp_job_suspended;/**< [out] Notification data for _MALI_NOTIFICATION_GP_STALLED notification type */
* This is used to send a quit message to the callback thread.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_notification_type type; /**< [in] Type of notification to post */
} _mali_uk_post_notification_s;
/**
* RK MALI version code
*/
-#define _MALI_RK_LIBS_VERSION 6
+#define _MALI_RK_LIBS_VERSION 1
/**
* API version define.
* The 16bit integer is stored twice in a 32bit integer
* For example, for version 1 the value would be 0x00010001
*/
-#define _MALI_API_VERSION 401
+#define _MALI_API_VERSION 600
#define _MALI_UK_API_VERSION _MAKE_VERSION_ID(_MALI_API_VERSION)
/**
* of the interface may be backwards compatible.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u32 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_api_version version; /**< [in,out] API version of user-side interface. */
int compatible; /**< [out] @c 1 when @version is compatible, @c 0 otherwise */
} _mali_uk_get_api_version_s;
-/** @} */ /* end group _mali_uk_getapiversion_s */
+/** @brief Arguments for _mali_uk_get_api_version_v2()
+ *
+ * The user-side interface version must be written into the version member,
+ * encoded using _MAKE_VERSION_ID(). It will be compared to the API version of
+ * the kernel-side interface.
+ *
+ * On successful return, the version member will be the API version of the
+ * kernel-side interface. _MALI_UK_API_VERSION macro defines the current version
+ * of the API.
+ *
+ * The compatible member must be checked to see if the version of the user-side
+ * interface is compatible with the kernel-side interface, since future versions
+ * of the interface may be backwards compatible.
+ */
typedef struct
{
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_api_version version; /**< [in,out] API version of user-side interface. */
} _mali_uk_get_mali_version_in_rk30_s;
+typedef struct {
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ _mali_uk_api_version version; /**< [in,out] API version of user-side interface. */
+ int compatible; /**< [out] @c 1 when @version is compatible, @c 0 otherwise */
+} _mali_uk_get_api_version_v2_s;
+
+/** @} */ /* end group _mali_uk_getapiversion_s */
/** @defgroup _mali_uk_get_user_settings_s Get user space settings */
*
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 settings[_MALI_UK_USER_SETTING_MAX]; /**< [out] The values for all settings */
} _mali_uk_get_user_settings_s;
/** @brief struct to hold the value of a particular setting from the user space within a given context
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_user_setting_t setting; /**< [in] setting to get */
u32 value; /**< [out] value of setting */
} _mali_uk_get_user_setting_s;
/** @brief Arguments for _mali_ukk_request_high_priority() */
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
} _mali_uk_request_high_priority_s;
/** @} */ /* end group _mali_uk_core */
#define _MALI_MAP_EXTERNAL_MAP_GUARD_PAGE (1<<0)
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 phys_addr; /**< [in] physical address */
u32 size; /**< [in] size */
u32 mali_address; /**< [in] mali address to map the physical memory to */
} _mali_uk_map_external_mem_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 cookie; /**< [out] identifier for mapped memory object in kernel space */
} _mali_uk_unmap_external_mem_s;
/** @note This is identical to _mali_uk_map_external_mem_s above, however phys_addr is replaced by memory descriptor */
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 mem_fd; /**< [in] Memory descriptor */
u32 size; /**< [in] size */
u32 mali_address; /**< [in] mali address to map the physical memory to */
} _mali_uk_attach_dma_buf_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 mem_fd; /**< [in] Memory descriptor */
u32 size; /**< [out] size */
} _mali_uk_dma_buf_get_size_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 cookie; /**< [in] identifier for mapped memory object in kernel space */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 cookie; /**< [in] identifier for mapped memory object in kernel space */
} _mali_uk_release_dma_buf_s;
/** @note This is identical to _mali_uk_map_external_mem_s above, however phys_addr is replaced by secure_id */
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 secure_id; /**< [in] secure id */
u32 size; /**< [in] size */
u32 mali_address; /**< [in] mali address to map the physical memory to */
} _mali_uk_attach_ump_mem_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 cookie; /**< [in] identifier for mapped memory object in kernel space */
} _mali_uk_release_ump_mem_s;
-/** @brief Arguments for _mali_ukk_va_to_mali_pa()
- *
- * if size is zero or not a multiple of the system's page size, it will be
- * rounded up to the next multiple of the page size. This will occur before
- * any other use of the size parameter.
- *
- * if va is not PAGE_SIZE aligned, it will be rounded down to the next page
- * boundary.
- *
- * The range (va) to ((u32)va)+(size-1) inclusive will be checked for physical
- * contiguity.
- *
- * The implementor will check that the entire physical range is allowed to be mapped
- * into user-space.
- *
- * Failure will occur if either of the above are not satisfied.
- *
- * Otherwise, the physical base address of the range is returned through pa,
- * va is updated to be page aligned, and size is updated to be a non-zero
- * multiple of the system's pagesize.
- */
-typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- void *va; /**< [in,out] Virtual address of the start of the range */
- u32 pa; /**< [out] Physical base address of the range */
- u32 size; /**< [in,out] Size of the range, in bytes. */
-} _mali_uk_va_to_mali_pa_s;
-
/**
* @brief Arguments for _mali_uk[uk]_mem_write_safe()
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- const void *src; /**< [in] Pointer to source data */
- void *dest; /**< [in] Destination Mali buffer */
- u32 size; /**< [in,out] Number of bytes to write/copy on input, number of bytes actually written/copied on output */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 src; /**< [in] Pointer to source data */
+ u64 dest; /**< [in] Destination Mali buffer */
+ u32 size; /**< [in,out] Number of bytes to write/copy on input, number of bytes actually written/copied on output */
} _mali_uk_mem_write_safe_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 size; /**< [out] size of MMU page table information (registers + page tables) */
} _mali_uk_query_mmu_page_table_dump_size_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 size; /**< [in] size of buffer to receive mmu page table information */
- void *buffer; /**< [in,out] buffer to receive mmu page table information */
+ u64 buffer; /**< [in,out] buffer to receive mmu page table information */
u32 register_writes_size; /**< [out] size of MMU register dump */
- u32 *register_writes; /**< [out] pointer within buffer where MMU register dump is stored */
+ u64 register_writes; /**< [out] pointer within buffer where MMU register dump is stored */
u32 page_table_dump_size; /**< [out] size of MMU page table dump */
- u32 *page_table_dump; /**< [out] pointer within buffer where MMU page table dump is stored */
+ u64 page_table_dump; /**< [out] pointer within buffer where MMU page table dump is stored */
} _mali_uk_dump_mmu_page_table_s;
/** @} */ /* end group _mali_uk_memory */
* will contain the number of Fragment Processor cores in the system.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 number_of_total_cores; /**< [out] Total number of Fragment Processor cores in the system */
u32 number_of_enabled_cores; /**< [out] Number of enabled Fragment Processor cores */
} _mali_uk_get_pp_number_of_cores_s;
* the version that all Fragment Processor cores are compatible with.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_core_version version; /**< [out] version returned from core, see \ref _mali_core_version */
+ u32 padding;
} _mali_uk_get_pp_core_version_s;
/** @} */ /* end group _mali_uk_pp */
* will contain the number of Vertex Processor cores in the system.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 number_of_cores; /**< [out] number of Vertex Processor cores in the system */
} _mali_uk_get_gp_number_of_cores_s;
* the version that all Vertex Processor cores are compatible with.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_core_version version; /**< [out] version returned from core, see \ref _mali_core_version */
} _mali_uk_get_gp_core_version_s;
-typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 limit; /**< [in,out] The desired limit for number of events to record on input, actual limit on output */
-} _mali_uk_profiling_start_s;
+/** @} */ /* end group _mali_uk_gp */
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 event_id; /**< [in] event id to register (see enum mali_profiling_events for values) */
u32 data[5]; /**< [in] event specific data */
} _mali_uk_profiling_add_event_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 count; /**< [out] The number of events sampled */
-} _mali_uk_profiling_stop_s;
-
-typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32 index; /**< [in] which index to get (starting at zero) */
- u64 timestamp; /**< [out] timestamp of event */
- u32 event_id; /**< [out] event id of event (see enum mali_profiling_events for values) */
- u32 data[5]; /**< [out] event specific data */
-} _mali_uk_profiling_get_event_s;
-
-typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
-} _mali_uk_profiling_clear_s;
-
-/** @} */ /* end group _mali_uk_gp */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u32 memory_usage; /**< [out] total memory usage */
+} _mali_uk_profiling_memory_usage_get_s;
/** @addtogroup _mali_uk_memory U/K Memory
* implementation of the U/K interface. Its value must be zero.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
void *mapping; /**< [out] Returns user-space virtual address for the mapping */
u32 size; /**< [in] Size of the requested mapping */
u32 phys_addr; /**< [in] Physical address - could be offset, depending on caller+callee convention */
u32 cookie; /**< [out] Returns a cookie for use in munmap calls */
- void *uku_private; /**< [in] User-side Private word used by U/K interface */
- void *ukk_private; /**< [in] Kernel-side Private word used by U/K interface */
- mali_memory_cache_settings cache_settings; /**< [in] Option to set special cache flags, tuning L2 efficency */
} _mali_uk_mem_mmap_s;
/** @brief Arguments to _mali_ukk_mem_munmap()
* originally obtained range, or to unmap more than was originally obtained.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
void *mapping; /**< [in] The mapping returned from mmap call */
u32 size; /**< [in] The size passed to mmap call */
u32 cookie; /**< [in] Cookie from mmap call */
*
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_vsync_event event; /**< [in] VSYNCH event type */
} _mali_uk_vsync_event_report_s;
* Values recorded for each of the software counters during a single renderpass.
*/
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
- u32* counters; /**< [in] The array of counter values */
- u32 num_counters; /**< [in] The number of elements in counters array */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 counters; /**< [in] The array of u32 counter values */
+ u32 num_counters; /**< [in] The number of elements in counters array */
} _mali_uk_sw_counters_report_s;
/** @} */ /* end group _mali_uk_sw_counters_report */
* @{ */
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
u32 timeline; /**< [in] timeline id */
u32 point; /**< [out] latest point on timeline */
} _mali_uk_timeline_get_latest_point_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_fence_t fence; /**< [in] fence */
u32 timeout; /**< [in] timeout (0 for no wait, -1 for blocking) */
u32 status; /**< [out] status of fence (1 if signaled, 0 if timeout) */
} _mali_uk_timeline_wait_s;
typedef struct {
- void *ctx; /**< [in,out] user-kernel context (trashed on output) */
+ u64 ctx; /**< [in,out] user-kernel context (trashed on output) */
_mali_uk_fence_t fence; /**< [in] mali fence to create linux sync fence from */
s32 sync_fd; /**< [out] file descriptor for new linux sync fence */
} _mali_uk_timeline_create_sync_fence_s;