summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_bridge.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 21:00:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 21:00:30 +0000
commite54def4ad8144ab15f826416e2e0f290ef1901b4 (patch)
tree583f8d4bd95cd67c44ff37b878a7eddfca9ab97a /drivers/gpu/drm/drm_bridge.c
parentAdding upstream version 6.8.12. (diff)
downloadlinux-upstream.tar.xz
linux-upstream.zip
Adding upstream version 6.9.2.upstream/6.9.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/gpu/drm/drm_bridge.c')
-rw-r--r--drivers/gpu/drm/drm_bridge.c53
1 files changed, 2 insertions, 51 deletions
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index ac502ea20..521a71c61 100644
--- a/drivers/gpu/drm/drm_bridge.c
+++ b/drivers/gpu/drm/drm_bridge.c
@@ -687,17 +687,11 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge,
*/
list_for_each_entry_from(next, &encoder->bridge_chain,
chain_node) {
- if (!next->pre_enable_prev_first) {
+ if (next->pre_enable_prev_first) {
next = list_prev_entry(next, chain_node);
limit = next;
break;
}
-
- if (list_is_last(&next->chain_node,
- &encoder->bridge_chain)) {
- limit = next;
- break;
- }
}
/* Call these bridges in reverse order */
@@ -780,7 +774,7 @@ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge,
/* Found first bridge that does NOT
* request prev to be enabled first
*/
- limit = next;
+ limit = list_prev_entry(next, chain_node);
break;
}
}
@@ -1222,9 +1216,6 @@ EXPORT_SYMBOL_GPL(drm_bridge_get_modes);
* DRM_BRIDGE_OP_EDID bridge ops flag, call &drm_bridge_funcs.edid_read to get
* the EDID and return it. Otherwise return NULL.
*
- * If &drm_bridge_funcs.edid_read is not set, fall back to using
- * drm_bridge_get_edid() and wrapping it in struct drm_edid.
- *
* RETURNS:
* The retrieved EDID on success, or NULL otherwise.
*/
@@ -1234,51 +1225,11 @@ const struct drm_edid *drm_bridge_edid_read(struct drm_bridge *bridge,
if (!(bridge->ops & DRM_BRIDGE_OP_EDID))
return NULL;
- /* Transitional: Fall back to ->get_edid. */
- if (!bridge->funcs->edid_read) {
- const struct drm_edid *drm_edid;
- struct edid *edid;
-
- edid = drm_bridge_get_edid(bridge, connector);
- if (!edid)
- return NULL;
-
- drm_edid = drm_edid_alloc(edid, (edid->extensions + 1) * EDID_LENGTH);
-
- kfree(edid);
-
- return drm_edid;
- }
-
return bridge->funcs->edid_read(bridge, connector);
}
EXPORT_SYMBOL_GPL(drm_bridge_edid_read);
/**
- * drm_bridge_get_edid - get the EDID data of the connected display
- * @bridge: bridge control structure
- * @connector: the connector to read EDID for
- *
- * If the bridge supports output EDID retrieval, as reported by the
- * DRM_BRIDGE_OP_EDID bridge ops flag, call &drm_bridge_funcs.get_edid to
- * get the EDID and return it. Otherwise return NULL.
- *
- * Deprecated. Prefer using drm_bridge_edid_read().
- *
- * RETURNS:
- * The retrieved EDID on success, or NULL otherwise.
- */
-struct edid *drm_bridge_get_edid(struct drm_bridge *bridge,
- struct drm_connector *connector)
-{
- if (!(bridge->ops & DRM_BRIDGE_OP_EDID))
- return NULL;
-
- return bridge->funcs->get_edid(bridge, connector);
-}
-EXPORT_SYMBOL_GPL(drm_bridge_get_edid);
-
-/**
* drm_bridge_hpd_enable - enable hot plug detection for the bridge
* @bridge: bridge control structure
* @cb: hot-plug detection callback