drm/msm/dsi: do not enable irq handler before powering up the host
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 2 Oct 2021 01:08:30 +0000 (04:08 +0300)
committerRob Clark <robdclark@chromium.org>
Fri, 15 Oct 2021 20:26:34 +0000 (13:26 -0700)
commitbf94ec093d05e3ed3142d9291b876eeb9997ba5c
treefce7030b324ee810aef7afbab0caa973cd2f2c7f
parentfb25d4474fa009dab169be2eb11d122852dd0684
drm/msm/dsi: do not enable irq handler before powering up the host

The DSI host might be left in some state by the bootloader. If this
state generates an IRQ, it might hang the system by holding the
interrupt line before the driver sets up the DSI host to the known
state.

Move the request_irq into msm_dsi_host_init and pass IRQF_NO_AUTOEN to
it. Call enable/disable_irq after msm_dsi_host_power_on/_off()
functions, so that we can be sure that the interrupt is delivered when
the host is in the known state.

It is not possible to defer the interrupt enablement to a later point,
because drm_panel_prepare might need to communicate with the panel over
the DSI link and that requires working interrupt.

Fixes: a689554ba6ed ("drm/msm: Initial add DSI connector support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Link: https://lore.kernel.org/r/20211002010830.647416-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dsi/dsi.h
drivers/gpu/drm/msm/dsi/dsi_host.c
drivers/gpu/drm/msm/dsi/dsi_manager.c