Hi, On Mon, Sep 15, 2025 at 9:51 AM John Ripple <john.rip...@keysight.com> wrote: > > @@ -1309,6 +1375,41 @@ static int ti_sn_bridge_parse_dsi_host(struct > ti_sn65dsi86 *pdata) > return 0; > } > > +static irqreturn_t ti_sn_bridge_interrupt(int irq, void *private) > +{ > + struct ti_sn65dsi86 *pdata = private; > + struct drm_device *dev = pdata->bridge.dev; > + u8 status; > + int ret; > + bool hpd_event; > + > + ret = ti_sn65dsi86_read_u8(pdata, SN_IRQ_STATUS_REG, &status); > + if (ret) { > + dev_err(pdata->dev, "Failed to read IRQ status: %d\n", ret); > + return IRQ_NONE; > + } > + > + hpd_event = status & (HPD_REMOVAL_STATUS | HPD_INSERTION_STATUS); > + > + dev_dbg(pdata->dev, "(SN_IRQ_STATUS_REG = %#x)\n", status); > + ret = regmap_write(pdata->regmap, SN_IRQ_STATUS_REG, status); > + if (ret) { > + dev_err(pdata->dev, "Failed to clear IRQ status: %d\n", ret); > + return IRQ_NONE; > + } > + > + if (!status) > + return IRQ_NONE; > + > + /* Only send the HPD event if we are bound with a device. */ > + mutex_lock(&pdata->hpd_mutex); > + if (pdata->hpd_enabled && hpd_event) > + drm_kms_helper_hotplug_event(dev); > + mutex_unlock(&pdata->hpd_mutex);
The order above wasn't quite what I was suggesting. I was suggesting: ret = ti_sn65dsi86_read_u8(...); if (ret) { ... } dev_dbg(..., status); if (!status) return IRQ_NONE; ret = regmap_write(..., status); if (ret) { ... } /* Only send ... */ hpd_event = status & ...; mutex_lock(...); ... mutex_unlock(...); ...but it doesn't really matter. I guess it's a little weird that your current code still writes status even if it's 0, but it shouldn't really hurt. There's no need to spin with that change unless you feel like it. At this point I'm happy with things. Thanks for putting up with the review process! Reviewed-by: Douglas Anderson <diand...@chromium.org> I'll plan to give this a week or so in case anyone else wants to jump in, then apply it. I'll also try to find some time this week to test this on a device using ti-sn65dsi86 to make sure nothing breaks, though I don't expect it to. -Doug