* [PATCH] drm/bridge: it6505: Disable IRQ when powered off
@ 2024-07-19 11:05 Pin-yen Lin
2024-07-25 10:18 ` Robert Foss
0 siblings, 1 reply; 2+ messages in thread
From: Pin-yen Lin @ 2024-07-19 11:05 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec
Cc: Chen-Yu Tsai, Kuro Chung, linux-kernel, dri-devel, Pin-yen Lin
When the bridge is powered off, disable the IRQ until the next power on
to workaround an interrupt storm on some badly-designed hardware.
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
---
drivers/gpu/drm/bridge/ite-it6505.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index 1e1c06fdf206..87b8545fccc0 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -460,6 +460,8 @@ struct it6505 {
bool enable_drv_hold;
const struct drm_edid *cached_edid;
+
+ int irq;
};
struct it6505_step_train_para {
@@ -2624,6 +2626,8 @@ static int it6505_poweron(struct it6505 *it6505)
it6505_init(it6505);
it6505_lane_off(it6505);
+ enable_irq(it6505->irq);
+
return 0;
}
@@ -2640,6 +2644,8 @@ static int it6505_poweroff(struct it6505 *it6505)
return 0;
}
+ disable_irq_nosync(it6505->irq);
+
if (pdata->gpiod_reset)
gpiod_set_value_cansleep(pdata->gpiod_reset, 0);
@@ -3389,7 +3395,7 @@ static int it6505_i2c_probe(struct i2c_client *client)
struct it6505 *it6505;
struct device *dev = &client->dev;
struct extcon_dev *extcon;
- int err, intp_irq;
+ int err;
it6505 = devm_kzalloc(&client->dev, sizeof(*it6505), GFP_KERNEL);
if (!it6505)
@@ -3430,17 +3436,18 @@ static int it6505_i2c_probe(struct i2c_client *client)
it6505_parse_dt(it6505);
- intp_irq = client->irq;
+ it6505->irq = client->irq;
- if (!intp_irq) {
+ if (!it6505->irq) {
dev_err(dev, "Failed to get INTP IRQ");
err = -ENODEV;
return err;
}
- err = devm_request_threaded_irq(&client->dev, intp_irq, NULL,
+ err = devm_request_threaded_irq(&client->dev, it6505->irq, NULL,
it6505_int_threaded_handler,
- IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+ IRQF_TRIGGER_LOW | IRQF_ONESHOT |
+ IRQF_NO_AUTOEN,
"it6505-intp", it6505);
if (err) {
dev_err(dev, "Failed to request INTP threaded IRQ: %d", err);
--
2.45.2.1089.g2a221341d9-goog
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] drm/bridge: it6505: Disable IRQ when powered off
2024-07-19 11:05 [PATCH] drm/bridge: it6505: Disable IRQ when powered off Pin-yen Lin
@ 2024-07-25 10:18 ` Robert Foss
0 siblings, 0 replies; 2+ messages in thread
From: Robert Foss @ 2024-07-25 10:18 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, Pin-yen Lin
Cc: Chen-Yu Tsai, Kuro Chung, linux-kernel, dri-devel
On Fri, 19 Jul 2024 19:05:36 +0800, Pin-yen Lin wrote:
> When the bridge is powered off, disable the IRQ until the next power on
> to workaround an interrupt storm on some badly-designed hardware.
>
>
Applied, thanks!
[1/1] drm/bridge: it6505: Disable IRQ when powered off
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=10ba3753665f
Rob
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-25 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-19 11:05 [PATCH] drm/bridge: it6505: Disable IRQ when powered off Pin-yen Lin
2024-07-25 10:18 ` Robert Foss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®