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

Commit 6f2ce27b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: display: hdmi: vic search"

parents 678061c4 ae9aefa7
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ const struct msm_hdmi_mode_timing_info *hdmi_get_supported_mode(u32 mode)
int hdmi_get_video_id_code(struct msm_hdmi_mode_timing_info *timing_in)
{
	int i, vic = -1;
	struct msm_hdmi_mode_timing_info *supported_timing;

	if (!timing_in) {
		DEV_ERR("%s: invalid input\n", __func__);
@@ -54,8 +55,7 @@ int hdmi_get_video_id_code(struct msm_hdmi_mode_timing_info *timing_in)

	/* active_low_h, active_low_v and interlaced are not checked against */
	for (i = 0; i < HDMI_VFRMT_MAX; i++) {
		struct msm_hdmi_mode_timing_info *supported_timing =
			&hdmi_supported_video_mode_lut[i];
		supported_timing = &hdmi_supported_video_mode_lut[i];

		if (!supported_timing->supported)
			continue;
@@ -84,8 +84,24 @@ int hdmi_get_video_id_code(struct msm_hdmi_mode_timing_info *timing_in)
		break;
	}

	if (vic < 0)
		DEV_ERR("%s: timing asked is not yet supported\n", __func__);
	if (vic < 0) {
		for (i = 0; i < HDMI_VFRMT_MAX; i++) {
			supported_timing = &hdmi_supported_video_mode_lut[i];
			if (!supported_timing->supported)
				continue;
			if (timing_in->active_h != supported_timing->active_h)
				continue;
			if (timing_in->active_v != supported_timing->active_v)
				continue;
			vic = (int)supported_timing->video_format;
			break;
		}
	}

	if (vic < 0) {
		DEV_ERR("%s: timing is not supported h=%d v=%d\n",
			__func__, timing_in->active_h, timing_in->active_v);
	}

exit:
	DEV_DBG("%s: vic = %d timing = %s\n", __func__, vic,