Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp199049pxb; Fri, 16 Apr 2021 03:26:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3KcgELIDnYCTE9VWhroBiuQh/HrKw62o6X/xJBFu2UBCTMzIfCdR1rOLgVRfEbzMwY1Ia X-Received: by 2002:aa7:da49:: with SMTP id w9mr485249eds.377.1618568791933; Fri, 16 Apr 2021 03:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618568791; cv=none; d=google.com; s=arc-20160816; b=HzfQ8WJ080a02XDrv6LpCxslTrwRVzn9KXkDhcOrl84BquYc8Hs1Y9VB2HaEFZhSH7 qK9mtjNoZ7XAlVZb8vLQNoAw7r4m37yG6CXZnger2T64u09gW6WJ/cixVTfsgbQ7c5Dl JOD9a6y7vUbY9ZkD3Q27RHX8IvVUfyATZougAWnbx0l+ej6QnA00zbPKofhL4U/ZCO/X O9mn5Hl6hHIN7OC0zLAo91eHXsSBWoO4HCF9eo+oiLfltUImRg8xg2m/Dw7/SwFueDVv k5SP8zGA1SVndH41zO51a0v3Tj+1A07yWDx1NoKB7N/YfuIMK9ts7iCYxb5M24TiCpW8 nC7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9BqRj0LNCA4WBYZmT+NFPaGLh8/3JIeNWN0kNZbU1po=; b=XVq1PUkwcciIi0x29U30AzFWtd3/0hpfQIilFXOhcFX9IXnST6bt+LDxcr+9xPK7vC qNtTByfRMfujD5uT3UquY4/tG6FaHNnYr3XOy5+q2qIXf5ri5i4/VF8bSw1aF5CHst0L WIhjBnAAKnWnaRXevHHJnECn7b2x9MeC5/MUqbPsMvaNYaGrM9WgQufkvT/hz+lVKVRv bm0Hs2toEMNQtiYabEkOkj3MyeOAwMTzPsg3keWlaJyShpt9sB5+U7/TTiCmB3dWx4do F/Xm1+k520lK4D4Z+pCSXcit0plnE2B4FY98fWV4YD83CrnSLwrlYZELTn9JfzqZKk3Y o0yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=p9vuhEWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si3681660edx.373.2021.04.16.03.26.09; Fri, 16 Apr 2021 03:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=p9vuhEWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239861AbhDPJ2L (ORCPT + 99 others); Fri, 16 Apr 2021 05:28:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239117AbhDPJ2J (ORCPT ); Fri, 16 Apr 2021 05:28:09 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2433C061574 for ; Fri, 16 Apr 2021 02:27:43 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id u5-20020a7bcb050000b029010e9316b9d5so13827151wmj.2 for ; Fri, 16 Apr 2021 02:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9BqRj0LNCA4WBYZmT+NFPaGLh8/3JIeNWN0kNZbU1po=; b=p9vuhEWJ72/1jKNusXS3smwfCyriKDrf1mSy+nnr8fQsMoiNn1NKy7ZDKbn7p+wwtc Y7ZxsfaoIA7GjjO56ZWve3BjkwgisWOwzngPF/zdmhLZHX4ztcUbItMM/gtSAQzkeJJH T2C7TyUqaMAru2a88UqkUjsLOufrmb9e/Cz1fgQYBZygowAB+sMz7sHfdFhAdVksHepW Cr3K81jRE25GB4khUmPkhPovAMTJO9uBvP5uadZ4NH9OAdRo/yck6D8WO9EbqxW60MaM DpgFZsAwpIKy6+qU/6tHRjiqperbiltfKqbJycwL/cFeG+8NiguT7z+7YtZdQ0j0R+9f xlwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9BqRj0LNCA4WBYZmT+NFPaGLh8/3JIeNWN0kNZbU1po=; b=s4ez3/ipPYaltjKQfDHRpvgdNiTM5AwAbFHCQdBv4psLDeyQinAjhb7bPohJEK3DFp RJmWAa8zIq0g4nXYCJ2W647LjCrViOgl5FncR+vV4Sj99x3Ae5F9K0CV+S3iJuXHl8ch p/bOYgN+04DUDRI/xHwbPrQ7iydJckbDf8kz3POq/lGyqpnB+kmmHsIaAdCDHsDz9d3J 3zAtxCul5QAkMQOX9C63qjRkqLfWiWGo/XYGgjj8OakdkCL06WBvAOWNjq0pE4e0DX9s TbIK7jvZ/1bHqr8uNudn7SrT3d806WiedSnnhqjlf+FQlxf3aK27YzXQYIEyVotB+jMX h7ug== X-Gm-Message-State: AOAM532kmqsZbfrkISEyzcZd15a2oo9HryuKqko1q2RqH4wjJc/JSBZX tBR2FTOA05cS3wdAR4eBPsJJ5g== X-Received: by 2002:a7b:c7c9:: with SMTP id z9mr7270490wmk.50.1618565262461; Fri, 16 Apr 2021 02:27:42 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:6e70:fd4e:dfdb:68d7]) by smtp.gmail.com with ESMTPSA id h8sm8805156wrt.94.2021.04.16.02.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 02:27:42 -0700 (PDT) From: Neil Armstrong To: jonas@kwiboo.se, jernej.skrabec@siol.net, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com Cc: dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH 1/2] drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC driver Date: Fri, 16 Apr 2021 11:27:36 +0200 Message-Id: <20210416092737.1971876-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210416092737.1971876-1-narmstrong@baylibre.com> References: <20210416092737.1971876-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-Patch-Hashes: v=1; h=sha256; i=Y2Kp96dW3X0U27vNrMM/XkOOWYrIUuOu1Mi+zc7UuTs=; m=8YzxMzRM2R/oOFCOZbnFjWww/0CRXwSKJOS10A7bahU=; p=In2Hgqc+nqwSrOrGnpYjxqY39B1rnskpZvUG56iaipo=; g=1623597293b4caa25ab43c3fbd39773cfca1dd42 X-Patch-Sig: m=pgp; i=narmstrong@baylibre.com; s=0xA4CFF8AE; b=iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmB5WDgACgkQd9zb2sjISdF0zxAAsPF S9X840FovT4celkzqEHde6wQVRpNvUWE4KfpsyuthouG4Ogh7m+mtKyMmMmQER6NI98m6UNn3Xbw5 Qx99KHfaJJIDzeVKrURJGlExHSEpMuPeHdJ0RAe7bLK9WQEQPtzxAOjV6Fv1laxc0C3c0dOfy8vr4 JZX5oSKvz9oZ6X4ORBzl2Ighs0m1oNE6+fVDA/Go3PF9hK75cBWYIkms1I+K8tbvzEzZ/qZHYkJMM 7MdZj+Z8QXTj3HtlH0D3/Ir+WsE8g6vWtPbpiCYZQN20Qba8AIbNzlVgl5W4Bp9Ui+L/fbej+SOpF aEBcnw6wNLiKHAL3TxQDO8vkBR+JtaUespcIgE+/lqPeRJ7hsAfbsopzmkOz7kY6HCLvbAKtSlZbZ DhO86B1AKA7zjpTtuW+LijHIpzcK4kY7MRwuh+pFxFjOUv35K25z56vjnxJmLjo6zKyuhDR6WiFAY gscXpmhObHHjk36uTWeTJr87NINY7CH0pBu9ZFSzSp01gkLMx4phDLjm0+JayYtEWb3C4TQ7JEMT6 83Pdk0v0cAmx9Zef/LH5+R5kpZDsDpIJ7MeGQOrHUqbzKJF7K9EFKhDwaxXbSJKhCaEp+AKawxo1e xNymIxJyVDqU92s+pABPeTAYzotm3k9rcTGAjvOMAJe4zZlBjgZxL2N8piBFhgP8= Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jernej Skrabec This adds DW-HDMI driver a glue option to disable loading of the CEC sub-driver. On some SoCs, the CEC functionality is enabled in the IP config bits, but the CEC bus is non-functional like on Amlogic SoCs, where the CEC config bit is set but the DW-HDMI CEC signal is not connected to a physical pin, leading to some confusion when the DW-HDMI CEC controller can't communicate on the bus. Reviewed-by: Neil Armstrong Signed-off-by: Jernej Skrabec Signed-off-by: Neil Armstrong --- 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 dda4fa9a1a08..ae97513ef886 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3421,7 +3421,7 @@ struct dw_hdmi *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 ea34ca146b82..6a5716655619 100644 --- a/include/drm/bridge/dw_hdmi.h +++ b/include/drm/bridge/dw_hdmi.h @@ -153,6 +153,8 @@ struct dw_hdmi_plat_data { const struct dw_hdmi_phy_config *phy_config; int (*configure_phy)(struct dw_hdmi *hdmi, void *data, unsigned long mpixelclock); + + unsigned int disable_cec : 1; }; struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, -- 2.25.1