msm: mdss: hdmi: keep a default resolution for edid parser
Reset supported HDMI resolutions list to contain at least a default resolution on EDID parser initialization and on each parser call. In corner cases of EDID read or parser failures, driver should expose a default resolution to other modules to continue with the HDMI initialization. Change-Id: I75cb78577d327c0f042238e10379585111d8fd70 Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org> [cip@codeaurora.org: Resolved merge conflict] Signed-off-by: Clarence Ip <cip@codeaurora.org>
This commit is contained in:
parent
0b6af59659
commit
d69648f044
3 changed files with 12 additions and 5 deletions
|
@ -122,6 +122,7 @@ struct hdmi_edid_ctrl {
|
|||
u16 physical_address;
|
||||
u32 video_resolution; /* selected by user */
|
||||
u32 sink_mode; /* HDMI or DVI */
|
||||
u32 default_vic;
|
||||
u16 audio_latency;
|
||||
u16 video_latency;
|
||||
u32 present_3d;
|
||||
|
@ -176,6 +177,8 @@ static int hdmi_edid_reset_parser(struct hdmi_edid_ctrl *edid_ctrl)
|
|||
edid_ctrl->adb_size = 0;
|
||||
edid_ctrl->sadb_size = 0;
|
||||
|
||||
hdmi_edid_set_video_resolution(edid_ctrl, edid_ctrl->default_vic, true);
|
||||
|
||||
/* reset new resolution details */
|
||||
if (!edid_ctrl->keep_resv_timings)
|
||||
hdmi_reset_resv_timing_info();
|
||||
|
@ -2214,7 +2217,7 @@ int hdmi_edid_get_audio_blk(void *input, struct msm_hdmi_audio_edid_blk *blk)
|
|||
return 0;
|
||||
} /* hdmi_edid_get_audio_blk */
|
||||
|
||||
void hdmi_edid_set_video_resolution(void *input, u32 resolution)
|
||||
void hdmi_edid_set_video_resolution(void *input, u32 resolution, bool reset)
|
||||
{
|
||||
struct hdmi_edid_ctrl *edid_ctrl = (struct hdmi_edid_ctrl *)input;
|
||||
|
||||
|
@ -2225,7 +2228,9 @@ void hdmi_edid_set_video_resolution(void *input, u32 resolution)
|
|||
|
||||
edid_ctrl->video_resolution = resolution;
|
||||
|
||||
if (1 == edid_ctrl->sink_data.num_of_elements) {
|
||||
if (reset) {
|
||||
edid_ctrl->default_vic = resolution;
|
||||
edid_ctrl->sink_data.num_of_elements = 1;
|
||||
edid_ctrl->sink_data.disp_mode_list[0].video_format =
|
||||
resolution;
|
||||
edid_ctrl->sink_data.disp_mode_list[0].rgb_support = true;
|
||||
|
|
|
@ -36,7 +36,8 @@ bool hdmi_edid_get_sink_scrambler_support(void *input);
|
|||
bool hdmi_edid_get_scdc_support(void *input);
|
||||
int hdmi_edid_get_audio_blk(void *edid_ctrl,
|
||||
struct msm_hdmi_audio_edid_blk *blk);
|
||||
void hdmi_edid_set_video_resolution(void *edid_ctrl, u32 resolution);
|
||||
void hdmi_edid_set_video_resolution(void *edid_ctrl, u32 resolution,
|
||||
bool reset);
|
||||
void hdmi_edid_deinit(void *edid_ctrl);
|
||||
void *hdmi_edid_init(struct hdmi_edid_init_data *init_data);
|
||||
|
||||
|
|
|
@ -1431,7 +1431,7 @@ static int hdmi_tx_init_features(struct hdmi_tx_ctrl *hdmi_ctrl,
|
|||
|
||||
hdmi_edid_set_video_resolution(
|
||||
hdmi_ctrl->feature_data[HDMI_TX_FEAT_EDID],
|
||||
hdmi_ctrl->vid_cfg.vic);
|
||||
hdmi_ctrl->vid_cfg.vic, true);
|
||||
|
||||
/* Initialize HDCP features */
|
||||
res = platform_get_resource_byname(hdmi_ctrl->pdev,
|
||||
|
@ -1784,7 +1784,8 @@ static int hdmi_tx_set_video_fmt(struct hdmi_tx_ctrl *hdmi_ctrl,
|
|||
(vid_cfg->timing.pixel_freq * 1000) >> div;
|
||||
|
||||
hdmi_edid_set_video_resolution(
|
||||
hdmi_ctrl->feature_data[HDMI_TX_FEAT_EDID], vid_cfg->vic);
|
||||
hdmi_ctrl->feature_data[HDMI_TX_FEAT_EDID],
|
||||
vid_cfg->vic, false);
|
||||
|
||||
return res_changed;
|
||||
} /* hdmi_tx_set_video_fmt */
|
||||
|
|
Loading…
Add table
Reference in a new issue