From patchwork Sun Aug 12 20:07:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Pilcher X-Patchwork-Id: 1310081 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 73C76DF280 for ; Sun, 12 Aug 2012 20:10:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 698349F588 for ; Sun, 12 Aug 2012 13:10:14 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by gabe.freedesktop.org (Postfix) with ESMTP id A98B79E83C for ; Sun, 12 Aug 2012 13:08:12 -0700 (PDT) Received: by obbta17 with SMTP id ta17so5915621obb.36 for ; Sun, 12 Aug 2012 13:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=gzfDhDIWfkjRCJ6Ra42qZvtFedK7AcGPZf7Xmb8E7Cg=; b=aeQjjB8LTOMdnDIvObRiM6lMf7DkOMAFmP8n2X8Q3lRrsANFlBqxFkwjSQ6uXBF00g edaknwKAAXq7DNWKfRZSoyX3FCbfcEMDYfL/XLhJFPb7tN1UvfRFBUGgraYzGhJxWh4d 4GXl5Riqf+AOT7WS+Q/csb6AR86hm2ObpNH6JVW7QddbxBW0AjAWZLWWw8QTZ/cY8uJm aTr3Rx+3razChOR2Ii884rnhFHc2ea0A/sP9GkSZ5HV7lTetXHUHXqx976aatH6I1xW2 5W8xeCaKzueV/gxCd1oJVYFMXOKDGBslmK4VhPM2uEetLZbruJZuHGqsAYPH4eRr4Rnt z5ZA== Received: by 10.182.111.74 with SMTP id ig10mr7794070obb.14.1344802092225; Sun, 12 Aug 2012 13:08:12 -0700 (PDT) Received: from ian.icp.selfip.net (pool-71-170-109-80.dllstx.fios.verizon.net. [71.170.109.80]) by mx.google.com with ESMTPS id k8sm3266152oeh.9.2012.08.12.13.08.11 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 13:08:11 -0700 (PDT) From: Ian Pilcher To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 2/3] drm: Add EDID quirks to disable HDMI audio and InfoFrames Date: Sun, 12 Aug 2012 15:07:59 -0500 Message-Id: <1344802080-9575-3-git-send-email-arequipeno@gmail.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1344802080-9575-1-git-send-email-arequipeno@gmail.com> References: <1344754732.4980.5.camel@mattotaupa> <1344802080-9575-1-git-send-email-arequipeno@gmail.com> Cc: Ian Pilcher , paulepanter@users.sourceforge.net X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Add 2 new EDID quirk flags: - EDID_QUIRK_DISABLE_INFOFRAMES turns off all HDMI-specific functionality (audio, HDCP, etc.). Intended for displays that are confused by *any* InfoFrames. - EDID_QUIRK_NO_AUDIO disables HDMI audio. Intended for displays that incorrectely report audio capabilities in their EDID data. Signed-off-by: Ian Pilcher Acked-by: Paul Menzel --- drivers/gpu/drm/drm_edid.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index ea535f6..61586b4 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -70,6 +70,10 @@ #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 sent any */ +#define EDID_QUIRK_DISABLE_INFOFRAMES (1 << 8) +/* Display doesn't have any audio output */ +#define EDID_QUIRK_NO_AUDIO (1 << 9) struct detailed_mode_closure { struct drm_connector *connector; @@ -2109,6 +2113,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) @@ -2157,6 +2169,14 @@ bool drm_detect_monitor_audio(struct edid *edid) int i, j; bool has_audio = false; int start_offset, end_offset; + char buf[EDID_DISPLAY_ID_BUF_SIZE]; + + if (edid_get_quirks(edid) & EDID_QUIRK_NO_AUDIO) { + DRM_INFO("Disabling HDMI audio 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)