lkml.org 
[lkml]   [2012]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] [PATCH] drm/i915: Fix race condition in accessing GMBUS
From
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 that
the LVDS port
, or the DDC port. But when there are I2C transactions on both LVDS
and DDC ports,
since they share the same GMBUS registers, there will be race condition.
Does this make sense to you ?

--- Yufeng Shen

On Mon, Feb 13, 2012 at 4:04 AM, Ben Widawsky <ben@bwidawsk.net> wrote:
> 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 mutex lock when calling
>> gmbus_xfer().
>>
>> Signed-off-by: Yufeng Shen <miletus@chromium.org>
>
> I do not see the race. All the i2c transfers should be protected
> correctly by the i2c core, or else I think we haven't registered our
> device properly. Could you give an example of when/how this can happen?
>
> Ben


\
 
 \ /
  Last update: 2012-02-13 22:41    [W:0.053 / U:2.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site