STRUCT DRM_XE_QUERY_PXP_STATUS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_xe_query_pxp_status β€” or: how to ask the kernel "bestie, is PXP ready yet??"

okay so real talk, this little struct lives in the Kernel API Manual and it's literally just two __u32s whose whole entire job is to answer one question: is PXP up and running or not. That's it. That's the vibe. πŸŽ€


✨ NAME ✨

struct drm_xe_query_pxp_status β€” query if PXP is ready πŸ¦‹


🌸 SYNOPSIS 🌸

struct drm_xe_query_pxp_status {
    __u32 status;
    __u32 supported_session_types;
 };

no cap, that's the whole struct. two fields. immaculate. πŸ‘‘


πŸ’– Members πŸ’–

  • status β€” the current PXP status, i.e. the actual tea you came here for πŸ«–
  • supported_session_types β€” a bitmask of supported PXP session types ✨

πŸ”₯ Description πŸ”₯

okay so here's the deal. If PXP is enabled and no fatal error has occurred, status gets set to one of these two iconic values:

  • 0 β€” PXP init still in progress ⏳
  • 1 β€” PXP init complete, slay πŸ’…

now. if PXP is not enabled, or something has gone wrong, the query will be failed with one of these error codes β€” and yes, you need to know all of them, so pay attention bestie:

  • -ENODEV β€” PXP not supported or disabled πŸ™ˆ
  • -EIO β€” fatal error occurred during init, so PXP will never be enabled πŸ’€ (like, ever. periodt.)
  • -EINVAL β€” incorrect value provided as part of the query 😭
  • -EFAULT β€” error copying the memory between kernel and userspace πŸŒ€
lowkey important timing lore: status can only be 0 in the first few seconds after driver load. If everything works as expected, status will transition to init complete in less than 1 second, while in case of errors the driver might take longer to start returning an error code β€” but it should still take less than 10 seconds. so if you've been sitting there for a minute, something's up fr fr.

and about that bitmask: supported_session_types is based on the values in enum drm_xe_pxp_session_type. TYPE_NONE is always supported and therefore is not reported in the bitmask. so if it's not in there, don't panic β€” it's not missing, it's just built different 🧚


⭐ SEE ALSO ⭐

  • Kernel file ./include/uapi/drm/xe_drm.h πŸ“
  • Xe Device Block Diagram(9)
  • Xe uAPI Overview(9)
  • Xe IOCTL Extensions(9)
  • struct drm_xe_user_extension(9)
  • struct drm_xe_ext_set_property(9)
  • struct drm_xe_engine_class_instance(9)
  • struct drm_xe_engine(9)
  • struct drm_xe_query_engines(9)
  • enum drm_xe_memory_class(9)
  • struct drm_xe_mem_region(9)
  • struct drm_xe_query_mem_regions(9)
  • struct drm_xe_query_config(9)
  • struct drm_xe_gt(9)
  • struct drm_xe_query_gt_list(9)
  • struct drm_xe_query_topology_mask(9)
  • struct drm_xe_query_engine_cycles(9)
  • struct drm_xe_query_uc_fw_version(9)
  • struct drm_xe_device_query(9)
  • struct drm_xe_gem_create(9)
  • struct drm_xe_gem_mmap_offset(9)
  • struct drm_xe_vm_create(9)
  • struct drm_xe_vm_destroy(9)
  • struct drm_xe_vm_bind_op(9)
  • struct drm_xe_vm_bind(9)
  • struct drm_xe_vm_get_property(9)
  • struct drm_xe_exec_queue_create(9)
  • struct drm_xe_exec_queue_destroy(9)
  • struct drm_xe_exec_queue_get_property(9)
  • struct drm_xe_sync(9)
  • struct drm_xe_exec(9)
  • struct drm_xe_wait_user_fence(9)
  • enum drm_xe_observation_type(9)
  • enum drm_xe_observation_op(9)
  • struct drm_xe_observation_param(9)
  • enum drm_xe_observation_ioctls(9)
  • enum drm_xe_oa_unit_type(9)
  • struct drm_xe_oa_unit(9)
  • struct drm_xe_query_oa_units(9)
  • enum drm_xe_oa_format_type(9)
  • enum drm_xe_oa_property_id(9)
  • struct drm_xe_oa_config(9)
  • struct drm_xe_oa_stream_status(9)
  • struct drm_xe_oa_stream_info(9)
  • enum drm_xe_pxp_session_type(9)
  • enum drm_xe_eu_stall_property_id(9)
  • struct drm_xe_query_eu_stall(9)
  • struct drm_xe_madvise(9)
  • struct drm_xe_mem_range_attr(9)
  • struct drm_xe_vm_query_mem_range_attr(9)
  • struct drm_xe_exec_queue_set_property(9)
  • Xe DRM RAS(9)
  • enum drm_xe_ras_error_severity(9)
  • enum drm_xe_ras_error_component(9)

and that's the whole page bestie 🫢 this one ships out of ./include/uapi/drm in October 2026, and yeah β€” that header up top is struct drm_xe_query_pxp_status(9), same as the name, iconic of it honestly. go forth and vibe check your PXP πŸ’œπŸŒˆ

πŸ“¦ where this page comes from