Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1412352pxb; Wed, 10 Feb 2021 07:51:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBpsNpvLv+RRuhsidwTNsa4oI4kG9hydFGPwqETVXjmGqs7qXUrB74tc6xCci2TwQEickh X-Received: by 2002:aa7:c889:: with SMTP id p9mr3697881eds.224.1612972269039; Wed, 10 Feb 2021 07:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612972269; cv=none; d=google.com; s=arc-20160816; b=Kefm1TFoKuOCTkOCzKtuKrXvppL8GSn/pQUBwN9CjVcHfK1+OEgS3dSwte3AZ+Rcju 7+98FDs8adl/6a7Cgocl77f3PX1+QmiBfuvYfBrre9KA8wjn5HeH48EoP4R+iYFXCSAL ySERfhoZHNcxM68mHQ6gIG85kmApKKywTxr6U5EEdNI5qYul3lAohjPLk0XryplhG1FS MO6Yo1/8nSdAChw/tzMJC+0T3zv7an1VsUFzWtg7oYbh4LWV9OHJg4xbNZZmp+hixgyY 3/D1z9/f9bK1WJPa7GwlYjc7rASeQPw/5gY5VwZwvdhKP0T2LU1Zu91fytplYMUrYMM6 8Xzg== 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=sYZgMVhM68r4TeIL1eqUcRIh/19tL8LpowcnJQBeiLo=; b=vaHwso+nVvzfzUA0brRMElzmZS7Q2IK7itlKPR+nvPc27PBr3wL0dFjPP1+TCQrsSt 6tk3JIiSefPjg8qXXWIk+ei5Ka4FYCfNSFI1P5adKS4n4G47AQYg/X95r389Zs2uv/in ZUqlval/CvxRCBgoBGFWQtWBcxuTjTR0OB1Z1xP/l/g4ghze8K9LxgcYW6K773ULQobx OKca+7UeJayP2i6pGxzHqlXoL1yhMa/8929C1F+G0N+Ycn9kFalLTxI50tO9/gUDLR+S Mq8EDVqDdQtiSkgVjxKuXfJDaHfvAj3j7O4WV3B7Bw8P+KdaqtBMybeM4Al9ryQf7wgC XeBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=dSUu1ROV; 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 g23si1604942edv.245.2021.02.10.07.50.44; Wed, 10 Feb 2021 07:51:09 -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=dSUu1ROV; 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 S231431AbhBJPuE (ORCPT + 99 others); Wed, 10 Feb 2021 10:50:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbhBJPuC (ORCPT ); Wed, 10 Feb 2021 10:50:02 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D67BCC061574 for ; Wed, 10 Feb 2021 07:49:21 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id y134so2235618wmd.3 for ; Wed, 10 Feb 2021 07:49:21 -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=sYZgMVhM68r4TeIL1eqUcRIh/19tL8LpowcnJQBeiLo=; b=dSUu1ROVfX9VnD5N/wmt0yOiO0MLXBe7aSpyu4quDdFKJc6PcUPDxu3raKXw++Ek0N 2Dv1lat9ACE2l0XH90tJLthIuJJ3Ra+tvFBhVqRhTvZ0+vj+gVyROAl/3EhQHjPllj73 +CzZTMzOIFFwe3xapqnoGAEcClWh0bS70GYqYpvu52mEutOyn7KcA2gjXGCdezMzbk9e 27ICpKRGjdb9NAtti3fPpZO/xY0g72kopq5GBuVgmkxFzZBT+zDzHq3u7Por+bNcQQny HtCGcV48LA+HwGngSoKFUXHkYj6Mrz8dibG32AlXDXQ84UjOg/hIoEPilnHg3PGFMfNZ xPtg== 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=sYZgMVhM68r4TeIL1eqUcRIh/19tL8LpowcnJQBeiLo=; b=PfQF5dCtmjEFhcmiCzMNFPcgWhOVNb596ZNrA500OLhyyIkCWesTTot3JuR/Qr0BzO O0yeLX8wyz3V70X4XvAO1F2ycYHYTFucRvDipnaAZsQ3DibS+WQfJbWL+rAAOK9BLAgW E6ELCyQ1XN7RRC1ZP/awdWps/6n1OrwFdsIq5Omkx56SDz6lYIG6QUz06Uer3SLRoOlY bDyKtTeRR2rWbvxO9dbgYGs1J4Vhaav0HwhYmAN3xL2x5+TvHKVxKGn9SFXNiXkSx9VN p0+VcdablyIYOp+bFN+P+UIaN55vIOHqjBllbeTKvu82tQZyC402LdugWPLmNE0zYFMX wsgg== X-Gm-Message-State: AOAM5324tkIOvDSLAPo/HLiAjP6tJTJM2o7zQMh2aXLLftqdSe05sAzw YCe3u3iQkA0T/qBUbfJxSTd1e48g7Ajb8l+tVZhLTg== X-Received: by 2002:a1c:bc46:: with SMTP id m67mr3534527wmf.82.1612972160635; Wed, 10 Feb 2021 07:49:20 -0800 (PST) MIME-Version: 1.0 References: <20210111142309.193441-1-maxime@cerno.tech> <20210111142309.193441-15-maxime@cerno.tech> <20210210144043.s4plyc7ekwnnu7k4@gilmour> <9d868bf76072fee7838b6f2ff73a575c@kernel.org> In-Reply-To: <9d868bf76072fee7838b6f2ff73a575c@kernel.org> From: Dave Stevenson Date: Wed, 10 Feb 2021 15:49:03 +0000 Message-ID: Subject: Re: [PATCH v2 14/15] ARM: dts: bcm2711: Add the BSC interrupt controller To: Marc Zyngier Cc: Maxime Ripard , Thomas Gleixner , Eric Anholt , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Hans Verkuil , LKML , DRI Development , bcm-kernel-feedback-list@broadcom.com, Mauro Carvalho Chehab , Linux Media Mailing List , Florian Fainelli , Nicolas Saenz Julienne Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc. On Wed, 10 Feb 2021 at 15:30, Marc Zyngier wrote: > > Hi Maxime, > > On 2021-02-10 14:40, Maxime Ripard wrote: > > Hi Dave, > > > > On Tue, Feb 09, 2021 at 09:49:05AM +0000, Dave Stevenson wrote: > >> On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: > >> > > >> > The BSC controllers used for the HDMI DDC have an interrupt controller > >> > shared between both instances. Let's add it to avoid polling. > >> > >> This seems to have unintended side effects. > >> GIC interrupt 117 is shared between the standard I2C controllers > >> (i2c-bcm2835) and the l2-intc block handling the HDMI I2C interrupts. > >> > >> Whilst i2c-bcm2835 requests the interrupt with IRQF_SHARED, that > >> doesn't appear to be an option for l2-intc registering as an interrupt > >> controller. i2c-bcm2835 therefore loses out and fails to register for > >> the interrupt. > >> > >> Is there an equivalent flag that an interrupt controller can add to > >> say that the parent interrupt is shared? Is that even supported? > > > > Indeed, it looks like setting an equivalent to IRQF_SHARED would be the > > solution, but I couldn't find anything that would allow us to in the > > irqchip code. > > > > Marc, Thomas, is it something that is allowed? > > No, not really. That's because the chained handler is actually an > interrupt flow, and not a normal handler. IRQF_SHARED acts at the wrong > level for that. > > I can see two possibilities: > > - the l2-intc gets turned into a normal handler, and does the demux > from there. Horrible stuff. > > - the i2c controller gets parented to the l2c-int as a fake interrupt, > and gets called from there. Horrible stuff. > > Pick your poison... :-/ Thanks for the info. Option 3 - remove l2-intc and drop back to polling the i2c-brcmstb blocks (which the driver supports anyway). HDMI I2C generally isn't heavily used once displays are connected, so I'd be OK with that. (We can keep the l2-intc that handles CEC and HPD as that is on a unique GIC interrupt). Dave