]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/edid: add drm_edid helper for drm_update_tile_info()
authorJani Nikula <jani.nikula@intel.com>
Mon, 9 May 2022 12:03:22 +0000 (15:03 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 13 May 2022 15:55:09 +0000 (18:55 +0300)
We'll need to propagate drm_edid everywhere.

v2: Handle NULL EDID pointer (Ville, CI)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5b36683b656446a4d9a172d4dca1cf9aca08a48b.1652097712.git.jani.nikula@intel.com
drivers/gpu/drm/drm_edid.c

index 08fb6b0bb7486ca29c2cb46368668382ec32a06d..30c33fdc52fcbfa76d7bdda64bd47a48f1e796c0 100644 (file)
@@ -6364,15 +6364,15 @@ static void drm_parse_tiled_block(struct drm_connector *connector,
        }
 }
 
-void drm_update_tile_info(struct drm_connector *connector,
-                         const struct edid *edid)
+static void _drm_update_tile_info(struct drm_connector *connector,
+                                 const struct drm_edid *drm_edid)
 {
        const struct displayid_block *block;
        struct displayid_iter iter;
 
        connector->has_tile = false;
 
-       displayid_iter_edid_begin(edid, &iter);
+       displayid_iter_edid_begin(drm_edid ? drm_edid->edid : NULL, &iter);
        displayid_iter_for_each(block, &iter) {
                if (block->tag == DATA_BLOCK_TILED_DISPLAY)
                        drm_parse_tiled_block(connector, block);
@@ -6384,3 +6384,11 @@ void drm_update_tile_info(struct drm_connector *connector,
                connector->tile_group = NULL;
        }
 }
+
+void drm_update_tile_info(struct drm_connector *connector,
+                         const struct edid *edid)
+{
+       struct drm_edid drm_edid;
+
+       _drm_update_tile_info(connector, drm_edid_legacy_init(&drm_edid, edid));
+}