diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-02-02 09:04:45 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-02-02 09:04:45 +0100 |
| commit | 0b6ee849722002a8bc7cc5374e3136bee4be2ccd (patch) | |
| tree | 729e99b7e87d8cd298f3b62cd2b97f362b863216 /src/screen/drm/connector | |
| parent | 88aa2940b27044794d4dcb49c924a5df17cc0055 (diff) | |
screen: add frame-buffer
Diffstat (limited to 'src/screen/drm/connector')
| -rw-r--r-- | src/screen/drm/connector/mode.zig | 13 | ||||
| -rw-r--r-- | src/screen/drm/connector/root.zig | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/screen/drm/connector/mode.zig b/src/screen/drm/connector/mode.zig index 9f4dfc4..fb61b5b 100644 --- a/src/screen/drm/connector/mode.zig +++ b/src/screen/drm/connector/mode.zig @@ -9,6 +9,17 @@ pub const Mode = extern struct { total: u16, }; + const Type = packed struct(u32) { + builtin: bool, + clock_c: bool, + crtc_c: bool, + preferred: bool, + default: bool, + userdef: bool, + driver: bool, + _padding: u25, + }; + const Flags = packed struct(u32) { phsync: bool, nhsync: bool, @@ -35,7 +46,7 @@ pub const Mode = extern struct { vertical_refresh: u32, flags: Flags, - type: u32, + type: Type, name: [32]u8, pub fn frame_rate(self: *const Self) f32 { diff --git a/src/screen/drm/connector/root.zig b/src/screen/drm/connector/root.zig index 5766851..c104e84 100644 --- a/src/screen/drm/connector/root.zig +++ b/src/screen/drm/connector/root.zig @@ -2,6 +2,7 @@ const std = @import("std"); const os = std.os.linux; const Drm = @import("../request.zig").Drm; const Card = @import("../card.zig").Card; +const FrameBuffer = @import("../frame-buffer/root.zig").FrameBuffer; pub const Connection = @import("connection.zig").Connection; pub const Mode = @import("mode.zig").Mode; |