Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36d28227 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar Committed by Chandan Uddaraju
Browse files

msm: mdss: edid: limit resolutions support based on interface



Limit the resolutions provided by sink to the ones supported
by the interface so that user modules do not receive the resolutions
which are not supported by the interface.

Change-Id: I63657f139cd7b058d211c306fb596ac5d80f2495
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 92618b15
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -560,7 +560,7 @@ int msm_hdmi_get_timing_info(
int hdmi_get_supported_mode(struct msm_hdmi_mode_timing_info *info,
	struct hdmi_util_ds_data *ds_data, u32 mode)
{
	int ret;
	int ret, i = 0;

	if (!info)
		return -EINVAL;
@@ -570,11 +570,25 @@ int hdmi_get_supported_mode(struct msm_hdmi_mode_timing_info *info,

	ret = msm_hdmi_get_timing_info(info, mode);

	if (!ret && ds_data && ds_data->ds_registered && ds_data->ds_max_clk) {
	if (!ret && ds_data && ds_data->ds_registered) {
		if (ds_data->ds_max_clk) {
			if (info->pixel_freq > ds_data->ds_max_clk)
				info->supported = false;
		}

		if (ds_data->modes_num) {
			u32 *modes = ds_data->modes;

			for (i = 0; i < ds_data->modes_num; i++) {
				if (info->video_format == *modes++)
					break;
			}

			if (i == ds_data->modes_num)
				info->supported = false;
		}
	}

	return ret;
} /* hdmi_get_supported_mode */

+2 −0
Original line number Diff line number Diff line
@@ -459,6 +459,8 @@ struct hdmi_tx_ddc_ctrl {
struct hdmi_util_ds_data {
	bool ds_registered;
	u32 ds_max_clk;
	u32 modes_num;
	u32 *modes;
};

static inline int hdmi_tx_get_v_total(const struct msm_hdmi_mode_timing_info *t)