From patchwork Sun Aug 12 04:30:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Pilcher X-Patchwork-Id: 1309291 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 77B8BDF280 for ; Sun, 12 Aug 2012 04:32:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 641009E806 for ; Sat, 11 Aug 2012 21:32:24 -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 E9C6A9E7A0 for ; Sat, 11 Aug 2012 21:30:23 -0700 (PDT) Received: by obbta17 with SMTP id ta17so4887165obb.36 for ; Sat, 11 Aug 2012 21:30:23 -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=/8dSZAsunlXkqLYMdc1rNXJ5nV9q30pey+RAlMr6KOQ=; b=TMl36bcicSsGGUlkzPYe5HtF+OZGjL+03KsYekiabRXfnQzlXmiaBOq3vfwiiBL3Vq AJE7kJuxpWbC772IkadKIeTYLSCA+CbqZUqDiFYxonl5LN+IteCQWTu4X8CNbPzkNNdp R7a5hawNoVEN1J4IaqFg27KISCx6gD/39kCgwOjxIB8f5AVbGgt39R1dpFunyH1orJ5k BV0mFoGbcZ3mwT1x65fWIK/psscydj1NBi0DXe7y9DksA1+5ih5Z7nBFLts8rmHDKIo5 IxOHcXHOuM6r3TmntKl/ihCnL8VvPiGq0UubKc0rlpb6G+a000cAdZiX4+r4PBbUWnp6 McEw== Received: by 10.182.174.68 with SMTP id bq4mr4979981obc.53.1344745823475; Sat, 11 Aug 2012 21:30:23 -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 a3sm2246794oeb.6.2012.08.11.21.30.22 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Aug 2012 21:30:23 -0700 (PDT) From: Ian Pilcher To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 2/2] drm: Add EDID quirks to disable HDMI audio and InfoFrames Date: Sat, 11 Aug 2012 23:30:04 -0500 Message-Id: <1344745804-26475-3-git-send-email-arequipeno@gmail.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1344745804-26475-1-git-send-email-arequipeno@gmail.com> References: <1344713822.4251.23.camel@mattotaupa> <1344745804-26475-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 EDID quirk flags to disable HDMI audio and HDMI InfoFrames. Add quirk for LG L246WP. Signed-off-by: Ian Pilcher Acked-by: Paul Menzel --- drivers/gpu/drm/drm_edid.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index bb3ba20..6c143ed 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; @@ -156,6 +160,10 @@ union edid_quirk edid_quirk_list[EDID_QUIRK_LIST_SIZE] = { { { { { EDID_MFG_ID('V', 'S', 'C'), cpu_to_le16(5020) } }, EDID_QUIRK_FORCE_REDUCED_BLANKING } }, + /* LG L246WP */ + { { { { EDID_MFG_ID('G', 'S', 'M'), cpu_to_le16(0x563f) } }, + EDID_QUIRK_DISABLE_INFOFRAMES | EDID_QUIRK_NO_AUDIO } }, + /* * When adding built-in quirks, please adjust EDID_QUIRK_LIST_SIZE to * provide some room for user-supplied quirks. @@ -2109,6 +2117,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 +2173,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)