drm/bridge: it6505: Check power state with it6505->powered in IRQ handler
authorPin-yen Lin <treapking@chromium.org>
Thu, 27 Jul 2023 10:01:10 +0000 (18:01 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Thu, 3 Aug 2023 08:30:54 +0000 (10:30 +0200)
commite9d699af3f65d62cf195f0e7a039400093ab2af2
tree2471b4af1763686fdd7eb29f55ec2f4677f3840e
parentc71b7aa8619a0c9700132d0733e33999fb614339
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: 5eb9a4314053 ("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
drivers/gpu/drm/bridge/ite-it6505.c