msm: hdmi: edid: add API to override edid configuration
Add a new API to override the EDID configuration. This will allow clients to specify a particular resolution to be used for subsequent connections. CRs-Fixed: 1109812 Change-Id: Ie08ed509dd563bf265b32a2bfece86352b4e2b68 Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
This commit is contained in:
parent
bc176f3364
commit
9be29e6aaa
2 changed files with 42 additions and 8 deletions
|
@ -122,13 +122,6 @@ struct hdmi_edid_sink_caps {
|
|||
bool ind_view_support;
|
||||
};
|
||||
|
||||
struct hdmi_edid_override_data {
|
||||
int scramble;
|
||||
int sink_mode;
|
||||
int format;
|
||||
int vic;
|
||||
};
|
||||
|
||||
struct hdmi_edid_ctrl {
|
||||
u8 pt_scan_info;
|
||||
u8 it_scan_info;
|
||||
|
@ -2597,6 +2590,31 @@ void hdmi_edid_set_video_resolution(void *input, u32 resolution, bool reset)
|
|||
}
|
||||
} /* hdmi_edid_set_video_resolution */
|
||||
|
||||
void hdmi_edid_config_override(void *input, bool enable,
|
||||
struct hdmi_edid_override_data *data)
|
||||
{
|
||||
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
|
||||
struct hdmi_edid_override_data *ov_data = &edid_ctrl->override_data;
|
||||
|
||||
if ((!edid_ctrl) || (enable && !data)) {
|
||||
DEV_ERR("%s: invalid input\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
edid_ctrl->edid_override = enable;
|
||||
pr_debug("EDID override %s\n", enable ? "enabled" : "disabled");
|
||||
|
||||
if (enable) {
|
||||
ov_data->scramble = data->scramble;
|
||||
ov_data->sink_mode = data->sink_mode;
|
||||
ov_data->format = data->format;
|
||||
ov_data->vic = data->vic;
|
||||
pr_debug("%s: Override data: scramble=%d sink_mode=%d format=%d vic=%d\n",
|
||||
__func__, ov_data->scramble, ov_data->sink_mode,
|
||||
ov_data->format, ov_data->vic);
|
||||
}
|
||||
}
|
||||
|
||||
void hdmi_edid_deinit(void *input)
|
||||
{
|
||||
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -44,6 +44,20 @@ struct hdmi_edid_hdr_data {
|
|||
u32 min_luminance;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct hdmi_override_data - Resolution Override Data
|
||||
* @scramble - scrambler enable
|
||||
* @sink_mode - 0 for DVI and 1 for HDMI
|
||||
* @format - pixel format (refer to msm_hdmi_modes.h)
|
||||
* @vic - resolution code
|
||||
*/
|
||||
struct hdmi_edid_override_data {
|
||||
int scramble;
|
||||
int sink_mode;
|
||||
int format;
|
||||
int vic;
|
||||
};
|
||||
|
||||
int hdmi_edid_parser(void *edid_ctrl);
|
||||
u32 hdmi_edid_get_raw_data(void *edid_ctrl, u8 *buf, u32 size);
|
||||
u8 hdmi_edid_get_sink_scaninfo(void *edid_ctrl, u32 resolution);
|
||||
|
@ -63,5 +77,7 @@ u8 hdmi_edid_get_deep_color(void *edid_ctrl);
|
|||
u32 hdmi_edid_get_max_pclk(void *edid_ctrl);
|
||||
void hdmi_edid_get_hdr_data(void *edid_ctrl,
|
||||
struct hdmi_edid_hdr_data **hdr_data);
|
||||
void hdmi_edid_config_override(void *input, bool enable,
|
||||
struct hdmi_edid_override_data *data);
|
||||
|
||||
#endif /* __HDMI_EDID_H__ */
|
||||
|
|
Loading…
Add table
Reference in a new issue