From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> To: Doug Anderson <dianders@chromium.org> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, Jernej Skrabec <jernej.skrabec@gmail.com>, Neil Armstrong <narmstrong@baylibre.com>, David Airlie <airlied@linux.ie>, Robert Foss <robert.foss@linaro.org>, Jonas Karlman <jonas@kwiboo.se>, open list <linux-kernel@vger.kernel.org>, dri-devel <dri-devel@lists.freedesktop.org>, Linux-Renesas <linux-renesas-soc@vger.kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Sam Ravnborg <sam@ravnborg.org> Subject: Re: [PATCH v4 3/3] drm/bridge: ti-sn65dsi86: Support hotplug detection Date: Wed, 23 Mar 2022 22:11:25 +0000 [thread overview] Message-ID: <164807348512.1092274.4092058426102648400@Monstersaurus> (raw) In-Reply-To: <CAD=FV=WmkYg33qsXS4znQ8K2H0xVhJfZoPC+HjKt-rPhZ_R4KA@mail.gmail.com> Quoting Doug Anderson (2022-03-23 21:47:17) > Hi, > > On Thu, Mar 17, 2022 at 6:13 AM Kieran Bingham > <kieran.bingham+renesas@ideasonboard.com> wrote: > > > > @@ -1241,9 +1350,32 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev, > > pdata->bridge.type = pdata->next_bridge->type == DRM_MODE_CONNECTOR_DisplayPort > > ? DRM_MODE_CONNECTOR_DisplayPort : DRM_MODE_CONNECTOR_eDP; > > > > - if (pdata->bridge.type == DRM_MODE_CONNECTOR_DisplayPort) > > + if (pdata->bridge.type == DRM_MODE_CONNECTOR_DisplayPort) { > > pdata->bridge.ops = DRM_BRIDGE_OP_EDID; > > > > + if (!pdata->no_hpd) > > + pdata->bridge.ops |= DRM_BRIDGE_OP_DETECT; > > + } > > + > > + if (!pdata->no_hpd && pdata->irq > 0) { > > + ret = devm_request_threaded_irq(pdata->dev, pdata->irq, NULL, > > + ti_sn65dsi86_irq_handler, > > + IRQF_ONESHOT, "sn65dsi86-irq", > > + pdata); > > + if (ret) > > + return dev_err_probe(pdata->dev, ret, > > + "Failed to register DP interrupt\n"); > > + > > + /* Enable IRQ based HPD */ > > + pdata->bridge.ops |= DRM_BRIDGE_OP_HPD; > > + > > + /* > > + * Keep the IRQ disabled initially. It will only be enabled when > > + * requested through ti_sn_bridge_hpd_enable(). > > + */ > > + disable_irq(pdata->irq); > > Instead, I think you should use `IRQF_NO_AUTOEN` which makes sure that > no matter what the state of the hardware is your IRQ won't fire > "early". ...and, of course, it saves a line of code. ;-) > > Other than that this looks nice to me now so feel free to add my Aha, thanks, - didn't realise I could do that. I'll remove the disable_irq, and move the coment above devm_request_threaded_irq, it still makes sense there with the flag. I believe I've got the format handling solved on the NO_CONNECTOR patch from Rob/Sam, so I'm just waiting for some spare cycles to get back and clean up - and repost the whole of this work as a new series, incorporating Sam, Rob and Laurent's work with this on top. -- Kieran > Reviewed-by tag after the above is fixed. > > -Doug
WARNING: multiple messages have this Message-ID (diff)
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> To: Doug Anderson <dianders@chromium.org> Cc: Sam Ravnborg <sam@ravnborg.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Linux-Renesas <linux-renesas-soc@vger.kernel.org>, dri-devel <dri-devel@lists.freedesktop.org>, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <narmstrong@baylibre.com>, Robert Foss <robert.foss@linaro.org>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, open list <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v4 3/3] drm/bridge: ti-sn65dsi86: Support hotplug detection Date: Wed, 23 Mar 2022 22:11:25 +0000 [thread overview] Message-ID: <164807348512.1092274.4092058426102648400@Monstersaurus> (raw) In-Reply-To: <CAD=FV=WmkYg33qsXS4znQ8K2H0xVhJfZoPC+HjKt-rPhZ_R4KA@mail.gmail.com> Quoting Doug Anderson (2022-03-23 21:47:17) > Hi, > > On Thu, Mar 17, 2022 at 6:13 AM Kieran Bingham > <kieran.bingham+renesas@ideasonboard.com> wrote: > > > > @@ -1241,9 +1350,32 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev, > > pdata->bridge.type = pdata->next_bridge->type == DRM_MODE_CONNECTOR_DisplayPort > > ? DRM_MODE_CONNECTOR_DisplayPort : DRM_MODE_CONNECTOR_eDP; > > > > - if (pdata->bridge.type == DRM_MODE_CONNECTOR_DisplayPort) > > + if (pdata->bridge.type == DRM_MODE_CONNECTOR_DisplayPort) { > > pdata->bridge.ops = DRM_BRIDGE_OP_EDID; > > > > + if (!pdata->no_hpd) > > + pdata->bridge.ops |= DRM_BRIDGE_OP_DETECT; > > + } > > + > > + if (!pdata->no_hpd && pdata->irq > 0) { > > + ret = devm_request_threaded_irq(pdata->dev, pdata->irq, NULL, > > + ti_sn65dsi86_irq_handler, > > + IRQF_ONESHOT, "sn65dsi86-irq", > > + pdata); > > + if (ret) > > + return dev_err_probe(pdata->dev, ret, > > + "Failed to register DP interrupt\n"); > > + > > + /* Enable IRQ based HPD */ > > + pdata->bridge.ops |= DRM_BRIDGE_OP_HPD; > > + > > + /* > > + * Keep the IRQ disabled initially. It will only be enabled when > > + * requested through ti_sn_bridge_hpd_enable(). > > + */ > > + disable_irq(pdata->irq); > > Instead, I think you should use `IRQF_NO_AUTOEN` which makes sure that > no matter what the state of the hardware is your IRQ won't fire > "early". ...and, of course, it saves a line of code. ;-) > > Other than that this looks nice to me now so feel free to add my Aha, thanks, - didn't realise I could do that. I'll remove the disable_irq, and move the coment above devm_request_threaded_irq, it still makes sense there with the flag. I believe I've got the format handling solved on the NO_CONNECTOR patch from Rob/Sam, so I'm just waiting for some spare cycles to get back and clean up - and repost the whole of this work as a new series, incorporating Sam, Rob and Laurent's work with this on top. -- Kieran > Reviewed-by tag after the above is fixed. > > -Doug
next prev parent reply other threads:[~2022-03-23 22:11 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-17 13:12 [PATCH v4 0/3] drm/bridge: ti-sn65dsi86: Support non-eDP DisplayPort connectors Kieran Bingham 2022-03-17 13:12 ` [PATCH v4 1/3] drm/bridge: ti-sn65dsi86: Support DisplayPort (non-eDP) mode Kieran Bingham 2022-03-17 13:12 ` Kieran Bingham 2022-03-17 13:12 ` [PATCH v4 2/3] drm/bridge: ti-sn65dsi86: Implement bridge connector operations Kieran Bingham 2022-03-17 13:12 ` Kieran Bingham 2022-03-23 21:47 ` Doug Anderson 2022-03-23 21:47 ` Doug Anderson 2022-03-17 13:12 ` [PATCH v4 3/3] drm/bridge: ti-sn65dsi86: Support hotplug detection Kieran Bingham 2022-03-17 13:12 ` Kieran Bingham 2022-03-23 21:47 ` Doug Anderson 2022-03-23 21:47 ` Doug Anderson 2022-03-23 22:11 ` Kieran Bingham [this message] 2022-03-23 22:11 ` Kieran Bingham
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=164807348512.1092274.4092058426102648400@Monstersaurus \ --to=kieran.bingham+renesas@ideasonboard.com \ --cc=airlied@linux.ie \ --cc=andrzej.hajda@intel.com \ --cc=dianders@chromium.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=jernej.skrabec@gmail.com \ --cc=jonas@kwiboo.se \ --cc=laurent.pinchart+renesas@ideasonboard.com \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=narmstrong@baylibre.com \ --cc=robert.foss@linaro.org \ --cc=sam@ravnborg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.