]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/lvds: switch to drm_edid_read_switcheroo()
authorJani Nikula <jani.nikula@intel.com>
Tue, 30 May 2023 09:08:22 +0000 (12:08 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 2 Jun 2023 10:23:30 +0000 (13:23 +0300)
Use drm_edid_read_switcheroo() to switch from struct edid to struct
drm_edid.

Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/429cd6f23366cb4cace4fa13cf92ad068aca64dd.1685437501.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_lvds.c

index 1f4349a12a026a3b012de1cecc13a15679992c89..3ace56979b70e0bed3bc442624a23a603a8d7036 100644 (file)
@@ -944,17 +944,8 @@ void intel_lvds_init(struct drm_i915_private *i915)
         */
        mutex_lock(&i915->drm.mode_config.mutex);
        if (vga_switcheroo_handler_flags() & VGA_SWITCHEROO_CAN_SWITCH_DDC) {
-               const struct edid *edid;
-
-               /* FIXME: Make drm_get_edid_switcheroo() return drm_edid */
-               edid = drm_get_edid_switcheroo(&connector->base,
-                                              intel_gmbus_get_adapter(i915, pin));
-               if (edid) {
-                       drm_edid = drm_edid_alloc(edid, (edid->extensions + 1) * EDID_LENGTH);
-                       kfree(edid);
-               } else {
-                       drm_edid = NULL;
-               }
+               drm_edid = drm_edid_read_switcheroo(&connector->base,
+                                                   intel_gmbus_get_adapter(i915, pin));
        } else {
                drm_edid = drm_edid_read_ddc(&connector->base,
                                             intel_gmbus_get_adapter(i915, pin));