提交 0cdba07b 编写于 作者: D Dave Airlie 提交者: Jean Delvare

i2c-algo-bit: Fix timeout test

When fetching DDC using i2c algo bit, we were often seeing timeouts
before getting valid EDID on a retry. The VESA spec states 2ms is the
DDC timeout, so when this translates into 1 jiffie and we are close
to the end of the time period, it could return with a timeout less than
2ms.

Change this code to use time_after instead of time_after_eq.
Signed-off-by: NDave Airlie <airlied@redhat.com>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 4ccc28f7
......@@ -104,7 +104,7 @@ static int sclhi(struct i2c_algo_bit_data *adap)
* chips may hold it low ("clock stretching") while they
* are processing data internally.
*/
if (time_after_eq(jiffies, start + adap->timeout))
if (time_after(jiffies, start + adap->timeout))
return -ETIMEDOUT;
cond_resched();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册