1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:07:45 +00:00

LibEDID: Add a library to parse EDID blobs

This library can be used (for the most part) by kernel drivers as well
as user mode. For this reason FixedPoint is used rather than floating
point, but kept to a minimum.
This commit is contained in:
Tom 2021-12-26 22:19:55 -07:00 committed by Linus Groh
parent c468a9cc2d
commit 8184870f93
11 changed files with 2519 additions and 0 deletions

View file

@ -0,0 +1,42 @@
/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/FixedPoint.h>
#include <AK/Optional.h>
#include <AK/Types.h>
namespace EDID {
class VIC final {
public:
struct Details {
enum class ScanType : u8 {
NonInterlaced,
Interlaced
};
enum class AspectRatio : u8 {
AR_4_3,
AR_16_9,
AR_64_27,
AR_256_135,
};
u8 vic_id;
u16 horizontal_pixels;
u16 vertical_lines;
u32 refresh_rate_millihz;
ScanType scan_type;
AspectRatio aspect_ratio;
FixedPoint<16, u32> refresh_rate_hz() const;
};
static Details const* find_details_by_vic_id(u8);
};
}