mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LibEDID: Remove head index when retrieving an EDID from DisplayConnector
We simply don't need that field anymore, as it was used when one FramebufferDevice could contain multiple framebuffers within it, each for a connected screen head.
This commit is contained in:
parent
c04b107e26
commit
50ed50752f
Notes:
sideshowbarker
2024-07-17 06:40:25 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/50ed50752f Pull-request: https://github.com/SerenityOS/serenity/pull/15340
4 changed files with 6 additions and 9 deletions
|
@ -153,7 +153,7 @@ void MonitorSettingsWidget::load_current_settings()
|
|||
for (size_t i = 0; i < m_screen_layout.screens.size(); i++) {
|
||||
String screen_display_name;
|
||||
if (m_screen_layout.screens[i].mode == WindowServer::ScreenLayout::Screen::Mode::Device) {
|
||||
if (auto edid = EDID::Parser::from_display_connector_device(m_screen_layout.screens[i].device.value(), 0); !edid.is_error()) { // TODO: multihead
|
||||
if (auto edid = EDID::Parser::from_display_connector_device(m_screen_layout.screens[i].device.value()); !edid.is_error()) { // TODO: multihead
|
||||
screen_display_name = display_name_from_edid(edid.value());
|
||||
m_screen_edids.append(edid.release_value());
|
||||
} else {
|
||||
|
|
|
@ -42,8 +42,6 @@ struct GraphicsHeadModeSetting {
|
|||
};
|
||||
|
||||
struct GraphicsHeadEDID {
|
||||
int head_index;
|
||||
|
||||
unsigned char* bytes;
|
||||
unsigned bytes_size;
|
||||
};
|
||||
|
|
|
@ -198,11 +198,10 @@ ErrorOr<Parser> Parser::from_bytes(ByteBuffer&& bytes)
|
|||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
ErrorOr<Parser> Parser::from_display_connector_device(int display_connector_fd, size_t head)
|
||||
ErrorOr<Parser> Parser::from_display_connector_device(int display_connector_fd)
|
||||
{
|
||||
RawBytes edid_bytes;
|
||||
GraphicsHeadEDID edid_info {};
|
||||
edid_info.head_index = head;
|
||||
edid_info.bytes = &edid_bytes[0];
|
||||
edid_info.bytes_size = sizeof(edid_bytes);
|
||||
if (graphics_connector_get_head_edid(display_connector_fd, &edid_info) < 0) {
|
||||
|
@ -226,7 +225,7 @@ ErrorOr<Parser> Parser::from_display_connector_device(int display_connector_fd,
|
|||
return from_bytes(move(edid_byte_buffer));
|
||||
}
|
||||
|
||||
ErrorOr<Parser> Parser::from_display_connector_device(String const& display_connector_device, size_t head)
|
||||
ErrorOr<Parser> Parser::from_display_connector_device(String const& display_connector_device)
|
||||
{
|
||||
int display_connector_fd = open(display_connector_device.characters(), O_RDWR | O_CLOEXEC);
|
||||
if (display_connector_fd < 0) {
|
||||
|
@ -236,7 +235,7 @@ ErrorOr<Parser> Parser::from_display_connector_device(String const& display_conn
|
|||
ScopeGuard fd_guard([&] {
|
||||
close(display_connector_fd);
|
||||
});
|
||||
return from_display_connector_device(display_connector_fd, head);
|
||||
return from_display_connector_device(display_connector_fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -85,8 +85,8 @@ public:
|
|||
static ErrorOr<Parser> from_bytes(ByteBuffer&&);
|
||||
|
||||
#ifndef KERNEL
|
||||
static ErrorOr<Parser> from_display_connector_device(int, size_t);
|
||||
static ErrorOr<Parser> from_display_connector_device(String const&, size_t);
|
||||
static ErrorOr<Parser> from_display_connector_device(int);
|
||||
static ErrorOr<Parser> from_display_connector_device(String const&);
|
||||
#endif
|
||||
|
||||
StringView legacy_manufacturer_id() const;
|
||||
|
|
Loading…
Reference in a new issue