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

Commit 19aa7f20 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Gerrit - the friendly Code Review server
Browse files

drm/edid: add support for parsing quantization select field



Add support for parsing the RGB and YCC quantization
selectable field from the Video Capability Data block(VCDB)
of the EDID.

These fields decide whether the default quantization
range for a particular video format can be overridden by the
source.

Change-Id: Ibc72eb13302527089ad66231cd7e8bb34fb364f3
Signed-off-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
Signed-off-by: default avatarChirag Khurana <ckhurana@codeaurora.org>
parent 2caff144
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3599,11 +3599,15 @@ drm_extract_vcdb_info(struct drm_connector *connector, const u8 *db)
		(db[2] & (BIT(3) | BIT(2))) >> 2;
	connector->ce_scan_info =
		db[2] & (BIT(1) | BIT(0));
	connector->rgb_qs = db[2] & BIT(6);
	connector->yuv_qs = db[2] & BIT(7);

	DRM_DEBUG_KMS("Scan Info (pt|it|ce): (%d|%d|%d)",
			  (int) connector->pt_scan_info,
			  (int) connector->it_scan_info,
			  (int) connector->ce_scan_info);
	DRM_DEBUG_KMS("rgb_quant_range_select %d", connector->rgb_qs);
	DRM_DEBUG_KMS("ycc_quant_range_select %d", connector->yuv_qs);
}

static bool drm_edid_is_luminance_value_present(
+6 −0
Original line number Diff line number Diff line
@@ -542,12 +542,15 @@ struct drm_cmdline_mode {
 * @pt_scan_info: PT scan info obtained from the VCDB of EDID
 * @it_scan_info: IT scan info obtained from the VCDB of EDID
 * @ce_scan_info: CE scan info obtained from the VCDB of EDID
 * @color_enc_fmt: Colorimetry encoding formats of sink
 * @hdr_eotf: Electro optical transfer function obtained from HDR block
 * @hdr_metadata_type_one: Metadata type one obtained from HDR block
 * @hdr_max_luminance: desired max luminance obtained from HDR block
 * @hdr_avg_luminance: desired avg luminance obtained from HDR block
 * @hdr_min_luminance: desired min luminance obtained from HDR block
 * @hdr_supported: does the sink support HDR content
 * @rgb_qs: does the sink declare RGB selectable quantization range
 * @yuv_qs: does the sink declare YCC selectable quantization range
 * @edid_corrupt: indicates whether the last read EDID was corrupt
 * @debugfs_entry: debugfs directory for this connector
 * @state: current atomic state for this connector
@@ -703,12 +706,15 @@ struct drm_connector {
	u8 pt_scan_info;
	u8 it_scan_info;
	u8 ce_scan_info;
	u8 color_enc_fmt;
	u32 hdr_eotf;
	bool hdr_metadata_type_one;
	u32 hdr_max_luminance;
	u32 hdr_avg_luminance;
	u32 hdr_min_luminance;
	bool hdr_supported;
	bool rgb_qs;
	bool yuv_qs;

	/* Flag for raw EDID header corruption - used in Displayport
	 * compliance testing - * Displayport Link CTS Core 1.2 rev1.1 4.2.2.6