Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4841300pxu; Thu, 10 Dec 2020 06:49:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJykQyf3x9Sj5zuVOcPZTE98UUOLNnKcBiO8qLeAiZ8JB1U7QboGBj1dXN9JxXUPzI85RnRq X-Received: by 2002:a17:907:720e:: with SMTP id dr14mr6654455ejc.303.1607611761916; Thu, 10 Dec 2020 06:49:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607611761; cv=none; d=google.com; s=arc-20160816; b=uMG+m0PCLav55ACSJ9XqkeDx1wEzly5SKMMEYwpJyOx4742Id8elhYRmn2O6NRc0sn alK0dYC3q/M96Oduv7mU4R18sp2jc3PyG9Q6FjufFJ7z+VEYwkH+EcyXd5spIVXgcdYL MLUrIWmM5Al4TdLCvC6uZdF610juZd+BRDgergfO8zwQgiRd+hGkW0yCUO94vg6W8c7g yawQR7GdYnNzkt03zZI5uIoOgKAzTl+D/ZeiKyVFgS+8A2fi550M+mc2PzUFInJeKx2x bLZjtTiUUSwCtVQ0texSKTIkq0EjwDDh/k+fuQR7TrALB8HPiMhKqYZUEp+rUStleGUP /1eA== 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:dkim-signature; bh=fklFVIL4Y1AJEO4W9nFqNlVOvqBIEiPSfsqHHscTIBE=; b=YiO0142++TEd2QVUN3Q79SvT1mApEYlf36nc+4fodN0b4DhK5GvOBeW9KMcbvaB3gj 3sVu4NmxHvFtOpfTWoz5CMGGMGJ05bZpYMdho16T7Rz2iSs1y8AGVlmq4Ewgspg2NQgF PyZOfXnmKKYvoWRNYV9U3wrxG+lZwM1z8ZlZ5e9geC21OW0ktMxiGgoUAVle5CUi78ZY OrYv3dgYx1dAt5rHC5bIc+TkKPlyk8ZzlNjf1WsLZrwRJj0wfTNTf8kd5u+5jzx/w6Q+ DJqnaZj4JdZ0UtwDLj9LIJVLWARRuqYg+2n5wRsOxfRkV/nHYNPZS7JVn9oCXO4YR5pe YHRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b="nNO2RIx/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mRPoa3CL; 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 i9si2910252edq.66.2020.12.10.06.48.58; Thu, 10 Dec 2020 06:49:21 -0800 (PST) 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=fm1 header.b="nNO2RIx/"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mRPoa3CL; 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 S2389626AbgLJNxW (ORCPT + 99 others); Thu, 10 Dec 2020 08:53:22 -0500 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:38063 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389348AbgLJNsx (ORCPT ); Thu, 10 Dec 2020 08:48:53 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 13008F3E; Thu, 10 Dec 2020 08:47:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 10 Dec 2020 08:47:08 -0500 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=fm1; bh=fklFVIL4Y1AJE O4W9nFqNlVOvqBIEiPSfsqHHscTIBE=; b=nNO2RIx/astgzAlXENxsKURrTJJSI UHXJnswJvUqviJv1BEOPeVTq3+uU0ymAP96TDRugvCTVE4YHFqj73fSPr3T+MGyB lNWYQ3kXMnjIFHOEylnZP7FvBFx9BrCHSUWV0u0trgPJR8eNu+Loo6pbNBpkZCUj WnchPKPM7ou8mN6/7dm33q47hJdXN2UbdgmtlzgUDyazt3pQ81OT4cHLXFE/rthJ w1QMZ5KL6xXfVZSiJrsY0t52dJhVp+8MiVT0fe9/CxNnCn6Z8QRZjg+UNeKGK1QR HmAgeLKe3pc8MH7FZlctlxJccshFC1oyA6fn6El2jTqz4NqBuk0bn0PlA== 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= fm1; bh=fklFVIL4Y1AJEO4W9nFqNlVOvqBIEiPSfsqHHscTIBE=; b=mRPoa3CL DaxFOvTVB6EdXe2MJe/edKYP9BDX7tzRiiK9uQSq//RMTH2TYdZQRLZ/jpXaayqx TgDyUEf5hOqmM3hN4iSUEbSkqCcg+bytIBHuXoTROEssM4jx3fULZy915qwLGDIs e/8TvPv+2Ly3ntSgWscW8zizBNJ8FJdUvTX8Ch/XAxfzAYrILzh+0sm4KAzgbhlm orPCL2H7lHdHkpi8l1CsCgHjaOpnZpnFE/MIJRmTtwvXFU/YFj6sLEBndTMwBeyv CxTR+gJiI55nRDmql4fZQm5H52fPu4KnxetReOUHPIUvd3MVRWLVRhGph/n0+kDz uYQAHnb4jsJWjw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudektddgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepfeenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh 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 73253108006B; Thu, 10 Dec 2020 08:47:06 -0500 (EST) From: Maxime Ripard To: Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Cc: Jason Cooper , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Marc Zyngier , linux-media@vger.kernel.org, Hans Verkuil , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Thomas Gleixner , Dave Stevenson , linux-rpi-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 12/15] drm/vc4: hdmi: Don't register the CEC adapter if there's no interrupts Date: Thu, 10 Dec 2020 14:46:45 +0100 Message-Id: <20201210134648.272857-13-maxime@cerno.tech> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201210134648.272857-1-maxime@cerno.tech> References: <20201210134648.272857-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We introduced the BCM2711 support to the vc4 HDMI controller with 5.10, but this was lacking any of the interrupts of the CEC controller so we have to deal with the backward compatibility. Do so by simply ignoring the CEC setup if the DT doesn't have the interrupts property. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 327638d93032..69217c68d3a4 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1655,9 +1655,15 @@ static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) { struct cec_connector_info conn_info; struct platform_device *pdev = vc4_hdmi->pdev; + struct device *dev = &pdev->dev; u32 value; int ret; + if (!of_find_property(dev->of_node, "interrupts", NULL)) { + dev_warn(dev, "'interrupts' DT property is missing, no CEC\n"); + return 0; + } + vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops, vc4_hdmi, "vc4", CEC_CAP_DEFAULTS | -- 2.28.0