GizStack
View .mdOpen in ChatGPTOpen in Claude

gizhw:drm

The DRM requests every DRM-based accelerator of the accel class answers (drm/drm.h): the version request, which names the driver bound to a node, and the wait on a timeline syncobj. A request is an ioctl on a Handle of gizhw:device; the layouts are the kernel's.

gizlang
import * as Drm from "gizhw:drm";

Types

Driver

gizlang
type Driver = { name: string; major: i64; minor: i64; patch: i64; }

The DRM driver bound to a device: its name and version.

  • name: string
  • major: i64
  • minor: i64
  • patch: i64

Functions

versionRequest

gizlang
function versionRequest(name: u64, date: u64, desc: u64): bytes

The request for DRM_IOCTL_VERSION, with the name, date and description buffers at the given native addresses.

Effects: fail.

parseVersion

gizlang
function parseVersion(reply: bytes, name: string): Driver

The driver from the reply to the version request, with the name the buffer held.

Effects: fail.

driver

gizlang
function driver(h: Device.Handle): Driver throws string

The DRM driver bound to the device behind h.

Effects: fail, io.

timelineWaitRequest

gizlang
function timelineWaitRequest(handles: u64, points: u64): bytes

The request for the timeline wait on the syncobj handles at handles (one u32) and the point at points (one u64).

Effects: fail.

waitPoint

gizlang
function waitPoint(h: Device.Handle, syncobj: i64, point: u64): void throws string

Waits, without a timeout, until timeline syncobj syncobj reaches point.

Effects: fail, io.