Files
mac_linuxgpu/linuxu/headers
geramyloveless 60fa16d2f5 rt: an in-driver display test client
rt/display.h: probe the GPU's outputs and show a static test pattern on
them through upstream code only, as fbdev emulation does on Linux:
drm_client_init() on the primary node, drm_client_modeset_probe() for
detection, EDID modes and the preferred mode of each connected output,
drm_client_buffer_create_dumb() for an XRGB8888 framebuffer (amdgpu puts
it in CPU-visible VRAM), the pattern (colour bars with a frame, white, or
a gradient) written through the CPU view of VRAM with aligned 64-bit
stores, then drm_client_modeset_commit().

Before the commit the current configuration is recorded (each CRTC's
mode and enable/active flags, each plane's CRTC, framebuffer and
rectangles, each connector's CRTC). Turning the pattern off commits that
configuration as one new atomic state, then deletes the framebuffer and
releases the client. A duplicated drm_atomic_state is not used: it
carries amdgpu_dm's private DC context, and committing that back stale
releases DC streams and planes twice.

The client is never registered (no hotplug callbacks, never released by
upstream); rt_display_stop() releases it for a session close. Every
failure returns the failing step's errno after the recorded
configuration is committed again; no other mechanism is tried instead.
Without a display IP block every call returns -ENODEV. Nothing depends
on the connector type: all connected outputs by default, or one by name.
2026-10-03 14:07:58 -07:00
..
2026-10-03 14:07:58 -07:00