mirror_ubuntu-kernels/drivers/gpu/drm/vc4
Maxime Ripard da94e9c64c
drm/vc4: hdmi: Remove mutex in detect
We recently introduced a new mutex to protect concurrent execution of
ALSA and KMS hooks, and the concurrent access to some of vc4_hdmi
fields.

However, using it in the detect hook was creating a reentrency issue
with CEC code. Indeed, calling cec_s_phys_addr_from_edid from detect
might call the CEC adap_enable hook with the lock held, eventually
resulting in a deadlock.

Since we didn't really need to protect anything at the moment in the CEC
code, the decision was made to ignore the mutex in those CEC hooks,
working around the issue.

However, we can have the same thing happening if we end up triggering a
mode set from the detect callback, for example using
drm_atomic_helper_connector_hdmi_reset_link().

Since we don't really need to protect anything in detect either, let's
just drop the lock in detect, and add it again in CEC.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220829134731.213478-4-maxime@cerno.tech
2022-09-13 16:20:26 +01:00
..
Kconfig drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
Makefile drm/vc4: hdmi: Add PHY init and disable function 2020-09-07 18:06:04 +02:00
vc4_bo.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_crtc.c drm/vc4: crtc: protect device resources after removal 2022-08-25 09:44:26 +02:00
vc4_debugfs.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_dpi.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_drv.c drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_drv.h drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_dsi.c drm/vc4: debugfs: Simplify debugfs registration 2022-07-13 10:46:13 +02:00
vc4_fence.c
vc4_gem.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_hdmi_phy.c drm/vc4: hdmi: Rename pixel_rate variable 2022-03-24 13:43:59 +01:00
vc4_hdmi_regs.h drm/vc4: hdmi: Add MISC_CONTROL register for vc4 2022-06-28 14:56:08 +02:00
vc4_hdmi.c drm/vc4: hdmi: Remove mutex in detect 2022-09-13 16:20:26 +01:00
vc4_hdmi.h drm/vc4: hdmi: Remove mutex in detect 2022-09-13 16:20:26 +01:00
vc4_hvs.c drm/vc4: hvs: protect drm_print_regset32() 2022-08-25 09:44:26 +02:00
vc4_irq.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_kms.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
vc4_packet.h
vc4_perfmon.c drm/vc4: perfmon: Add missing mutex_destroy 2022-07-13 10:46:13 +02:00
vc4_plane.c drm/vc4: plane: protect device resources after removal 2022-08-25 09:44:25 +02:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: drop unexpected word "the" in the comments 2022-06-22 09:22:55 +02:00
vc4_render_cl.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_trace_points.c
vc4_trace.h drm/vc4: add tracepoints for CL submissions 2022-03-17 15:12:25 +01:00
vc4_txp.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_v3d.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_validate_shaders.c drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
vc4_validate.c drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
vc4_vec.c drm/vc4: vec: Fix timings for VEC modes 2022-09-07 10:28:48 +02:00