drm: edid: HDMI 2.0 HF-VSDB block parsing

Adds parsing for HDMI 2.0 'HDMI Forum Vendor
Specific Data Block'. This block is present in
some HDMI 2.0 EDID's and gives information about
scrambling support, SCDC, 3D Views, and others.

Parsed parameters are stored in drm_connector
structure.

Change-Id: I018cfefea2fd3827d5f83c8e5717ebd95e497519
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Patch-mainline: dri-devel @ 10 Aug 2016 16:29
Signed-off-by: Jin Li <jinl@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
tirimbino
Padmanabhan Komanduru 8 years ago committed by Gerrit - the friendly Code Review server
parent 5455980982
commit df072230c0
  1. 34
      drivers/gpu/drm/drm_edid.c
  2. 12
      include/drm/drm_connector.h
  3. 5
      include/drm/drm_edid.h

@ -3846,6 +3846,37 @@ add_YCbCr420VDB_modes(struct drm_connector *connector, struct edid *edid)
return modes;
}
static void
parse_hdmi_hf_vsdb(struct drm_connector *connector, const u8 *db)
{
u8 len = cea_db_payload_len(db);
if (len < 7)
return;
if (db[4] != 1)
return; /* invalid version */
connector->max_tmds_char = db[5] * 5;
connector->scdc_present = db[6] & (1 << 7);
connector->rr_capable = db[6] & (1 << 6);
connector->flags_3d = db[6] & 0x7;
connector->supports_scramble = connector->scdc_present &&
(db[6] & (1 << 3));
DRM_DEBUG_KMS("HDMI v2: max TMDS char %d, "
"scdc %s, "
"rr %s, "
"3D flags 0x%x, "
"scramble %s\n",
connector->max_tmds_char,
connector->scdc_present ? "available" : "not available",
connector->rr_capable ? "capable" : "not capable",
connector->flags_3d,
connector->supports_scramble ?
"supported" : "not supported");
}
static void
monitor_name(struct detailed_timing *t, void *data)
{
@ -3972,6 +4003,9 @@ void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
/* HDMI Vendor-Specific Data Block */
if (cea_db_is_hdmi_vsdb(db))
drm_parse_hdmi_vsdb_audio(connector, db);
/* HDMI Forum Vendor-Specific Data Block */
else if (cea_db_is_hdmi_forum_vsdb(db))
parse_hdmi_hf_vsdb(connector, db);
break;
default:
break;

@ -708,6 +708,11 @@ struct drm_cmdline_mode {
* @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
* @max_tmds_char: indicates the maximum TMDS Character Rate supported
* @scdc_present: when set the sink supports SCDC functionality
* @rr_capable: when set the sink is capable of initiating an SCDC read request
* @supports_scramble: when set the sink supports less than 340Mcsc scrambling
* @flags_3d: 3D view(s) supported by the sink, see drm_edid.h (DRM_EDID_3D_*)
* @edid_corrupt: indicates whether the last read EDID was corrupt
* @debugfs_entry: debugfs directory for this connector
* @has_tile: is this connector connected to a tiled monitor
@ -892,6 +897,13 @@ struct drm_connector {
u32 hdr_min_luminance;
bool hdr_supported;
/* EDID bits HDMI 2.0 */
int max_tmds_char; /* in Mcsc */
bool scdc_present;
bool rr_capable;
bool supports_scramble;
int flags_3d;
/* Flag for raw EDID header corruption - used in Displayport
* compliance testing - * Displayport Link CTS Core 1.2 rev1.1 4.2.2.6
*/

@ -279,6 +279,11 @@ struct detailed_timing {
#define DRM_ELD_CEA_SAD(mnl, sad) (20 + (mnl) + 3 * (sad))
/* HDMI 2.0 */
#define DRM_EDID_3D_INDEPENDENT_VIEW (1 << 2)
#define DRM_EDID_3D_DUAL_VIEW (1 << 1)
#define DRM_EDID_3D_OSD_DISPARITY (1 << 0)
struct edid {
u8 header[8];
/* Vendor & product info */

Loading…
Cancel
Save