]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: sii902x: Retry status read after DDI I2C
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 5 Mar 2018 10:17:02 +0000 (11:17 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 7 Mar 2018 21:48:19 +0000 (22:48 +0100)
commit29f54f117582307005ed04a7acc403668d1a88fd
treea100d4103f0aa011d1e9b8a4706306a2e5107023
parent3165fc316ded22b17cf029ef694f18a81de6686c
drm/bridge: sii902x: Retry status read after DDI I2C

The following happens when connection a DVI output driven
from the SiI9022 using a DVI-to-VGA adapter plug:

i2c i2c-0: sendbytes: NAK bailout.
i2c i2c-0: sendbytes: NAK bailout.

Then no picture. Apparently the I2C engine inside the SiI9022
is not smart enough to try to fall back to DDC I2C. Or the
vendor have not integrated the electronics properly. I don't
know which one it is.

After this, the I2C bus seems stalled and the first attempt to
read the status register fails, and the code returns with
negative return value, and the display fails to initialized.

Instead, retry status readout five times and continue even
if this fails.

Tested on the ARM Versatile Express with a DVI-to-VGA
connector, it now gives picture.

Introduce a helper struct device *dev variable to make
the code more readable.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180305101702.13441-1-linus.walleij@linaro.org
drivers/gpu/drm/bridge/sii902x.c