edid: Remove all unnecessary EDID parameters parsing
This commit retains only necessary EDID parameters while eliminating redundant EDID parsing in mutter Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2597 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2825>
This commit is contained in:
@ -30,39 +30,8 @@
|
||||
#include "core/util-private.h"
|
||||
|
||||
typedef struct _MetaEdidInfo MetaEdidInfo;
|
||||
typedef struct _MetaEdidTiming MetaEdidTiming;
|
||||
typedef struct _MetaEdidDetailedTiming MetaEdidDetailedTiming;
|
||||
typedef struct _MetaEdidHdrStaticMetadata MetaEdidHdrStaticMetadata;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_EDID_INTERFACE_UNDEFINED,
|
||||
META_EDID_INTERFACE_DVI,
|
||||
META_EDID_INTERFACE_HDMI_A,
|
||||
META_EDID_INTERFACE_HDMI_B,
|
||||
META_EDID_INTERFACE_MDDI,
|
||||
META_EDID_INTERFACE_DISPLAY_PORT
|
||||
} MetaEdidInterface;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_EDID_COLOR_TYPE_UNDEFINED,
|
||||
META_EDID_COLOR_TYPE_MONOCHROME,
|
||||
META_EDID_COLOR_TYPE_RGB,
|
||||
META_EDID_COLOR_TYPE_OTHER_COLOR
|
||||
} MetaEdidColorType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_EDID_STEREO_TYPE_NO_STEREO,
|
||||
META_EDID_STEREO_TYPE_FIELD_RIGHT,
|
||||
META_EDID_STEREO_TYPE_FIELD_LEFT,
|
||||
META_EDID_STEREO_TYPE_TWO_WAY_RIGHT_ON_EVEN,
|
||||
META_EDID_STEREO_TYPE_TWO_WAY_LEFT_ON_EVEN,
|
||||
META_EDID_STEREO_TYPE_FOUR_WAY_INTERLEAVED,
|
||||
META_EDID_STEREO_TYPE_SIDE_BY_SIDE
|
||||
} MetaEdidStereoType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_EDID_COLORIMETRY_XVYCC601 = (1 << 0),
|
||||
@ -90,51 +59,6 @@ typedef enum
|
||||
META_EDID_STATIC_METADATA_TYPE1 = 0,
|
||||
} MetaEdidStaticMetadataType;
|
||||
|
||||
struct _MetaEdidTiming
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
int frequency;
|
||||
};
|
||||
|
||||
struct _MetaEdidDetailedTiming
|
||||
{
|
||||
int pixel_clock;
|
||||
int h_addr;
|
||||
int h_blank;
|
||||
int h_sync;
|
||||
int h_front_porch;
|
||||
int v_addr;
|
||||
int v_blank;
|
||||
int v_sync;
|
||||
int v_front_porch;
|
||||
int width_mm;
|
||||
int height_mm;
|
||||
int right_border;
|
||||
int top_border;
|
||||
int interlaced;
|
||||
MetaEdidStereoType stereo;
|
||||
|
||||
int digital_sync;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
int bipolar;
|
||||
int serrations;
|
||||
int sync_on_green;
|
||||
} analog;
|
||||
|
||||
struct
|
||||
{
|
||||
int composite;
|
||||
int serrations;
|
||||
int negative_vsync;
|
||||
int negative_hsync;
|
||||
} digital;
|
||||
} connector;
|
||||
};
|
||||
|
||||
struct _MetaEdidHdrStaticMetadata
|
||||
{
|
||||
int available;
|
||||
@ -147,86 +71,25 @@ struct _MetaEdidHdrStaticMetadata
|
||||
|
||||
struct _MetaEdidInfo
|
||||
{
|
||||
int checksum;
|
||||
char manufacturer_code[4];
|
||||
int product_code;
|
||||
unsigned int serial_number;
|
||||
char manufacturer_code[4];
|
||||
int product_code;
|
||||
unsigned int serial_number;
|
||||
|
||||
int production_week; /* -1 if not specified */
|
||||
int production_year; /* -1 if not specified */
|
||||
int model_year; /* -1 if not specified */
|
||||
double gamma; /* -1.0 if not specified */
|
||||
|
||||
int major_version;
|
||||
int minor_version;
|
||||
|
||||
int is_digital;
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
int bits_per_primary;
|
||||
MetaEdidInterface interface;
|
||||
int rgb444;
|
||||
int ycrcb444;
|
||||
int ycrcb422;
|
||||
} digital;
|
||||
|
||||
struct
|
||||
{
|
||||
double video_signal_level;
|
||||
double sync_signal_level;
|
||||
double total_signal_level;
|
||||
|
||||
int blank_to_black;
|
||||
|
||||
int separate_hv_sync;
|
||||
int composite_sync_on_h;
|
||||
int composite_sync_on_green;
|
||||
int serration_on_vsync;
|
||||
MetaEdidColorType color_type;
|
||||
} analog;
|
||||
} connector;
|
||||
|
||||
int width_mm; /* -1 if not specified */
|
||||
int height_mm; /* -1 if not specified */
|
||||
double aspect_ratio; /* -1.0 if not specififed */
|
||||
|
||||
double gamma; /* -1.0 if not specified */
|
||||
|
||||
int standby;
|
||||
int suspend;
|
||||
int active_off;
|
||||
|
||||
int srgb_is_standard;
|
||||
int preferred_timing_includes_native;
|
||||
int continuous_frequency;
|
||||
|
||||
double red_x;
|
||||
double red_y;
|
||||
double green_x;
|
||||
double green_y;
|
||||
double blue_x;
|
||||
double blue_y;
|
||||
double white_x;
|
||||
double white_y;
|
||||
|
||||
MetaEdidTiming established[24]; /* Terminated by 0x0x0 */
|
||||
MetaEdidTiming standard[8];
|
||||
|
||||
int n_detailed_timings;
|
||||
MetaEdidDetailedTiming detailed_timings[4]; /* If monitor has a preferred
|
||||
* mode, it is the first one
|
||||
* (whether it has, is
|
||||
* determined by the
|
||||
* preferred_timing_includes
|
||||
* bit.
|
||||
*/
|
||||
double red_x;
|
||||
double red_y;
|
||||
double green_x;
|
||||
double green_y;
|
||||
double blue_x;
|
||||
double blue_y;
|
||||
double white_x;
|
||||
double white_y;
|
||||
|
||||
/* Optional product description */
|
||||
char dsc_serial_number[14];
|
||||
char dsc_product_name[14];
|
||||
char dsc_string[14]; /* Unspecified ASCII data */
|
||||
char dsc_serial_number[14];
|
||||
char dsc_product_name[14];
|
||||
char dsc_string[14]; /* Unspecified ASCII data */
|
||||
|
||||
MetaEdidColorimetry colorimetry;
|
||||
MetaEdidHdrStaticMetadata hdr_static_metadata;
|
||||
|
Reference in New Issue
Block a user