summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-01-23 21:37:07 +0200
committerJani Nikula <jani.nikula@intel.com>2024-02-08 17:10:33 +0200
commitd807ad80d811ba0c22adfd871e2a46491f80d6e2 (patch)
tree65ead22c9c2ce056d1742cfca18549145fa1152e /include/drm
parentef8d8df3cb06fb99856bb7164b50ff52d6b07e66 (diff)
downloadlinux-d807ad80d811ba0c22adfd871e2a46491f80d6e2.tar.gz
linux-d807ad80d811ba0c22adfd871e2a46491f80d6e2.tar.bz2
linux-d807ad80d811ba0c22adfd871e2a46491f80d6e2.zip
drm/bridge: add ->edid_read hook and drm_bridge_edid_read()
Add new struct drm_edid based ->edid_read hook and drm_bridge_edid_read() function to call the hook. v2: Include drm/drm_edid.h Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/9d08d22eaffcb9c59a2b677e45d7e61fc689bc2f.1706038510.git.jani.nikula@intel.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_bridge.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index e39da5807ba7..b7aed3ead705 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -558,6 +558,37 @@ struct drm_bridge_funcs {
struct drm_connector *connector);
/**
+ * @edid_read:
+ *
+ * Read the EDID data of the connected display.
+ *
+ * The @edid_read callback is the preferred way of reporting mode
+ * information for a display connected to the bridge output. Bridges
+ * that support reading EDID shall implement this callback and leave
+ * the @get_modes callback unimplemented.
+ *
+ * The caller of this operation shall first verify the output
+ * connection status and refrain from reading EDID from a disconnected
+ * output.
+ *
+ * This callback is optional. Bridges that implement it shall set the
+ * DRM_BRIDGE_OP_EDID flag in their &drm_bridge->ops.
+ *
+ * The connector parameter shall be used for the sole purpose of EDID
+ * retrieval, and shall not be stored internally by bridge drivers for
+ * future usage.
+ *
+ * RETURNS:
+ *
+ * An edid structure newly allocated with drm_edid_alloc() or returned
+ * from drm_edid_read() family of functions on success, or NULL
+ * otherwise. The caller is responsible for freeing the returned edid
+ * structure with drm_edid_free().
+ */
+ const struct drm_edid *(*edid_read)(struct drm_bridge *bridge,
+ struct drm_connector *connector);
+
+ /**
* @get_edid:
*
* Read and parse the EDID data of the connected display.
@@ -888,6 +919,8 @@ drm_atomic_helper_bridge_propagate_bus_fmt(struct drm_bridge *bridge,
enum drm_connector_status drm_bridge_detect(struct drm_bridge *bridge);
int drm_bridge_get_modes(struct drm_bridge *bridge,
struct drm_connector *connector);
+const struct drm_edid *drm_bridge_edid_read(struct drm_bridge *bridge,
+ struct drm_connector *connector);
struct edid *drm_bridge_get_edid(struct drm_bridge *bridge,
struct drm_connector *connector);
void drm_bridge_hpd_enable(struct drm_bridge *bridge,