STRUCT AMDXDNA_DRM_HWCTX_ENTRY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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 be AMDXDNA_HWCTX_STATE_IDLE or AMDXDNA_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