drm: Decouple EDID parsing from I2C adapter
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 27 Apr 2012 09:11:58 +0000 (11:11 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Thu, 11 Dec 2014 01:39:13 +0000 (10:39 +0900)
commit690c6693e017fb126330a140153942d265cef991
tree7f097f109a295167cb8432da40057411d3903aa1
parent2fca6ef012125b6cfe2407e26928dd40fba592f8
drm: Decouple EDID parsing from I2C adapter

The drm_get_edid() function performs direct I2C accesses to read EDID
blocks, assuming that the monitor DDC interface is directly connected to
the I2C bus. It can't thus be used with HDMI encoders that control the
DDC bus and expose EDID blocks through a different interface.

Refactor drm_do_get_edid() to take a block read callback function
instead of an I2C adapter, and export it for direct use by drivers.

As in the general case the DDC bus is accessible by the kernel at the
I2C level, drivers must make all reasonable efforts to expose it as an
I2C adapter and use drm_get_edid() instead of abusing this function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 18df89fef2d5c7cfd15ab898b17a292d00222b0c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
include/drm/drm_edid.h
drivers/gpu/drm/drm_edid.c
include/drm/drm_edid.h