drm: Pass the drm_dp_aux->hw_mutex to i2c for its locking
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Jun 2016 08:33:17 +0000 (09:33 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 17 Jun 2016 12:38:04 +0000 (14:38 +0200)
commit0c2f6f1a561136a09c5de91889d0aa35e13f73d4
treeaad07b7e38ca52eb8b981501b23e484fb0c35269
parent1cee2a22e5e6f2332bff818ffd2dada0306c0d15
drm: Pass the drm_dp_aux->hw_mutex to i2c for its locking

Rather than have both drm_dp_aux lock within its transfer, and i2c to
lock around the transfer, use the same lock by filling in the locking
callbacks that i2c wants to use. We require our own hw_mutex as we
bypass i2c_transfer for drm_dp_dpcd_access().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Rafael Antognolli <rafael.antognolli@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466152398-20157-2-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_dp_helper.c