STRUCT AMDXDNA_DRM_HWCTX_ENTRY(9)
π¦ NAME π¦
ok so this is the struct amdxdna_drm_hwctx_entry manpage from the Kernel API Manual (that's the manual name, bestie, section 9), and it's literally the hardware context array entry π
β one little row in the array that tells you everything about a hardware context.
β¨ SYNOPSIS β¨
like, here's the whole struct, no cap, every field exactly as it is:
struct amdxdna_drm_hwctx_entry {
__u32 context_id;
__u32 start_col;
__u32 num_col;
__u32 hwctx_id;
__s64 pid;
__u64 command_submissions;
__u64 command_completions;
__u64 migrations;
__u64 preemptions;
__u64 errors;
__u64 priority;
__u64 heap_usage;
__u64 suspensions;
__u32 state;
__u32 pasid;
__u32 gops;
__u32 fps;
__u32 dma_bandwidth;
__u32 latency;
__u32 frame_exec_time;
__u32 txn_op_idx;
__u32 ctx_pc;
__u32 fatal_error_type;
__u32 fatal_error_exception_type;
__u32 fatal_error_exception_pc;
__u32 fatal_error_app_module;
__u32 pad;
};
π Members π
okay this is the part where we meet everybody in the group chat π:
context_idβ the Context ID. that's it, that's the identifier π«Άstart_colβ the starting AIE array column that got assigned to this context β¨num_colβ how many AIE array columns this context got handed. a whole lil column situation πhwctx_idβ the real hardware context id (the actual one, not the vibes one) πpidβ the ID of the process that created this context. like, who's the parent here πcommand_submissionsβ how many commands got submitted πcommand_completionsβ how many commands actually finished. slay πmigrationsβ how many times it's been migrated. it's been through things πpreemptionsβ how many times it's been preempted. rude but okay πerrorsβ how many errors happened. we don't talk about it π§priorityβ the context priority. main character energy, basically βheap_usageβ how much of the device heap buffer is in use. the storage check πΈsuspensionsβ how many times it's been suspended. nap count π₯stateβ the context state. it can beAMDXDNA_HWCTX_STATE_IDLEorAMDXDNA_HWCTX_STATE_ACTIVEβ vibe check, which one is it πpasidβ the PASID that's been bound π (well, it says "been bound", so, yeah π«Ά)gopsβ Giga operations per second. the flex metric πfpsβ Frames per second πdma_bandwidthβ DMA bandwidth. the pipe's width, lowkey πlatencyβ frame response latency. how fast it claps back β‘ (ok that one's from me, the manpage just says frame response latency π)frame_exec_timeβ frame execution time β±οΈtxn_op_idxβ index of the last control code executed π¦ctx_pcβ the program counterπfatal_error_typeβ the fatal error type, if the context crashes. if. if. πfatal_error_exception_typeβ the firmware exception type πfatal_error_exception_pcβ the firmware exception program counter πfatal_error_app_moduleβ the exception module name π·οΈpadβ structure pad. the padding. the filler. iconic honestly π
π SEE ALSO π
it all lives in the kernel file ./include/uapi/drm/amdxdna_accel.h, and honestly there's a whole extended universe of structs β go read all of them, bestie, iykyk:
struct amdxdna_drm_create_hwctx(9)struct amdxdna_drm_destroy_hwctx(9)struct amdxdna_cu_config(9)struct amdxdna_hwctx_param_config_cu(9)struct amdxdna_drm_config_hwctx(9)struct amdxdna_drm_va_entry(9)struct amdxdna_drm_va_tbl(9)struct amdxdna_drm_create_bo(9)struct amdxdna_drm_get_bo_info(9)struct amdxdna_drm_sync_bo(9)struct amdxdna_drm_exec_cmd(9)struct amdxdna_drm_wait_cmd(9)struct amdxdna_drm_query_aie_status(9)struct amdxdna_drm_query_aie_version(9)struct amdxdna_drm_query_aie_tile_metadata(9)struct amdxdna_drm_query_aie_metadata(9)struct amdxdna_drm_query_clock(9)struct amdxdna_drm_query_clock_metadata(9)struct amdxdna_drm_query_sensor(9)struct amdxdna_drm_query_hwctx(9)struct amdxdna_drm_get_power_mode(9)struct amdxdna_drm_query_firmware_version(9)struct amdxdna_drm_get_resource_info(9)struct amdxdna_drm_attribute_state(9)struct amdxdna_drm_query_telemetry_header(9)struct amdxdna_drm_get_info(9)struct amdxdna_async_error(9)struct amdxdna_drm_bo_usage(9)struct amdxdna_drm_get_array(9)struct amdxdna_drm_set_state(9)struct amdxdna_drm_set_power_mode(9)
fr fr that's the whole page, no skips, no summarising, we ate and left zero crumbs π
okay before i go β this cutie came out of ./include/uapi/drm and it's dated October 2026, and the page header/footer calls it struct amdxd..._hwctx_entry(9). that's the whole sign-off, mwah, go read the header file bestie π«Άβ¨πΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms