summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-06-04 03:05:36 +0300
committerAndrew Kaster <andrewdkaster@gmail.com>2023-02-19 15:01:01 -0700
commit9eab59c42b2662075a3eab13fe7aebf23e0c8234 (patch)
tree72855caecbbf738361cacac7f7f9f1d2f8d9bf2f
parentb2da5d3e62d4e800a0fbb47537e6b613c89a26b8 (diff)
downloadserenity-9eab59c42b2662075a3eab13fe7aebf23e0c8234.zip
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.
-rw-r--r--Kernel/Graphics/DisplayConnector.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Graphics/DisplayConnector.cpp b/Kernel/Graphics/DisplayConnector.cpp
index b3516d7fe4..8e96853e17 100644
--- a/Kernel/Graphics/DisplayConnector.cpp
+++ b/Kernel/Graphics/DisplayConnector.cpp
@@ -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));
}