From patchwork Mon Apr 1 19:15:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 10880515 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 D9D20922 for ; Mon, 1 Apr 2019 19:15:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2AD32864F for ; Mon, 1 Apr 2019 19:15:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0D92286B9; Mon, 1 Apr 2019 19:15:45 +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 5ED702864F for ; Mon, 1 Apr 2019 19:15:45 +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=r6xlQQIXwDWai17vp/ZGNkmqTt7mEqvnQnr0mqt+DAg=; b=ZQtvgEYMk/7GEp 6cgiRYBAT4tqjYPZwbufgvpOmVJJk4MZMfOVRQBwoxo/WHPgkPbY0VsrO0FRxaHzBkP5VVDUwmaA2 Tye+EK05B31YcUEN0bxFDHsgWFXV0Jf2iOPhdClm8THOgOqLX0uuNCeNekvuZgY27THiWeSXXQJgu QkiG41EkOtu0TN5m12flR9ygYH4xNHX4y3TKJScNzUOFE/DcCAML4hN27sUMNDd8R8FJaPXzAhQJi LZ7ZONgTd6dfbXq83WSwMIFNoRkqmqq/A42I0wciR9/1x5AxcgG4++aetId7qo7yU8x8J/+HtiOqD +g7yytVs3cFCx5uIdJ8w==; 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 1hB2PG-0004Ee-SA; Mon, 01 Apr 2019 19:15:42 +0000 Received: from mailoutvs11.siol.net ([185.57.226.202] helo=mail.siol.net) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hB2P6-00045l-R0 for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 19:15:34 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id D4873521529; Mon, 1 Apr 2019 21:15:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HlbkJBj15cao; Mon, 1 Apr 2019 21:15:28 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 78F1B52065A; Mon, 1 Apr 2019 21:15:28 +0200 (CEST) Received: from localhost.localdomain (cpe-86-58-52-202.static.triera.net [86.58.52.202]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id 05EB2520886; Mon, 1 Apr 2019 21:15:24 +0200 (CEST) From: Jernej Skrabec To: maxime.ripard@bootlin.com Subject: [PATCH v2 1/2] drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver Date: Mon, 1 Apr 2019 21:15:12 +0200 Message-Id: <20190401191513.23159-2-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401191513.23159-1-jernej.skrabec@siol.net> References: <20190401191513.23159-1-jernej.skrabec@siol.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_121533_029805_CA2FCEBB X-CRM114-Status: GOOD ( 13.63 ) 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: narmstrong@baylibre.com, airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, a.hajda@samsung.com, wens@csie.org, Laurent.pinchart@ideasonboard.com, daniel@ffwll.ch, 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 DW HDMI controller on some Allwinner SoCs has support for CEC, but due to additional logic put between CEC controller and pins, it doesn't work correctly, at least not with a lot of instrusive changes. Fortunately, it's still possible to bitbang protocol. For such cases, add a platform option to suppress loading CEC driver. If DW HDMI CEC driver would be loaded, it wouldn't work anyway and would only cause a confusion with multiple /dev entries. Reviewed-by: Neil Armstrong Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +- include/drm/bridge/dw_hdmi.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index db761329a1e3..d2b0aa8d964c 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2660,7 +2660,7 @@ __dw_hdmi_probe(struct platform_device *pdev, hdmi->audio = platform_device_register_full(&pdevinfo); } - if (config0 & HDMI_CONFIG0_CEC) { + if (!plat_data->disable_cec && (config0 & HDMI_CONFIG0_CEC)) { cec.hdmi = hdmi; cec.ops = &dw_hdmi_cec_ops; cec.irq = irq; diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h index 66e70770cce5..c03bea3a1a36 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -144,6 +144,8 @@ struct dw_hdmi_plat_data { int (*configure_phy)(struct dw_hdmi *hdmi, const struct dw_hdmi_plat_data *pdata, unsigned long mpixelclock); + + unsigned int disable_cec : 1; }; struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,