summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2022-06-08 10:50:35 +0300
committerJani Nikula <jani.nikula@intel.com>2022-06-13 12:30:54 +0300
commit6537f79a2aae65748d402d6c46e79d9e473d42a9 (patch)
treedae361f1a6c403b58396ea7506bc2a3ea966c40d /include/drm
parent407d63b3af881d17c39f16cdd8416adb0e4658bc (diff)
downloadlinux-6537f79a2aae65748d402d6c46e79d9e473d42a9.tar.gz
linux-6537f79a2aae65748d402d6c46e79d9e473d42a9.tar.bz2
linux-6537f79a2aae65748d402d6c46e79d9e473d42a9.zip
drm/edid: add new interfaces around struct drm_edid
Add new functions drm_edid_read(), drm_edid_read_ddc(), and drm_edid_read_custom() to replace drm_get_edid() and drm_do_get_edid() for reading the EDID. The transition is expected to happen over a fairly long time. Note that the new drm_edid_read*() functions do not do any of the connector updates anymore. The reading and parsing will be completely separated from each other. Add new functions drm_edid_alloc(), drm_edid_dup(), and drm_edid_free() for allocating and freeing drm_edid containers. Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/5a6532a94cad6a79424f6d1918dbe7b7d607ac03.1654674560.git.jani.nikula@intel.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_edid.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 1d5950b5b407..c592d2c1afed 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -594,6 +594,15 @@ drm_display_mode_from_cea_vic(struct drm_device *dev,
u8 video_code);
/* Interface based on struct drm_edid */
+const struct drm_edid *drm_edid_alloc(const void *edid, size_t size);
+const struct drm_edid *drm_edid_dup(const struct drm_edid *drm_edid);
+void drm_edid_free(const struct drm_edid *drm_edid);
+const struct drm_edid *drm_edid_read(struct drm_connector *connector);
+const struct drm_edid *drm_edid_read_ddc(struct drm_connector *connector,
+ struct i2c_adapter *adapter);
+const struct drm_edid *drm_edid_read_custom(struct drm_connector *connector,
+ int (*read_block)(void *context, u8 *buf, unsigned int block, size_t len),
+ void *context);
const u8 *drm_find_edid_extension(const struct drm_edid *drm_edid,
int ext_id, int *ext_index);