diff mbox

[v5,2/3] drm: Add EDID quirk to disable HDMI InfoFrames

Message ID 1348815824-12779-3-git-send-email-arequipeno@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Pilcher Sept. 28, 2012, 7:03 a.m. UTC
EDID_QUIRK_DISABLE_INFOFRAMES turns off all HDMI-specific
functionality (audio, HDCP, 3D, etc.).  Intended for displays that
are confused by *any* InfoFrames.

Signed-off-by: Ian Pilcher <arequipeno@gmail.com>
---
 drivers/gpu/drm/drm_edid.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ea535f6..0d788b5 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -70,6 +70,8 @@ 
 #define EDID_QUIRK_DETAILED_SYNC_PP		(1 << 6)
 /* Force reduced-blanking timings for detailed modes */
 #define EDID_QUIRK_FORCE_REDUCED_BLANKING	(1 << 7)
+/* Display is confused by InfoFrames; don't send any */
+#define EDID_QUIRK_DISABLE_INFOFRAMES		(1 << 8)
 
 struct detailed_mode_closure {
 	struct drm_connector *connector;
@@ -2109,6 +2111,14 @@  bool drm_detect_hdmi_monitor(struct edid *edid)
 	int i, hdmi_id;
 	int start_offset, end_offset;
 	bool is_hdmi = false;
+	char buf[EDID_DISPLAY_ID_BUF_SIZE];
+
+	if (edid_get_quirks(edid) & EDID_QUIRK_DISABLE_INFOFRAMES) {
+		DRM_INFO("Disabling HDMI InfoFrames on display %s "
+			 "due to EDID quirk\n",
+			 drm_edid_display_id_format(edid->display_id, buf, 1));
+		goto end;
+	}
 
 	edid_ext = drm_find_cea_extension(edid);
 	if (!edid_ext)