#ifndef __DRM_EDID_H__
#define __DRM_EDID_H__
#include <linux/types.h>
enum hdmi_quantization_range;
struct drm_connector;
struct drm_device;
struct drm_display_mode;
struct drm_edid;
struct drm_printer;
struct hdmi_avi_infoframe;
struct hdmi_vendor_infoframe;
struct i2c_adapter;
#define EDID_LENGTH …
#define DDC_ADDR …
#define DDC_ADDR2 …
#define CEA_EXT …
#define VTB_EXT …
#define DI_EXT …
#define LS_EXT …
#define MI_EXT …
#define DISPLAYID_EXT …
struct est_timings { … } __packed;
#define EDID_TIMING_ASPECT_SHIFT …
#define EDID_TIMING_ASPECT_MASK …
#define EDID_TIMING_VFREQ_SHIFT …
#define EDID_TIMING_VFREQ_MASK …
struct std_timing { … } __packed;
#define DRM_EDID_PT_HSYNC_POSITIVE …
#define DRM_EDID_PT_VSYNC_POSITIVE …
#define DRM_EDID_PT_SEPARATE_SYNC …
#define DRM_EDID_PT_STEREO …
#define DRM_EDID_PT_INTERLACED …
struct detailed_pixel_timing { … } __packed;
struct detailed_data_string { … } __packed;
#define DRM_EDID_RANGE_OFFSET_MIN_VFREQ …
#define DRM_EDID_RANGE_OFFSET_MAX_VFREQ …
#define DRM_EDID_RANGE_OFFSET_MIN_HFREQ …
#define DRM_EDID_RANGE_OFFSET_MAX_HFREQ …
#define DRM_EDID_DEFAULT_GTF_SUPPORT_FLAG …
#define DRM_EDID_RANGE_LIMITS_ONLY_FLAG …
#define DRM_EDID_SECONDARY_GTF_SUPPORT_FLAG …
#define DRM_EDID_CVT_SUPPORT_FLAG …
#define DRM_EDID_CVT_FLAGS_STANDARD_BLANKING …
#define DRM_EDID_CVT_FLAGS_REDUCED_BLANKING …
struct detailed_data_monitor_range { … } __packed;
struct detailed_data_wpindex { … } __packed;
struct detailed_data_color_point { … } __packed;
struct cvt_timing { … } __packed;
struct detailed_non_pixel { … } __packed;
#define EDID_DETAIL_EST_TIMINGS …
#define EDID_DETAIL_CVT_3BYTE …
#define EDID_DETAIL_COLOR_MGMT_DATA …
#define EDID_DETAIL_STD_MODES …
#define EDID_DETAIL_MONITOR_CPDATA …
#define EDID_DETAIL_MONITOR_NAME …
#define EDID_DETAIL_MONITOR_RANGE …
#define EDID_DETAIL_MONITOR_STRING …
#define EDID_DETAIL_MONITOR_SERIAL …
struct detailed_timing { … } __packed;
#define DRM_EDID_INPUT_SERRATION_VSYNC …
#define DRM_EDID_INPUT_SYNC_ON_GREEN …
#define DRM_EDID_INPUT_COMPOSITE_SYNC …
#define DRM_EDID_INPUT_SEPARATE_SYNCS …
#define DRM_EDID_INPUT_BLANK_TO_BLACK …
#define DRM_EDID_INPUT_VIDEO_LEVEL …
#define DRM_EDID_INPUT_DIGITAL …
#define DRM_EDID_DIGITAL_DEPTH_MASK …
#define DRM_EDID_DIGITAL_DEPTH_UNDEF …
#define DRM_EDID_DIGITAL_DEPTH_6 …
#define DRM_EDID_DIGITAL_DEPTH_8 …
#define DRM_EDID_DIGITAL_DEPTH_10 …
#define DRM_EDID_DIGITAL_DEPTH_12 …
#define DRM_EDID_DIGITAL_DEPTH_14 …
#define DRM_EDID_DIGITAL_DEPTH_16 …
#define DRM_EDID_DIGITAL_DEPTH_RSVD …
#define DRM_EDID_DIGITAL_TYPE_MASK …
#define DRM_EDID_DIGITAL_TYPE_UNDEF …
#define DRM_EDID_DIGITAL_TYPE_DVI …
#define DRM_EDID_DIGITAL_TYPE_HDMI_A …
#define DRM_EDID_DIGITAL_TYPE_HDMI_B …
#define DRM_EDID_DIGITAL_TYPE_MDDI …
#define DRM_EDID_DIGITAL_TYPE_DP …
#define DRM_EDID_DIGITAL_DFP_1_X …
#define DRM_EDID_FEATURE_DEFAULT_GTF …
#define DRM_EDID_FEATURE_CONTINUOUS_FREQ …
#define DRM_EDID_FEATURE_PREFERRED_TIMING …
#define DRM_EDID_FEATURE_STANDARD_COLOR …
#define DRM_EDID_FEATURE_DISPLAY_TYPE …
#define DRM_EDID_FEATURE_COLOR_MASK …
#define DRM_EDID_FEATURE_RGB …
#define DRM_EDID_FEATURE_RGB_YCRCB444 …
#define DRM_EDID_FEATURE_RGB_YCRCB422 …
#define DRM_EDID_FEATURE_RGB_YCRCB …
#define DRM_EDID_FEATURE_PM_ACTIVE_OFF …
#define DRM_EDID_FEATURE_PM_SUSPEND …
#define DRM_EDID_FEATURE_PM_STANDBY …
#define DRM_EDID_HDMI_DC_48 …
#define DRM_EDID_HDMI_DC_36 …
#define DRM_EDID_HDMI_DC_30 …
#define DRM_EDID_HDMI_DC_Y444 …
#define DRM_EDID_YCBCR420_DC_48 …
#define DRM_EDID_YCBCR420_DC_36 …
#define DRM_EDID_YCBCR420_DC_30 …
#define DRM_EDID_YCBCR420_DC_MASK …
#define DRM_EDID_MAX_FRL_RATE_MASK …
#define DRM_EDID_FAPA_START_LOCATION …
#define DRM_EDID_ALLM …
#define DRM_EDID_FVA …
#define DRM_EDID_DC_30BIT_420 …
#define DRM_EDID_DC_36BIT_420 …
#define DRM_EDID_DC_48BIT_420 …
#define DRM_EDID_CNMVRR …
#define DRM_EDID_CINEMA_VRR …
#define DRM_EDID_MDELTA …
#define DRM_EDID_VRR_MAX_UPPER_MASK …
#define DRM_EDID_VRR_MAX_LOWER_MASK …
#define DRM_EDID_VRR_MIN_MASK …
#define DRM_EDID_DSC_10BPC …
#define DRM_EDID_DSC_12BPC …
#define DRM_EDID_DSC_16BPC …
#define DRM_EDID_DSC_ALL_BPP …
#define DRM_EDID_DSC_NATIVE_420 …
#define DRM_EDID_DSC_1P2 …
#define DRM_EDID_DSC_MAX_FRL_RATE_MASK …
#define DRM_EDID_DSC_MAX_SLICES …
#define DRM_EDID_DSC_TOTAL_CHUNK_KBYTES …
struct drm_edid_product_id { … } __packed;
struct edid { … } __packed;
struct drm_edid_ident { … };
#define EDID_PRODUCT_ID(e) …
struct cea_sad { … };
int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads);
int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb);
int drm_av_sync_delay(struct drm_connector *connector,
const struct drm_display_mode *mode);
int
drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
const struct drm_connector *connector,
const struct drm_display_mode *mode);
int
drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame,
const struct drm_connector *connector,
const struct drm_display_mode *mode);
void
drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
const struct drm_connector *connector,
const struct drm_display_mode *mode,
enum hdmi_quantization_range rgb_quant_range);
static inline const char *drm_edid_decode_mfg_id(u16 mfg_id, char vend[4])
{ … }
#define drm_edid_encode_panel_id(vend_chr_0, vend_chr_1, vend_chr_2, product_id) …
static inline void drm_edid_decode_panel_id(u32 panel_id, char vend[4], u16 *product_id)
{ … }
bool drm_probe_ddc(struct i2c_adapter *adapter);
struct edid *drm_get_edid(struct drm_connector *connector,
struct i2c_adapter *adapter);
struct edid *drm_get_edid_switcheroo(struct drm_connector *connector,
struct i2c_adapter *adapter);
struct edid *drm_edid_duplicate(const struct edid *edid);
int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
int drm_edid_override_connector_update(struct drm_connector *connector);
u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
bool drm_detect_hdmi_monitor(const struct edid *edid);
bool drm_detect_monitor_audio(const struct edid *edid);
enum hdmi_quantization_range
drm_default_rgb_quant_range(const struct drm_display_mode *mode);
int drm_add_modes_noedid(struct drm_connector *connector,
int hdisplay, int vdisplay);
int drm_edid_header_is_valid(const void *edid);
bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
bool *edid_corrupt);
bool drm_edid_is_valid(struct edid *edid);
void drm_edid_get_monitor_name(const struct edid *edid, char *name,
int buflen);
struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
int hsize, int vsize, int fresh,
bool rb);
struct drm_display_mode *
drm_display_mode_from_cea_vic(struct drm_device *dev,
u8 video_code);
const struct drm_edid *drm_edid_alloc(const void *edid, size_t size);
const struct drm_edid *drm_edid_dup(const struct drm_edid *drm_edid);
void drm_edid_free(const struct drm_edid *drm_edid);
bool drm_edid_valid(const struct drm_edid *drm_edid);
const struct edid *drm_edid_raw(const struct drm_edid *drm_edid);
const struct drm_edid *drm_edid_read(struct drm_connector *connector);
const struct drm_edid *drm_edid_read_ddc(struct drm_connector *connector,
struct i2c_adapter *adapter);
const struct drm_edid *drm_edid_read_custom(struct drm_connector *connector,
int (*read_block)(void *context, u8 *buf, unsigned int block, size_t len),
void *context);
const struct drm_edid *drm_edid_read_base_block(struct i2c_adapter *adapter);
const struct drm_edid *drm_edid_read_switcheroo(struct drm_connector *connector,
struct i2c_adapter *adapter);
int drm_edid_connector_update(struct drm_connector *connector,
const struct drm_edid *edid);
int drm_edid_connector_add_modes(struct drm_connector *connector);
bool drm_edid_is_digital(const struct drm_edid *drm_edid);
void drm_edid_get_product_id(const struct drm_edid *drm_edid,
struct drm_edid_product_id *id);
void drm_edid_print_product_id(struct drm_printer *p,
const struct drm_edid_product_id *id, bool raw);
u32 drm_edid_get_panel_id(const struct drm_edid *drm_edid);
bool drm_edid_match(const struct drm_edid *drm_edid,
const struct drm_edid_ident *ident);
#endif