Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2142218pxu; Fri, 18 Dec 2020 06:33:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwB0fpv5BzgYup67jEDjU8RfniUpUwt7IagV9kFQoOuWHvr9EmETexCvwmNRkcQjm9wamGx X-Received: by 2002:a17:906:1282:: with SMTP id k2mr4188680ejb.554.1608302027320; Fri, 18 Dec 2020 06:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608302027; cv=none; d=google.com; s=arc-20160816; b=MGfFmP+zl/hn4HKTdycVfDz/e9Xk2cuHJ9z3B2EoMlOOVD20uvCGTBSCyJLLJufOJ0 puOXXez5sDqyRqyJiVkazO8f3wLGBOOGd87i4PHPYGV96YME0ciJiRG2t4JKKe56GQGn Fkx6y7kVZIzppcY8HoI6yk/tRhW2LGayjGY3ZvDfhfVaWHTMZ3aKqKTcGB8Fst3vPMs0 4/iDaXM5NNHdaMVyphz8a8jXoc9WRvgdF7XJ3Vll7Ff74cl7BXJLj7wg9jtUsuggLk5s G1QtqESDcUeu9NEQPO62uYZImkgsadngvKbcI100xDVH9S+lagSAR6HLFWrOFgERkI0f CXQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fQcnaVeKn76lYRwiXKR4yvTyQ/9Lgo43QJdLzaw88No=; b=PWkWyQgW7sTO79+yZj97Fk3E4VUcP4ZlQgWy9Wwu6jPE2RYKzn366rSiwffpU7j+pT sKKLV4Ib4pQcB4O+VHvy1QNMkc/6x4MrV6uVM5alMMwG5s1O42fVCc9n1QC83UQ1Nkvg 0400qpsQuecUhR+fWg85jbzau3xe5Lvzb0rVk4pPD8xThTUuKgmNyzwDbdZyzC/CnMKI lltFesf8N46jjDfcP3wjiAV5hnXgxcx9tn0gMQunigZ2I0VhHJCB4V+vBdb6kVq06e9d 6Ivl8+dvOE7irrpppajaMTahgB+NrOmXv926f/3QFTenuMtexqIcisjf/QXASvuIr/z1 M3MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=dPH2ZMGl; 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=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si4545045ejk.69.2020.12.18.06.33.24; Fri, 18 Dec 2020 06:33:47 -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=@raspberrypi.com header.s=google header.b=dPH2ZMGl; 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=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbgLROaN (ORCPT + 99 others); Fri, 18 Dec 2020 09:30:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727376AbgLROaN (ORCPT ); Fri, 18 Dec 2020 09:30:13 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6675C0617A7 for ; Fri, 18 Dec 2020 06:29:32 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id q75so2789467wme.2 for ; Fri, 18 Dec 2020 06:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fQcnaVeKn76lYRwiXKR4yvTyQ/9Lgo43QJdLzaw88No=; b=dPH2ZMGlXf7qxs4VLNk1sqQ6DOFTn3EJphiLC07Hd/sKNpQ9O+b48p1oN5bMMLsNcw hUCxxdBSaWxlRLCiL9I/Tfv7Ip15ldWsKrB+y0tzx17DQZbd5X0qybJL4dS6oezkjXuL 1YSWS2M66tLqmHYc3wFa0FqObn3OYwwVpqrlVgWf01NBCJq8VBu1OVSdI4xzZvIqedxg 0eUb8r35JQVUXYis0AZPc+9VNUaDtE9dWc6DIn2A/6aZsBXFJBtRfvgj9tL/HyxINwoa hYGargZwS5AyYExBC9Pyy1MRNHD2HRaJI2tnVrHRDiAkjnG+32WYgMNbODrH25LBY6hy w3JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fQcnaVeKn76lYRwiXKR4yvTyQ/9Lgo43QJdLzaw88No=; b=DEl2svOJE7J/MijSxHxWSCXhsnfdCaCD1JSwQx9MgD1ZtrKGDGGiRbvSl86kqyk/2Y C1Zdx6LUwVFLOTVk6aSHntLhJCqNvR6L2lGEAdFl1tNy5pS51pPHFcSgIrrRDKjKIFp7 KVyDptM11Rwf/8JJL95Jb6s57ecw6F2XjI244GbfpGF2983JBPgCciyyXJ21kKjF9Q0j OuY7/t+9JFJ6TbB341m81WSsfW79XnTPchlSgqJA/HGk9LtgZxhMsqetoOfPOUmtsSwL 16v6ZADYuCPgoWNiRbYrh82Dj0GJaa2V6Sw2a9zvUz94WdvG2ZYmDZrDfaZisqYWZv9y z0oA== X-Gm-Message-State: AOAM532SgTSiopYwF32mYzeErh89iW/1Lfp5yqMyAGiSRE5zLMM25+Cu LST+ykcT6JpMKmzygg+/sX2444Rb5qwyFoNzplOPhA== X-Received: by 2002:a1c:bc88:: with SMTP id m130mr4645539wmf.82.1608301771650; Fri, 18 Dec 2020 06:29:31 -0800 (PST) MIME-Version: 1.0 References: <20201210134648.272857-1-maxime@cerno.tech> <20201210134648.272857-13-maxime@cerno.tech> In-Reply-To: <20201210134648.272857-13-maxime@cerno.tech> From: Dave Stevenson Date: Fri, 18 Dec 2020 14:29:14 +0000 Message-ID: Subject: Re: [PATCH 12/15] drm/vc4: hdmi: Don't register the CEC adapter if there's no interrupts To: Maxime Ripard Cc: Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , Jason Cooper , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Linux Media Mailing List , Hans Verkuil , LKML , Mauro Carvalho Chehab , Thomas Gleixner , linux-rpi-kernel@lists.infradead.org, DRI Development Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Dec 2020 at 13:47, Maxime Ripard wrote: > > 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 Reviewed-by: Dave Stevenson > --- > 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 >