From patchwork Mon Mar 4 14:52:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10837879 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 450931399 for ; Mon, 4 Mar 2019 14:53:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F1B52A5CF for ; Mon, 4 Mar 2019 14:53:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 236F32A676; Mon, 4 Mar 2019 14:53:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D1CD82A5CF for ; Mon, 4 Mar 2019 14:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RmtaEC5gqBluk6dqx8IUy0O+4Kx35v3bom3qAhjGC8Y=; b=q/ASxYVuWp/WsF Y94KF4um2T0ipHdJGl2KdgbpkLgN4GcS6oe/1g46zYV7BbIc/zz003NWi+f21Fpg56pQhmrIXG25F KATifFer4g9wibFb/J3lHHyHSaKM8qb42GRmrmBakLFOzxEFSaLFTCc2hRajkVFBCFsJq2jkbKASj YRvT4JZ3zwWRiCnYEU2gVPeNFWSc68a+XIjunNd/S/92aeedk3M8qyHImLFSgLrRUAl1DnKuSQ7k/ fspQJFcK2dle/8HjJPF6FdUOaSOWKiCxNuLyZn/V8xNJA+R7EtK8gyWgC6J/WQaUO7cEpOTgzMUq4 YAcKJchxQ2JQ4odEPKWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0oy6-0006uA-TZ; Mon, 04 Mar 2019 14:53:26 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h0oxf-0006LV-DS for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2019 14:53:02 +0000 Received: from localhost (unknown [185.94.189.188]) (Authenticated sender: maxime.ripard@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 6F999240007; Mon, 4 Mar 2019 14:52:50 +0000 (UTC) From: Maxime Ripard To: Maarten Lankhorst , Sean Paul , Maxime Ripard , Daniel Vetter , David Airlie Subject: [PATCH 2/7] drm/edid: Allow to ignore the audio EDID data Date: Mon, 4 Mar 2019 15:52:35 +0100 Message-Id: <4914bea9fc3ef3deaffa39ab691dbd9a76461e97.1551711042.git-series.maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190304_065259_727974_7AE350C0 X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eben@raspberrypi.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski , Eric Anholt , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In some cases, in order to accomodate with displays with poor EDIDs, we need to ignore that the monitor alledgedly supports audio output and disable the audio output. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_edid.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 990b1909f9d7..c0258b011bb2 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -4190,6 +4190,11 @@ bool drm_detect_hdmi_monitor(struct edid *edid) } EXPORT_SYMBOL(drm_detect_hdmi_monitor); +static bool ignore_edid_audio = false; +module_param(ignore_edid_audio, bool, 0644); +MODULE_PARM_DESC(ignore_edid_audio, + "Ignore the EDID and always consider that a monitor doesn't have audio capabilities"); + /** * drm_detect_monitor_audio - check monitor audio capability * @edid: EDID block to scan @@ -4209,6 +4214,9 @@ bool drm_detect_monitor_audio(struct edid *edid) bool has_audio = false; int start_offset, end_offset; + if (ignore_edid_audio) + goto end; + edid_ext = drm_find_cea_extension(edid); if (!edid_ext) goto end;