]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix race condition in accessing GMBUS
authorYufeng Shen <miletus@chromium.org>
Mon, 13 Feb 2012 22:36:54 +0000 (17:36 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 14 Feb 2012 09:39:53 +0000 (10:39 +0100)
commit88c31a08e38711b7fb44c0fae02a563d83b6e750
tree90067c14702ee364b47c551d1467508329521f28
parent95265829e147b70db433a221054b3cc6d8209814
drm/i915: Fix race condition in accessing GMBUS

GMBUS has several ports and each has it's own corresponding
I2C adpater. When multiple I2C adapters call gmbus_xfer() at
the same time there is a race condition in using the underlying
GMBUS controller. Fixing this by adding a mutex lock when calling
gmbus_xfer().

v2: Moved gmbus_mutex below intel_gmbus and added comments.
Rebased to drm-intel-next-queued.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
[danvet: Shortened the gmbus_mutex comment a bit and add the patch
revision comment to the commit message.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_i2c.c