Loading...
Searching...
No Matches
DrmKmsDevice.hpp File Reference

Direct DRM/KMS scanout — output with no compositor in the path. More...

Detailed Description

Direct DRM/KMS scanout — output with no compositor in the path.

The lowest-latency way to put a frame on a Linux display: no X11, no Wayland, no swapchain. We own the CRTC, hand the kernel a framebuffer built from a DMA-BUF, and drive page flips ourselves. That buys three things a swapchain cannot give us:

  • Flip timing we control. The vblank event carries the kernel's own completion timestamp, so a pacing policy can schedule against a real clock instead of inferring one from when a present call happened to return. Tearing (immediate) flips are available when latency beats coherence.
  • Format and modifier control. The plane's advertised format/modifier pairs are visible, so a buffer can be allocated in a layout the display engine scans out directly. A mismatch here is exactly the kind of hidden blit this whole layer exists to avoid.
  • Hardware composition. Overlay planes composite in the display engine: a static backdrop or a second source need not cost a shader pass.

Scope: this is the device/resource layer only — enumeration, modeset, framebuffer import, flip submission and vblank events. It holds no GPU API and allocates no buffers; callers bring DMA-BUFs (from GBM, from a Vulkan export, or straight from a capture device).

Enumeration works on any opened node. Everything that changes state needs DRM master, which a running compositor already holds — so on a normal desktop only the read-only half will succeed, by design rather than by accident.

Go to the source code of this file.

Classes

struct  score::gfx::drm::ModeInfo
 
struct  score::gfx::drm::ConnectorInfo
 
struct  score::gfx::drm::PlaneFormat
 
struct  score::gfx::drm::PlaneInfo
 
struct  score::gfx::drm::CrtcInfo
 
struct  score::gfx::drm::DeviceInfo
 
struct  score::gfx::drm::FramebufferDesc
 A framebuffer the kernel can scan out, built from one or more DMA-BUFs. More...
 
struct  score::gfx::drm::FlipEvent
 Result of one completed page flip, taken from the kernel's vblank event. More...
 
class  score::gfx::drm::KmsDevice
 
struct  score::gfx::drm::KmsDevice::DumbBuffer
 

Namespaces

namespace  score
 Base toolkit upon which the software is built.
 
namespace  score::gfx
 Graphics rendering pipeline for ossia score.
 

Functions

std::string score::gfx::drm::modifierName (std::uint64_t modifier)
 
std::string score::gfx::drm::fourccName (std::uint32_t fourcc)
 "AR24" etc.
 

Function Documentation

◆ modifierName()

std::string score::gfx::drm::modifierName ( std::uint64_t  modifier)

Human-readable DRM format modifier ("LINEAR", "NVIDIA(...)", "INVALID"), for harness output where a raw 64-bit code is unreadable.