Module drm

Module drm 

Source
Expand description

Get information about video

§Example

use ferrix_lib::drm::Video;
use ferrix_lib::traits::ToJson;

let video = Video::new().unwrap();
for dev in &video.devices {
    dbg!(dev);
}
let json = video.to_json().unwrap();
dbg!(json);

§EDID structure, version 1.4

From WikiPedia

BytesDescription
0-7Fixed header pattern 00 FF FF FF FF FF FF 00
8-9Manufacturer ID. “IBM”, “PHL”
10-11Manufacturer product code. 16-bit hex number, little endian. “PHL” + “C0CF”
12-15Serial number. 32 bits, little-endian
16Week of manufacture; or FF model year flag
17Year of manufacture, or year or model, if model year flag is set. Year = datavalue + 1990
18EDID version, usually 01 (for 1.3 and 1.4)
19EDID revision, usually 03 (for 1.3) or 04 (for 1.4)
20Video input parameters bitmap
21Horizontal screen size, in cm (range 1-255). If vertical screen size is 0, landscape aspect ratio (range 1.00-3.54), datavalue = (ARx100) - 99 (example: 16:9, 79; 4:3, 34.)
22Vertical screen size, in cm
23Display gamma, factory default (range 1.00 - 3.54), datavalue = (gamma x 100) - 100 = (gamma - 1) x 100. If 255, gamma is defined by DI-EXT block
24Supported features bitmap

EDID Detailed Timing Descriptor (TODO)

BytesDescription
0-1Pixel clock. 00 - reserved; otherwise in 10 kHz units (0.01 - 655.35 MHz, little-endian)
2Horizontal active pixels 8 lsbits (0-255)
3Horizontal blanking pixels 8 lsbits (0-255)
4
5Vertical active lines 8 lsbits (0-255)
6Vertical blanking lines 8 lsbits (0-255)
7
8Horizontal front porch (sync offset) pixels 8 lsbits (0-255) from blanking start
9Horizontal sync pulse width pixels 8 lsbits (0-255)
10
11
12Horizontal image size, mm, 8 lsbits (0-255 mm, 161 in)
13Vertical image size, mm, …

Structs§

DRM
Information about selected display
EDID
Information from edid file (EDID v1.4 only supported yet)
Video
Information about video devices
VideoInputParamsAnalog
VideoInputParamsDigital
Digital input

Enums§

BitDepth
Bit depth
VideoInputParams
Video input parameters bitmap
VideoInterface
Video interface (EDID data may be incorrect)