linux-stable/drivers/gpu/drm/msm
Kuogee Hsieh 5ebcece2fd drm/msm/dp: Always clear mask bits to disable interrupts at dp_ctrl_reset_irq_ctrl()
[ Upstream commit 993a2adc6e ]

dp_catalog_ctrl_reset() will software reset DP controller. But it will
not reset programmable registers to default value. DP driver still have
to clear mask bits to interrupt status registers to disable interrupts
after software reset of controller.

At current implementation, dp_ctrl_reset_irq_ctrl() will software reset dp
controller but did not call dp_catalog_ctrl_enable_irq(false) to clear hpd
related interrupt mask bits to disable hpd related interrupts due to it
mistakenly think hpd related interrupt mask bits will be cleared by software
reset of dp controller automatically. This mistake may cause system to crash
during suspending procedure due to unexpected irq fired and trigger event
thread to access dp controller registers with controller clocks are disabled.

This patch fixes system crash during suspending problem by removing "enable"
flag condition checking at dp_ctrl_reset_irq_ctrl() so that hpd related
interrupt mask bits are cleared to prevent unexpected from happening.

Changes in v2:
-- add more details commit text

Changes in v3:
-- add synchrons_irq()
-- add atomic_t suspended

Changes in v4:
-- correct Fixes's commit ID
-- remove synchrons_irq()

Changes in v5:
-- revise commit text

Changes in v6:
-- add event_lock to protect "suspended"

Changes in v7:
-- delete "suspended" flag

Fixes: 989ebe7bc4 ("drm/msm/dp: do not initialize phy until plugin interrupt received")
Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/486591/
Link: https://lore.kernel.org/r/1652804494-19650-1-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:41:25 +02:00
..
adreno drm/msm: simplify gpu_busy callback 2022-06-09 10:26:02 +02:00
disp drm/msm/dpu: fix error check return value of irq_of_parse_and_map() 2022-06-09 10:26:05 +02:00
dp drm/msm/dp: Always clear mask bits to disable interrupts at dp_ctrl_reset_irq_ctrl() 2022-06-14 18:41:25 +02:00
dsi drm/msm/dsi: fix address for second DSI PHY on SDM660 2022-06-09 10:25:47 +02:00
hdmi drm/msm/hdmi: fix error check return value of irq_of_parse_and_map() 2022-06-09 10:25:45 +02:00
Kconfig drm/msm/dp: displayPort driver need algorithm rational 2021-12-07 14:47:11 -08:00
Makefile drm/msm/hdmi: switch to drm_bridge_connector 2021-12-07 14:47:11 -08:00
msm_atomic.c drm/msm: Add hrtimer + kthread_work helper 2021-10-15 16:35:39 -07:00
msm_atomic_trace.h
msm_atomic_tracepoints.c
msm_debugfs.c drm/msm/debugfs: Add display/kms state snapshot 2021-12-16 09:51:24 -08:00
msm_debugfs.h
msm_drv.c drm/msm: don't free the IRQ if it was not requested 2022-06-09 10:25:55 +02:00
msm_drv.h drm/msm/dp: employ bridge mechanism for display enable and disable 2021-12-07 15:23:24 -08:00
msm_fb.c
msm_fbdev.c drm/msm: Remove unnecessary struct_mutex 2021-11-28 09:50:33 -08:00
msm_fence.c
msm_fence.h drm/msm: Handle fence rollover 2021-11-28 09:56:47 -08:00
msm_gem.c drm/msm: Add missing put_task_struct() in debugfs path 2022-04-20 09:36:11 +02:00
msm_gem.h Merge drm/drm-next into drm-misc-next 2021-09-14 09:25:30 +02:00
msm_gem_prime.c drm/msm: return an error pointer in msm_gem_prime_get_sg_table() 2022-06-09 10:25:48 +02:00
msm_gem_shrinker.c treewide: Add missing includes masked by cgroup -> bpf dependency 2021-12-03 10:58:13 -08:00
msm_gem_submit.c drm/msm/gpu: Don't allow zero fence_id 2021-12-07 14:34:18 -08:00
msm_gem_vma.c
msm_gpu.c drm/msm/gpu: Wait for idle before suspending 2022-01-25 08:54:41 -08:00
msm_gpu.h drm/msm: return the average load over the polling period 2022-06-09 10:26:03 +02:00
msm_gpu_devfreq.c drm/msm: return the average load over the polling period 2022-06-09 10:26:03 +02:00
msm_gpu_trace.h
msm_gpu_tracepoints.c
msm_gpummu.c
msm_iommu.c
msm_kms.h drm/msm: don't free the IRQ if it was not requested 2022-06-09 10:25:55 +02:00
msm_mmu.h
msm_perf.c drm/msm: Remove struct_mutex usage 2021-11-28 09:50:33 -08:00
msm_rd.c drm/msm: Remove struct_mutex usage 2021-11-28 09:50:33 -08:00
msm_ringbuffer.c drm/msm: Remove struct_mutex usage 2021-11-28 09:50:33 -08:00
msm_ringbuffer.h
msm_submitqueue.c drm/msm: unlock on error in get_sched_entity() 2021-10-15 16:52:32 -07:00
NOTES