linux-stable/drivers/gpu
Maarten Lankhorst 6c5ed5ae35 drm/atomic: Acquire connection_mutex lock in drm_helper_probe_single_connector_modes, v4.
mode_valid() called from drm_helper_probe_single_connector_modes()
may need to look at connector->state because what a valid mode is may
depend on connector properties being set. For example some HDMI modes
might be rejected when a connector property forces the connector
into DVI mode.

Some implementations of detect() already lock all state,
so we have to pass an acquire_ctx to them to prevent a deadlock.

This means changing the function signature of detect() slightly,
and passing the acquire_ctx for locking multiple crtc's.
For the callbacks, it will always be non-zero. To allow callers
not to worry about this, drm_helper_probe_detect_ctx is added
which might handle -EDEADLK for you.

Changes since v1:
- Always set ctx parameter.
Changes since v2:
- Always take connection_mutex when probing.
Changes since v3:
- Remove the ctx from intel_dp_long_pulse, and add
  WARN_ON(!connection_mutex) (danvet)
- Update docs to clarify the locking situation. (danvet)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1491504920-4017-1-git-send-email-maarten.lankhorst@linux.intel.com
2017-04-06 21:29:23 +02:00
..
drm drm/atomic: Acquire connection_mutex lock in drm_helper_probe_single_connector_modes, v4. 2017-04-06 21:29:23 +02:00
host1x gpu: host1x: Set OF node for new host1x devices 2017-01-30 11:47:44 +01:00
ipu-v3 gpu: ipu-v3: only set non-zero AXI ID for IC when PRG is absent 2017-03-16 10:14:49 +01:00
vga Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
Makefile