[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-14 Thread Daniel Vetter
On Mon, Feb 13, 2012 at 05:36:54PM -0500, Yufeng Shen wrote: > Moved gmbus_mutex below intel_gmbus and added comments. > Rebased to drm-intel-next-queued. > > > > GMBUS has several ports and each has it's own corresponding > I2C adp

Re: [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-14 Thread Daniel Vetter
On Mon, Feb 13, 2012 at 05:36:54PM -0500, Yufeng Shen wrote: > Moved gmbus_mutex below intel_gmbus and added comments. > Rebased to drm-intel-next-queued. > > > > GMBUS has several ports and each has it's own corresponding > I2C adp

[PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Daniel Vetter
On Fri, Feb 10, 2012 at 12:50:01PM -0500, Yufeng Shen wrote: > 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 mut

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Yufeng Shen
Moved gmbus_mutex below intel_gmbus and added comments. Rebased to drm-intel-next-queued. 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 i

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread y...@google.com
From: Yufeng Shen Moved gmbus_mutex below intel_gmbus and added comments. Rebased to drm-intel-next-queued. GMBUS has several ports and each has it's own corresponding I2C adpater. When multiple I2C adapters call gmbus_xfer() at t

[PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Yufeng Shen
Hi Ben, So I2C core does protect multiple access to one adapter, but I2C core does not protect the case where multiple adapters share the same underlying device. GMBUS has 7 different pin pairs and each pair is registered as an I2C adapter. I2C core can serialize the access to one pin pair, say t

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Yufeng Shen
Moved gmbus_mutex below intel_gmbus and added comments. Rebased to drm-intel-next-queued. 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 i

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread y
From: Yufeng Shen Moved gmbus_mutex below intel_gmbus and added comments. Rebased to drm-intel-next-queued. GMBUS has several ports and each has it's own corresponding I2C adpater. When multiple I2C adapters call gmbus_xfer() at t

Re: [PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Yufeng Shen
Hi Ben, So I2C core does protect multiple access to one adapter, but I2C core does not protect the case where multiple adapters share the same underlying device. GMBUS has 7 different pin pairs and each pair is registered as an I2C adapter. I2C core can serialize the access to one pin pair, say t

Re: [PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Daniel Vetter
On Fri, Feb 10, 2012 at 12:50:01PM -0500, Yufeng Shen wrote: > 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 mut

[PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Ben Widawsky
On Fri, Feb 10, 2012 at 12:50:01PM -0500, Yufeng Shen wrote: > 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 mut

Re: [PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-13 Thread Ben Widawsky
On Fri, Feb 10, 2012 at 12:50:01PM -0500, Yufeng Shen wrote: > 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 mut

[PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-11 Thread Yufeng Shen
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(). Signed-off-by: Yufeng Shen ---

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-10 Thread Daniel Vetter
On Thu, Feb 09, 2012 at 05:14:57PM -0500, Yufeng Shen wrote: > 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 mut

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-10 Thread Eugeni Dodonov
On Thu, Feb 9, 2012 at 20:14, Yufeng Shen wrote: > 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 wh

[PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-10 Thread Yufeng Shen
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(). Signed-off-by: Yufeng Shen ---

Re: [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-10 Thread Daniel Vetter
On Thu, Feb 09, 2012 at 05:14:57PM -0500, Yufeng Shen wrote: > 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 mut

Re: [PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-10 Thread Eugeni Dodonov
On Thu, Feb 9, 2012 at 20:14, Yufeng Shen wrote: > 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 wh

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-09 Thread Yufeng Shen
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(). Signed-off-by: Yufeng Shen ---

[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-09 Thread Yufeng Shen
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(). Signed-off-by: Yufeng Shen ---