Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp753294ybt; Wed, 8 Jul 2020 10:47:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzm4kXX6z3uwrDlqomv3N6co9PnpYoQMNfa8KkISDqFFEpFDa8NES6gRwLjk0Ct0m3bTTn X-Received: by 2002:a17:906:ce3c:: with SMTP id sd28mr49351702ejb.382.1594230435722; Wed, 08 Jul 2020 10:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594230435; cv=none; d=google.com; s=arc-20160816; b=prNxaLGFaTho3YrV5WBUQvLwowXE11mRrB+sY2AOLePpWx2byc4y/gejCCkzbUamg2 CcE4vyRkZ3B3At1C0OlFSiYDeHOxxWyMxoshg2FM8jZU9p9ZB8u6eGd+A89BT/CSTo/9 Xq/yVbzme67PGC2CD8U9wxIO+oeJMRAPxmilVA9M33EihAbN9cWHY4NXvlYqLYHdrEBf BCqcNYV6RZnFc4DUiWPx7feXjssEhl3Ug1tfoaOtGDoDPZywKL7VyQiA02w+PNIkGUFR 57UX9uXgrGjJltcBMK6+6qsMzXg5VoVZWPjIo6jyXX2qn/WGdCL6u7JYNkzaEwUbx530 Q+gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=A0XGoHowzQIP5YMgCMfzy7IYukjEGYMpwajCbhosaow=; b=MXgJDXuTgNvnpsAU1BqU0+GiNlMyGSyztFVyNvlBdTmos172hTig9QVy1klpdyiwa9 wTPa+D1po5gpENjHCSHwIz9VCwOSpLgMETrStj4vtI5+7wwnBDQEXmqMNX13fFqyqLOL 6wrrCuUXNmlqALPgJvCohjBBlpQmXrhELI1jU54+T81X1Uag2LBPlwvGdS8ng2HJFHIM x49Oxo6sGOHDjfWCfDVMkKKX2+w42at1e1legA8tu4mTntguclpUYkz1DcNxF4ORJj7F gMCVZURTWa/4htKcvOtJeJ0HGAjcNwxyOQXiW0NKmc2nodFJktgt1bLHrsDxvf7PrFbv FOcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=SeEW7OZO; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="rG/4wHsG"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p10si399470eds.221.2020.07.08.10.46.52; Wed, 08 Jul 2020 10:47:15 -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=@cerno.tech header.s=fm3 header.b=SeEW7OZO; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="rG/4wHsG"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727915AbgGHRn7 (ORCPT + 99 others); Wed, 8 Jul 2020 13:43:59 -0400 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:38783 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727907AbgGHRn5 (ORCPT ); Wed, 8 Jul 2020 13:43:57 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 8D715102C; Wed, 8 Jul 2020 13:43:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 08 Jul 2020 13:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=A0XGoHowzQIP5 YMgCMfzy7IYukjEGYMpwajCbhosaow=; b=SeEW7OZOVRZBiyRsvCvhI7mFmVUHS sbrX4HCz7eZYecgMxmPbKyaHLKgAEYRvTHcqyPfW2DRWYesMeOKJNfT4LGZkXyyK NOaZUDf9TAAlikFRxbHfxFbWIDJsySykJLFMYKl3pxbbKqOuIT9tFLm7Hg96X7Da jEb6pdBs+fg39oN0JYm5jBtQPjun8Zua2yfUqhsSAtDUXyoANC0LVUyWnEwnciOC VFpNmXCgjoxFpOSei15Y+vE8QsGb4FOdvjKOJ/2rUI9RZ0UfMruMsqAh7fNXXwgm N6m1g5ZwU7b1xOjafBBxpOybIZdt9y59kAzPgiw4GoolsrLaso7DbV0Vw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=A0XGoHowzQIP5YMgCMfzy7IYukjEGYMpwajCbhosaow=; b=rG/4wHsG 6hCYsZfbNkUwH51E/AAayUCCIa0CbjUPrfOV/fT6vKzkzT7t9xeB98Uo2mmXKvN1 EYpKi8CyuuazxjRD2Fr8Y32bQKs/2BmheHA76BGLtoo2ESFIRT2LD3QCHmH7qScH IAanDIzoW3i8f8BsGNX8vVPnjh8KWzQSfR+1sNdhVfbd7DEur6lru4tAlCf0ib5m ABfMpchNJPunpYUdkt/l2o0tmmmh2s/JwjByoMO2SeMyJh+QejjI+0Gy9dq7WlXt NXyZzgbYDqJlWGH45fcToUIlIfWugj/4Zp7Xz9rU7TmCcAl9aoxEKRtf83uM+zzu mTy3X4nhAue7vQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudejgdduudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepheegne curfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id C4D3730600B9; Wed, 8 Jul 2020 13:43:55 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell , Maxime Ripard Subject: [PATCH v4 59/78] drm/vc4: hdmi: Add CEC support flag Date: Wed, 8 Jul 2020 19:42:07 +0200 Message-Id: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Similarly to the audio support, CEC support is not there yet for the BCM2711, so let's skip entirely the CEC initialization through a variant flag. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 8cd08b541c14..86e21de6c578 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1179,6 +1179,9 @@ static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) u32 value; int ret; + if (!vc4_hdmi->variant->cec_available) + return 0; + vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops, vc4_hdmi, "vc4", CEC_CAP_DEFAULTS | @@ -1477,6 +1480,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) static const struct vc4_hdmi_variant bcm2835_variant = { .encoder_type = VC4_ENCODER_TYPE_HDMI0, .debugfs_name = "hdmi_regs", + .cec_available = true, .registers = vc4_hdmi_fields, .num_registers = ARRAY_SIZE(vc4_hdmi_fields), diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h index 794216f3228d..3f07aebe89f1 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h @@ -33,6 +33,9 @@ struct vc4_hdmi_variant { /* Filename to expose the registers in debugfs */ const char *debugfs_name; + /* Set to true when the CEC support is available */ + bool cec_available; + /* List of the registers available on that variant */ const struct vc4_hdmi_register *registers; -- git-series 0.9.1