drm/msm/dp: tie dp_display_irq_handler() with dp driver
authorKuogee Hsieh <quic_khsieh@quicinc.com>
Fri, 1 Dec 2023 23:19:43 +0000 (15:19 -0800)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sun, 3 Dec 2023 00:13:17 +0000 (03:13 +0300)
commit82c2a5751227056a643455d080a389a4b0bfe184
tree3e8070788c11e7c85e8d3dd9794e2f9dcdda2005
parenta1ed5860efd39cb6c7766a94badff0c7616df6f5
drm/msm/dp: tie dp_display_irq_handler() with dp driver

Currently the dp_display_request_irq() is executed at
msm_dp_modeset_init() which ties irq registering to the DPU device's
life cycle, while depending on resources that are released as the DP
device is torn down. Move register DP driver irq handler to
dp_display_probe() to have dp_display_irq_handler() IRQ tied with DP
device. In addition, use platform_get_irq() to retrieve irq number
from platform device directly.

Changes in v5:
-- reworded commit text as review comments at change #4
-- tear down component if failed at dp_display_request_irq()

Changes in v4:
-- delete dp->irq check at dp_display_request_irq()

Changes in v3:
-- move calling dp_display_irq_handler() to probe

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570069/
Link: https://lore.kernel.org/r/1701472789-25951-2-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/dp/dp_display.c
drivers/gpu/drm/msm/dp/dp_display.h