STRUCT DRM_ASAHI_PARAMS_GLOBAL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_a...arams_global(9) β€” Global parameters πŸ’–

okay so bestie πŸ’… you're in the Kernel API Manual, and this page is all about struct drm_asahi_params_global. The header up top is serving truncated struct drm_a...arams_global(9) realness β€” mysterious, cunty, a little chaotic β€” but we move. This struct is basically the global parameter info dump, and it's lowkey important. ✨


🌸 NAME 🌸

struct drm_asahi_params_global β€” Global parameters. no cap, that's the vibe. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

struct drm_asahi_params_global {
    __u64 features;
    __u32 gpu_generation;
    __u32 gpu_variant;
    __u32 gpu_revision;
    __u32 chip_id;
    __u32 num_dies;
    __u32 num_clusters_total;
    __u32 num_cores_per_cluster;
    __u32 max_frequency_khz;
    __u64 core_masks[DRM_ASAHI_MAX_CLUSTERS];
    __u64 vm_start;
    __u64 vm_end;
    __u64 vm_kernel_min_size;
    __u32 max_commands_per_submission;
    __u32 max_attachments;
    __u64 command_timestamp_frequency_hz;
};

🫢 Members 🫢

  • features β€” Feature bits from drm_asahi_feature ✨
  • gpu_generation β€” GPU generation, e.g. 13 for G13G πŸ‘‘
  • gpu_variant β€” GPU variant as a character, e.g. 'C' for G13C πŸŽ€
  • gpu_revision β€” GPU revision in BCD, e.g. 0x00 for 'A0' or 0x21 for 'C1' πŸ¦‹
  • chip_id β€” Chip ID in BCD, e.g. 0x8103 for T8103 🌸
  • num_dies β€” Number of dies in the SoC 🧚
  • num_clusters_total β€” Number of GPU clusters (across all dies) πŸ’œ
  • num_cores_per_cluster β€” Number of logical cores per cluster (including inactive/nonexistent) 😭
  • max_frequency_khz β€” Maximum GPU core clock frequency πŸ”₯
  • core_masks β€” Bitmask of present/enabled cores per cluster ⭐
  • vm_start β€” VM range start VMA. Together with vm_end, this defines the window of valid GPU VAs. Userspace is expected to subdivide VAs out of this window. πŸ‘‘

This window contains all virtual addresses that userspace needs to know about. There may be kernel-internal GPU VAs outside this range, but that detail is not relevant here. πŸ’…

  • vm_end β€” VM range end VMA 🌈
  • vm_kernel_min_size β€” Minimum kernel VMA window size. 🫢

When creating a VM, userspace is required to carve out a section of virtual addresses (within the range given by vm_start and vm_end). The kernel will allocate various internal structures within the specified VA range. ✨

Allowing userspace to choose the VA range for the kernel, rather than the kernel reserving VAs and requiring userspace to cope, can assist in implementing SVM. πŸ’–

  • max_commands_per_submission β€” Maximum number of supported commands per submission. This mirrors firmware limits. Userspace must split up larger command buffers, which may require inserting additional synchronization. ⚑
  • max_attachments β€” Maximum number of drm_asahi_attachment's per command πŸŽ€
  • command_timestamp_frequency_hz β€” Timebase frequency for timestamps written during command execution, specified via drm_asahi_timestamp structures. As this rate is controlled by the firmware, it is a queryable parameter. πŸ•°οΈ

Userspace must divide by this frequency to convert timestamps to seconds, rather than hardcoding a particular firmware's rate. no shortcuts, bestie πŸ’€

πŸ“ Description πŸ“

This struct may be queried by drm_asahi_get_params. That's the whole description β€” short, sweet, and slay. πŸ¦‹

πŸ‘€ SEE ALSO πŸ‘€

okay bestie, here's the whole friend group, no one left out:

  • Kernel file ./include/uapi/drm/asahi_drm.h
  • Introduction to the Asahi UAPI(9)
  • enum drm_asahi_ioctl_id(9)
  • enum drm_asahi_feature(9)
  • struct drm_asahi_get_params(9)
  • struct drm_asahi_vm_create(9)
  • struct drm_asahi_vm_destroy(9)
  • enum drm_asahi_gem_flags(9)
  • struct drm_asahi_gem_create(9)
  • struct drm_asahi_gem_mmap_offset(9)
  • enum drm_asahi_bind_flags(9)
  • struct drm_asahi_gem_bind_op(9)
  • struct drm_asahi_vm_bind(9)
  • enum drm_asahi_bind_object_op(9)
  • enum drm_asahi_bind_object_flags(9)
  • struct drm_asahi_gem_bind_object(9)
  • enum drm_asahi_cmd_type(9)
  • enum drm_asahi_priority(9)
  • struct drm_asahi_queue_create(9)
  • struct drm_asahi_queue_destroy(9)
  • enum drm_asahi_sync_type(9)
  • struct drm_asahi_sync(9)
  • DRM_ASAHI_BARRIER_NONE(9)
  • struct drm_asahi_cmd_header(9)
  • struct drm_asahi_submit(9)
  • struct drm_asahi_attachment(9)
  • struct drm_asahi_zls_buffer(9)
  • struct drm_asahi_timestamp(9)
  • struct drm_asahi_timestamps(9)
  • struct drm_asahi_helper_program(9)
  • struct drm_asahi_bg_eot(9)
  • struct drm_asahi_cmd_render(9)
  • struct drm_asahi_cmd_compute(9)
  • struct drm_asahi_get_time(9)
  • DRM_IOCTL_ASAHI(9)

okay that's the page πŸ’– this was struct drm_a...arams_global(9) from the Kernel API Manual, source ./include/uapi/drm, dated October 2026. bye bestie, go query some params responsibly 🫢✨

πŸ“¦ where this page comes from