From patchwork Fri Apr 16 09:27:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12207255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72906C43460 for ; Fri, 16 Apr 2021 09:27:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1A8961184 for ; Fri, 16 Apr 2021 09:27:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1A8961184 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B87D56EB55; Fri, 16 Apr 2021 09:27:46 +0000 (UTC) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by gabe.freedesktop.org (Postfix) with ESMTPS id D86A86EB54 for ; Fri, 16 Apr 2021 09:27:43 +0000 (UTC) Received: by mail-wm1-x330.google.com with SMTP id k4-20020a7bc4040000b02901331d89fb83so1732076wmi.5 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=IiM6v2WFIq5OuqG+MjS3E5E2lgpilV6TrHMRaa3ZdWnx9+wCWvzVCrUNh+4b4qoIp+ mDL/57Xw1m6mZtzwiLElJMy5rseZHS6dBJ0c2xqXXhvo3urbvNieaNd3u2jfenGYq0Ew H252MdrvWtC4JYP/OlH0bfztRXbrsxU3DqWZZyUMrCuvJDM77qoHvAMnwvQx2T9Oa8CM sWdFHbd1yQRBoYgmswCV9zrmYm3iFN6R7T9jQq5Mx6XjEIxkCahb0zHcypkRrbSwBn5E 4WGOjfP7uW0D/4pWkqC/q5y0nbomvW7PPvv92gDpZokVTgJhBzdLRpbbNnJaaezo0joq jrjA== X-Gm-Message-State: AOAM531ecfgxt7dTvSFb1TWpiz/Glm9QPgfLEBkoPUUBm6fd7J28xA1/ /7IqESRYHNhPzU91uq63N78Jjw== X-Google-Smtp-Source: ABdhPJwn2tFqclBip9+el1SG+TFDi6VD+1YJ7fmLPq4JrBkmfmzo8sBE62ixZffYLJeBE0UMs5auUA== 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 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= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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, From patchwork Fri Apr 16 09:27:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12207257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1B80C433ED for ; Fri, 16 Apr 2021 09:27:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 559536115B for ; Fri, 16 Apr 2021 09:27:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 559536115B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA80C6EB57; Fri, 16 Apr 2021 09:27:46 +0000 (UTC) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by gabe.freedesktop.org (Postfix) with ESMTPS id E247F6EB57 for ; Fri, 16 Apr 2021 09:27:44 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id s7so25903776wru.6 for ; Fri, 16 Apr 2021 02:27:44 -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=UW+b9Omz02QYLN6IJYLDRcym09SpomRowE67Td03hF0=; b=2SXyPTN09paaUUHLMYjUPiOreOsjYnlSmKr4JE96Aqe9W8aFmXg4hr1bj4bxzB2QSt 75zILaiFt03bYFsKYqUldY0Tm2nfLT/pccj6fgbGcl1UbvoC+gmoOQwx0g+dwPf5xbfC QZB9N4nRgbd1LDpB8yHSfk+qjLjKkc6WDst9Iny4KDpA1HO+2Bs7iBYurZH6LqcDGQ5+ ZDXtn6Y33TdB7Pqszd1cQzxJske76wXleM1nsl26M5yhNsEzYyyRvoYE2QmX6hHKTSGw hqLfeB624/Bdl6OMWA8cRGtDlOBjx9VPYF/L6I6QT90YNFOyey68YNxO7hAeOOH4NEQW LFTg== 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=UW+b9Omz02QYLN6IJYLDRcym09SpomRowE67Td03hF0=; b=Tk+fY7KMlaV5Qpw3iRuTundkGXKThpIELT+is+d75y/OtaRHr5H8FqRi3iLEVLoj8E 62vn7mXzcXv8kHeUZCrlZeHr1k81cQJb2JGrXv4q/+pL3p9iZvEkVb5z1cDyHlpoNdIj ALVuOivHiJJCVunav30tjikOnrbV2CjKdDm+nPmS2iphs3NgfZ/ow2GhXMJqKl5ZGA2P qF+ppyW88uAvsPKYr77EFoLI+KQct6aJegXOV8Opb1oaeIacHpHxR5vLJT1QDnqU7H7f +TMrIvB1+BlLb2LX5o4eL0lRNU/hWMF6S/RLIRRCsz3+NqgVH2rL9qZCSspV3sQiYyI4 23jw== X-Gm-Message-State: AOAM5325cZU8726bwU7gJOrqRdoycWvIPN6MDjKqBrxrock1/QMsb97u YktDjG8C4U6r+rw4tHVVqNbssg== X-Google-Smtp-Source: ABdhPJy7PfjmtGJBOdddxLxdWJGQghNiu2LsQa7tLkmPIufbPgxZciXvPq9nhqNHPw/dBMV7hWt+SA== X-Received: by 2002:a5d:4251:: with SMTP id s17mr7986834wrr.174.1618565263540; Fri, 16 Apr 2021 02:27:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 02:27:43 -0700 (PDT) From: Neil Armstrong To: jonas@kwiboo.se, jernej.skrabec@siol.net, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com Subject: [PATCH 2/2] drm/meson: dw-hdmi: disable DW-HDMI CEC sub-driver Date: Fri, 16 Apr 2021 11:27:37 +0200 Message-Id: <20210416092737.1971876-3-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=AIXqGHKTvAxrfKSlg1n3zbWJ5IG5DkS6Kb91/enRWC0=; m=2JvXyHbVOdgr08yx3xTtTb2RALrmH6WvCQut165FoNE=; p=ALx7NrZjStGjkcT7P2hXJBXnDsBMqDSSAFEUG8wpqV4=; g=4e6918702c99f2fd53451a77865692eeb1ce6f11 X-Patch-Sig: m=pgp; i=narmstrong@baylibre.com; s=0xA4CFF8AE; b=iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmB5WDsACgkQd9zb2sjISdEMNg//eHW wLuyr89JyKh095fVg/U17vGXWCLJ4CoUOcvalJ7GqQfF094VlAnboFML2V1x97mGiXL9dEWzIXIU7 njtgfXlKA0lczx6uhZMbkD6YoCRHxvLZ4I3oWcCl1hZnKlhUgysO7Kp5RPAGRVQgNxkopRLK5LBYo DqmIEfvh976jxGsRdydHIgt3xKSGYV9JLj57+PP6WbnD0MHOm5EJLRettmjVJl39NzW6kbvlZJxrz n/vbP1ydH7Mf11NeHGkzi24eCx79FuAbCKIFdfIoZREybjXGjoE9guX4LKHbrzznFx1H12emkMucS cZ6EDw8V0rEtZJBQnib6MllzAp2cSEsA07NTn8/m6SlDxFPh/ZyHKfgJisY2bclJAzgJAWyj+/oxl 1aliLRovtOP6qej39sYRMp8S9RBADFdmqamr+B2CbqH23odahkg2MbuSfm5X5tKeqOVlwsMnNMi+C NV9df8kcJvjTx/A7ypWeZdZNa4Lp84bRYKMXE1kGpBCz2HaWN6qQmEOaODqGyY/w/RADuPRcc6Yxc 8pqefJFUx7qK7YiV+gHcw7xI2z2FNcR+D+VTpSVHJNsOYMn2Up7wjyySgCZzOBGTgAwqkIBDeyccR brk9G1Fu3JQMrQqOlguW82Xz+kpfjxjAVsuszHdttk/bhsHqpvgjO+ka4JHEWzSE= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On the Amlogic SoCs, the DW-HDMI HW support is here but the DW-HDMI CEC signal is not connected to a physical pin, leading to confusion when the dw-hdmi cec controller can't communicate on the bus. Disable it to avoid exposing a non-functinal bus. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index aad75a22dc33..2ed87cfdd735 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -1103,6 +1103,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, dw_plat_data->phy_data = meson_dw_hdmi; dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709; dw_plat_data->ycbcr_420_allowed = true; + dw_plat_data->disable_cec = true; if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") || dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") ||