Kernel/Graphics: Return ENODEV if there's no valid EDID to return

ENODEV better represents the fact that there might be no display device
(e.g. a monitor) connected to the connector, therefore we should return
this error.
Another reason to not use ENOTIMPL is that it's a requirement for all
DisplayConnectors to put a valid EDID in place even for a hardware we
don't currently support mode-setting in runtime.
This commit is contained in:
Liav A 2022-06-04 03:05:36 +03:00 committed by Andrew Kaster
parent b2da5d3e62
commit 9eab59c42b
Notes: sideshowbarker 2024-07-17 00:23:42 +09:00

View file

@ -268,7 +268,7 @@ DisplayConnector::ModeSetting DisplayConnector::current_mode_setting() const
ErrorOr<ByteBuffer> DisplayConnector::get_edid() const
{
if (!m_edid_valid)
return Error::from_errno(ENOTIMPL);
return Error::from_errno(ENODEV);
return ByteBuffer::copy(m_edid_bytes, sizeof(m_edid_bytes));
}