diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-02-07 20:39:58 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-02-07 20:39:58 +0100 |
| commit | dae5bc02b1c934075e95694953b4330676e21611 (patch) | |
| tree | faa1a80849e5642d0b4bd8b4a91331b1da5b75bf /src/screen/drm/connector/root.zig | |
| parent | fef523a8d7c87f272de18c8abd57e0cc53e2ef40 (diff) | |
estd: add graphics module
Diffstat (limited to 'src/screen/drm/connector/root.zig')
| -rw-r--r-- | src/screen/drm/connector/root.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/screen/drm/connector/root.zig b/src/screen/drm/connector/root.zig index 64686b9..3628817 100644 --- a/src/screen/drm/connector/root.zig +++ b/src/screen/drm/connector/root.zig @@ -9,7 +9,7 @@ pub const Connector = struct { const Self = @This(); - card: *drm.Card, + card: drm.Card, encoder_ids: []u32, modes: []Mode, @@ -25,7 +25,7 @@ pub const Connector = struct { subpixel: u32, pad: u32, - pub fn raw_without_ids(card: *drm.Card, id: u32) !drm.request.Connector { + pub fn raw_without_ids(card: drm.Card, id: u32) !drm.request.Connector { var result = std.mem.zeroInit(drm.request.Connector, .{ .id = id }); try card.request(.get_connector, &result); return result; @@ -34,7 +34,7 @@ pub const Connector = struct { // NOTE: This function does not take in account // that there might be some hot-plugging going // on. This might have to change in the future. - pub fn init(card: *drm.Card, id: u32) !Self { + pub fn init(card: drm.Card, id: u32) !Self { var raw = try Self.raw_without_ids(card, id); const resources = .{ .encoder_ids = try card.allocator.alloc(u32, raw.count_encoders), @@ -76,7 +76,7 @@ pub const Connector = struct { pub fn compatible_crtc(self: *Self) ?usize { for (self.encoder_ids) |encoder_id| { - var encoder = self.card.encoder(encoder_id) catch continue; + var encoder = drm.Encoder.init(self.card, encoder_id) catch continue; defer encoder.deinit(); for (0..32) |index| { |