Exemple #1
0
/*
 * decode_video_data_block()
 */
static void decode_video_data_block(unsigned char *e, int n, edid_info_t *edid)
{
	int vic, j, i = 0;

	LOG_PRINT(LOG_LEVEL_DETAIL, "[video data block]\n");

	while (n-- > 0) {
		vic = *e & 0x7F;
		LOG_PRINT(LOG_LEVEL_DETAIL,
			 "- mode #%d %s\n", vic, (*e & 0x80) ? "native" : "");

		if ((j =
		     find_timing_by_vic_tp(edid->ref_timings,
					   edid->num_ref_timings, vic)) != -1) {
			add_timings(edid, edid->ref_timings[j], ++i);

			 /* Handle native mode */
			if (*e & 0x80) {
				edid->native_idx =
				    find_timing(edid->timings,
						edid->num_timings,
						edid->ref_timings[j]);
			}
		}
		e++;
	}
}
Exemple #2
0
/*
 * Addition of 3D timing via 2D mode
 */
static void add_3d_mode_via_2d(unsigned int vic, unsigned int struc_3d,
						edid_info_t *edid)
{
	unsigned int j, k, num_timings = edid->num_timings;
	otm_hdmi_timing_t t;

	struct {
		unsigned int struc;
		unsigned int type;
	} details_3d[] = {
		{
		0x00, OTM_HDMI_STEREO_FRAME_PACKING_2}, {
		0x00, OTM_HDMI_STEREO_FRAME_PACKING}, {
		0x06, OTM_HDMI_STEREO_TOP_BOTTOM_HALF_2}, {
	0x08, OTM_HDMI_STEREO_SIDE_BY_SIDE_HALF_2},};

	/* Look for an entry with given order among all decoded 2D timings */
	for (j = 0; j < num_timings; j++) {
		if (edid->order[j] == vic) {
			/*
			 * Create all required 3D variations for given
			 * 2D mode
			 */
			for (k = 0;
			     k < sizeof(details_3d) / sizeof(*details_3d);
			     k++) {
				if (details_3d[k].struc == struc_3d) {
					t = edid->timings[j];
					t.stereo_type = details_3d[k].type;
					add_timings(edid, &t, 0);
				}
			}

			/* Entry of given order was found so start looking for
			 * new one
			 */
			break;
		}
	}
}
Exemple #3
0
static void declare_mandatory_3d(edid_info_t *edid)
{
	if (true) {
		add_timings(edid, &MODE_1920x1080p24__FP2, 0);
		add_timings(edid, &MODE_1920x1080p24__FP, 0);
		add_timings(edid, &MODE_1920x1080p24__TBH2, 0);
	}

	if (edid->supports_60Hz) {
		add_timings(edid, &MODE_1280x720p5994_60__FP2, 0);
		add_timings(edid, &MODE_1280x720p5994_60__FP, 0);
		add_timings(edid, &MODE_1920x1080i5994_60__SBSH2, 0);
		add_timings(edid, &MODE_1280x720p5994_60__TBH2, 0);
	}

	if (edid->supports_50Hz) {
		add_timings(edid, &MODE_1280x720p50__FP2, 0);
		add_timings(edid, &MODE_1280x720p50__FP, 0);
		add_timings(edid, &MODE_1920x1080i50__SBSH2, 0);
		add_timings(edid, &MODE_1280x720p50__TBH2, 0);
	}
};