/** * struct amdxdna_cu_config - configuration for one CU * @cu_bo: CU configuration buffer bo handle. * @cu_func: Function of a CU. * @pad: MBZ.
*/ struct amdxdna_cu_config {
__u32 cu_bo;
__u8 cu_func;
__u8 pad[3];
};
/** * struct amdxdna_hwctx_param_config_cu - configuration for CUs in hardware context * @num_cus: Number of CUs to configure. * @pad: MBZ. * @cu_configs: Array of CU configurations of struct amdxdna_cu_config.
*/ struct amdxdna_hwctx_param_config_cu {
__u16 num_cus;
__u16 pad[3]; struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
};
/** * struct amdxdna_drm_config_hwctx - Configure hardware context. * @handle: hardware context handle. * @param_type: Value in enum amdxdna_drm_config_hwctx_param. Specifies the * structure passed in via param_val. * @param_val: A structure specified by the param_type struct member. * @param_val_size: Size of the parameter buffer pointed to by the param_val. * If param_val is not a pointer, driver can ignore this. * @pad: MBZ. * * Note: if the param_val is a pointer pointing to a buffer, the maximum size * of the buffer is 4KiB(PAGE_SIZE).
*/ struct amdxdna_drm_config_hwctx {
__u32 handle;
__u32 param_type;
__u64 param_val;
__u32 param_val_size;
__u32 pad;
};
/** * struct amdxdna_drm_exec_cmd - Execute command. * @ext: MBZ. * @ext_flags: MBZ. * @hwctx: Hardware context handle. * @type: One of command type in enum amdxdna_cmd_type. * @cmd_handles: Array of command handles or the command handle itself * in case of just one. * @args: Array of arguments for all command handles. * @cmd_count: Number of command handles in the cmd_handles array. * @arg_count: Number of arguments in the args array. * @seq: Returned sequence number for this command.
*/ struct amdxdna_drm_exec_cmd {
__u64 ext;
__u64 ext_flags;
__u32 hwctx;
__u32 type;
__u64 cmd_handles;
__u64 args;
__u32 cmd_count;
__u32 arg_count;
__u64 seq;
};
/** * struct amdxdna_drm_query_aie_status - Query the status of the AIE hardware * @buffer: The user space buffer that will return the AIE status. * @buffer_size: The size of the user space buffer. * @cols_filled: A bitmap of AIE columns whose data has been returned in the buffer.
*/ struct amdxdna_drm_query_aie_status {
__u64 buffer; /* out */
__u32 buffer_size; /* in */
__u32 cols_filled; /* out */
};
/** * struct amdxdna_drm_query_aie_version - Query the version of the AIE hardware * @major: The major version number. * @minor: The minor version number.
*/ struct amdxdna_drm_query_aie_version {
__u32 major; /* out */
__u32 minor; /* out */
};
/** * struct amdxdna_drm_query_aie_tile_metadata - Query the metadata of AIE tile (core, mem, shim) * @row_count: The number of rows. * @row_start: The starting row number. * @dma_channel_count: The number of dma channels. * @lock_count: The number of locks. * @event_reg_count: The number of events. * @pad: Structure padding.
*/ struct amdxdna_drm_query_aie_tile_metadata {
__u16 row_count;
__u16 row_start;
__u16 dma_channel_count;
__u16 lock_count;
__u16 event_reg_count;
__u16 pad[3];
};
/** * struct amdxdna_drm_query_aie_metadata - Query the metadata of the AIE hardware * @col_size: The size of a column in bytes. * @cols: The total number of columns. * @rows: The total number of rows. * @version: The version of the AIE hardware. * @core: The metadata for all core tiles. * @mem: The metadata for all mem tiles. * @shim: The metadata for all shim tiles.
*/ struct amdxdna_drm_query_aie_metadata {
__u32 col_size;
__u16 cols;
__u16 rows; struct amdxdna_drm_query_aie_version version; struct amdxdna_drm_query_aie_tile_metadata core; struct amdxdna_drm_query_aie_tile_metadata mem; struct amdxdna_drm_query_aie_tile_metadata shim;
};
/** * struct amdxdna_drm_query_clock - Metadata for a clock * @name: The clock name. * @freq_mhz: The clock frequency. * @pad: Structure padding.
*/ struct amdxdna_drm_query_clock {
__u8 name[16];
__u32 freq_mhz;
__u32 pad;
};
/** * struct amdxdna_drm_query_clock_metadata - Query metadata for clocks * @mp_npu_clock: The metadata for MP-NPU clock. * @h_clock: The metadata for H clock.
*/ struct amdxdna_drm_query_clock_metadata { struct amdxdna_drm_query_clock mp_npu_clock; struct amdxdna_drm_query_clock h_clock;
};
/** * struct amdxdna_drm_query_sensor - The data for single sensor. * @label: The name for a sensor. * @input: The current value of the sensor. * @max: The maximum value possible for the sensor. * @average: The average value of the sensor. * @highest: The highest recorded sensor value for this driver load for the sensor. * @status: The sensor status. * @units: The sensor units. * @unitm: Translates value member variables into the correct unit via (pow(10, unitm) * value). * @type: The sensor type from enum amdxdna_sensor_type. * @pad: Structure padding.
*/ struct amdxdna_drm_query_sensor {
__u8 label[64];
__u32 input;
__u32 max;
__u32 average;
__u32 highest;
__u8 status[64];
__u8 units[16];
__s8 unitm;
__u8 type;
__u8 pad[6];
};
/** * struct amdxdna_drm_query_hwctx - The data for single context. * @context_id: The ID for this context. * @start_col: The starting column for the partition assigned to this context. * @num_col: The number of columns in the partition assigned to this context. * @pad: Structure padding. * @pid: The Process ID of the process that created this context. * @command_submissions: The number of commands submitted to this context. * @command_completions: The number of commands completed by this context. * @migrations: The number of times this context has been moved to a different partition. * @preemptions: The number of times this context has been preempted by another context in the * same partition. * @errors: The errors for this context.
*/ struct amdxdna_drm_query_hwctx {
__u32 context_id;
__u32 start_col;
__u32 num_col;
__u32 pad;
__s64 pid;
__u64 command_submissions;
__u64 command_completions;
__u64 migrations;
__u64 preemptions;
__u64 errors;
};
enum amdxdna_power_mode_type {
POWER_MODE_DEFAULT, /* Fallback to calculated DPM */
POWER_MODE_LOW, /* Set frequency to lowest DPM */
POWER_MODE_MEDIUM, /* Set frequency to medium DPM */
POWER_MODE_HIGH, /* Set frequency to highest DPM */
POWER_MODE_TURBO, /* Maximum power */
};
/** * struct amdxdna_drm_get_power_mode - Get the configured power mode * @power_mode: The mode type from enum amdxdna_power_mode_type * @pad: Structure padding.
*/ struct amdxdna_drm_get_power_mode {
__u8 power_mode;
__u8 pad[7];
};
/** * struct amdxdna_drm_query_firmware_version - Query the firmware version * @major: The major version number * @minor: The minor version number * @patch: The patch level version number * @build: The build ID
*/ struct amdxdna_drm_query_firmware_version {
__u32 major; /* out */
__u32 minor; /* out */
__u32 patch; /* out */
__u32 build; /* out */
};
/** * struct amdxdna_drm_get_info - Get some information from the AIE hardware. * @param: Value in enum amdxdna_drm_get_param. Specifies the structure passed in the buffer. * @buffer_size: Size of the input buffer. Size needed/written by the kernel. * @buffer: A structure specified by the param struct member.
*/ struct amdxdna_drm_get_info {
__u32 param; /* in */
__u32 buffer_size; /* in/out */
__u64 buffer; /* in/out */
};
/** * struct amdxdna_drm_set_state - Set the state of the AIE hardware. * @param: Value in enum amdxdna_drm_set_param. * @buffer_size: Size of the input param. * @buffer: Pointer to the input param.
*/ struct amdxdna_drm_set_state {
__u32 param; /* in */
__u32 buffer_size; /* in */
__u64 buffer; /* in */
};
/** * struct amdxdna_drm_set_power_mode - Set the power mode of the AIE hardware * @power_mode: The sensor type from enum amdxdna_power_mode_type * @pad: MBZ.
*/ struct amdxdna_drm_set_power_mode {
__u8 power_mode;
__u8 pad[7];
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.