]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: sync dp link status checks against atomic commmits
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 13 Nov 2017 16:01:40 +0000 (17:01 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 23 Nov 2017 13:59:07 +0000 (14:59 +0100)
commit2d4fbbc384707a5150eb308eb7646d171c4ac1d6
tree4c6301da3957e5db2ebe819e911e1e39cbae70cc
parenta87d49be44ca76fa67a96b34375d71204c5ade5c
drm/i915: sync dp link status checks against atomic commmits

Two bits:
- check actual atomic state, the legacy stuff can only be looked at
  from within the atomic_commit_tail function, since it's only
  protected by ordering and not by any locks.

- Make sure we don't wreak the work an ongoing nonblocking commit is
  doing.

v2: We need the crtc lock too, because a plane update might change it
without having to acquire the connection_mutex (Maarten). Use
Maarten's changes for this locking, while keeping the logic that uses
the connection->commit->hw_done signal for syncing with nonblocking
commits.

v3: The initial state objects from the hw state readout do not have a
commit object. Check for that (spotted by CI).

v4: Fix deadlock from jumping to put_power with locks still held.
    (mlankhorst)

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=103336
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99272
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171113160140.22679-1-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/intel_dp.c