summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-04-27 11:11:58 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-11-26 20:09:39 +0200
commit18df89fef2d5c7cfd15ab898b17a292d00222b0c (patch)
tree3c9b5f39237e4bd90bb0685b1bfbcdf119ddcd03 /include
parent637e6194e0daf76e2c06cd78528e8d0a24eca3cd (diff)
downloadlinux-18df89fef2d5c7cfd15ab898b17a292d00222b0c.tar.gz
linux-18df89fef2d5c7cfd15ab898b17a292d00222b0c.tar.bz2
linux-18df89fef2d5c7cfd15ab898b17a292d00222b0c.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_edid.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index c2f1bfa22010..d59240ffb1f7 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -381,4 +381,9 @@ static inline int drm_eld_size(const uint8_t *eld)
return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4;
}
+struct edid *drm_do_get_edid(struct drm_connector *connector,
+ int (*get_edid_block)(void *data, u8 *buf, unsigned int block,
+ size_t len),
+ void *data);
+
#endif /* __DRM_EDID_H__ */