]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/bridge: remove ->get_edid callback
authorJani Nikula <jani.nikula@intel.com>
Tue, 23 Jan 2024 19:37:45 +0000 (21:37 +0200)
committerJani Nikula <jani.nikula@intel.com>
Fri, 9 Feb 2024 08:16:20 +0000 (10:16 +0200)
There are no more users of the ->get_edid callback left. They've all
been converted to ->edid_read. Remove the callback, and the fallback in
drm_bridge_edid_read().

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/34407a355ec6848fc44f8c30d245fcbc5687195e.1706038510.git.jani.nikula@intel.com
drivers/gpu/drm/drm_bridge.c
include/drm/drm_bridge.h

index a3065d4aa3d67fb18156a9f728995a2f3f3b13e0..521a71c61b16453a3651ecb2aa73f11344b85f89 100644 (file)
@@ -1216,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_funcs.get_edid and wrapping it in struct drm_edid.
- *
  * RETURNS:
  * The retrieved EDID on success, or NULL otherwise.
  */
@@ -1228,22 +1225,6 @@ 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 = bridge->funcs->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);
index ee12f829aaf718a7a2af3b139714679167dcc3d9..7293c02e17c54c7850a4b8a8ad2b140fa9a08f8a 100644 (file)
@@ -588,36 +588,6 @@ struct drm_bridge_funcs {
        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.
-        *
-        * The @get_edid 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 parsing, and shall not be stored internally by bridge
-        * drivers for future usage.
-        *
-        * RETURNS:
-        *
-        * An edid structure newly allocated with kmalloc() (or similar) on
-        * success, or NULL otherwise. The caller is responsible for freeing
-        * the returned edid structure with kfree().
-        */
-       struct edid *(*get_edid)(struct drm_bridge *bridge,
-                                struct drm_connector *connector);
-
        /**
         * @hpd_notify:
         *