1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

Kernel: Add ioctl to get the EDID from a framebuffer

This commit is contained in:
Tom 2021-12-31 22:02:55 -07:00 committed by Linus Groh
parent 8184870f93
commit 03c45b1865
20 changed files with 265 additions and 84 deletions

View file

@ -140,6 +140,15 @@ ErrorOr<void> FramebufferDevice::flush_rectangle(size_t buffer_index, FBRect con
return {};
}
ErrorOr<ByteBuffer> FramebufferDevice::get_edid(size_t head) const
{
// Note: This FramebufferDevice class doesn't support multihead setup.
// We take care to verify this at the GenericFramebufferDevice::ioctl method
// so if we happen to accidentally have a value different than 0, assert.
VERIFY(head == 0);
return adapter()->get_edid(m_scanout.value());
}
FramebufferDevice::FramebufferDevice(GraphicsAdapter const& adapter, ScanoutID scanout)
: GenericFramebufferDevice(adapter)
, m_scanout(scanout)