Skip to content

Commit e9d699a

Browse files
Pin-yen Linsuperna9999
authored andcommitted
drm/bridge: it6505: Check power state with it6505->powered in IRQ handler
On system resume, the driver might call it6505_poweron directly if the runtime PM hasn't been enabled. In such case, pm_runtime_get_if_in_use will always return 0 because dev->power.runtime_status stays at RPM_SUSPENDED, and the IRQ will never be handled. Use it6505->powered from the driver struct fixes this because it always gets updated when it6505_poweron is called. Fixes: 5eb9a43 ("drm/bridge: it6505: Guard bridge power in IRQ handler") Signed-off-by: Pin-yen Lin <treapking@chromium.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230727100131.2338127-1-treapking@chromium.org
1 parent c71b7aa commit e9d699a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/bridge/ite-it6505.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,9 +2517,11 @@ static irqreturn_t it6505_int_threaded_handler(int unused, void *data)
25172517
};
25182518
int int_status[3], i;
25192519

2520-
if (it6505->enable_drv_hold || pm_runtime_get_if_in_use(dev) <= 0)
2520+
if (it6505->enable_drv_hold || !it6505->powered)
25212521
return IRQ_HANDLED;
25222522

2523+
pm_runtime_get_sync(dev);
2524+
25232525
int_status[0] = it6505_read(it6505, INT_STATUS_01);
25242526
int_status[1] = it6505_read(it6505, INT_STATUS_02);
25252527
int_status[2] = it6505_read(it6505, INT_STATUS_03);

0 commit comments

Comments
 (0)