summaryrefslogtreecommitdiff
path: root/Kernel/Graphics
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-09-24 16:55:46 +0300
committerLinus Groh <mail@linusgroh.de>2022-09-24 15:38:56 +0100
commitd5b97eb41e2b4d3497a07e809953456a59e09a68 (patch)
tree5a480f95dd2fbb05e212dd156f80f55c229a0333 /Kernel/Graphics
parent50ed50752f5cf0d66f8d478a006eb57a019fe954 (diff)
downloadserenity-d5b97eb41e2b4d3497a07e809953456a59e09a68.zip
Kernel+Userland: Provide bytes count for a DisplayConnector framebuffer
This value will be used later on by WindowServer to reject resolutions that will request a mapping that will overflow the hardware framebuffer max length.
Diffstat (limited to 'Kernel/Graphics')
-rw-r--r--Kernel/Graphics/DisplayConnector.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Graphics/DisplayConnector.cpp b/Kernel/Graphics/DisplayConnector.cpp
index e1bcc9de4d..1686c68545 100644
--- a/Kernel/Graphics/DisplayConnector.cpp
+++ b/Kernel/Graphics/DisplayConnector.cpp
@@ -301,12 +301,14 @@ ErrorOr<void> DisplayConnector::ioctl(OpenFileDescription&, unsigned request, Us
return {};
}
case GRAPHICS_IOCTL_GET_PROPERTIES: {
+ VERIFY(m_shared_framebuffer_vmobject);
auto user_properties = static_ptr_cast<GraphicsConnectorProperties*>(arg);
GraphicsConnectorProperties properties {};
properties.flushing_support = flush_support();
properties.doublebuffer_support = double_framebuffering_capable();
properties.partial_flushing_support = partial_flush_support();
properties.refresh_rate_support = refresh_rate_support();
+ properties.max_buffer_bytes = m_shared_framebuffer_vmobject->size();
return copy_to_user(user_properties, &properties);
}