summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2023-02-17 12:46:27 +0200
committerDmitry Osipenko <dmitry.osipenko@collabora.com>2023-02-27 02:58:38 +0300
commitc5a486af9df7a7180d0f19fd4b6c801da64a154e (patch)
treef10acb3a60cdb94ebc37ab1fe785ed72c757188f /drivers/gpu/drm
parent217a8c63df30246f180760b1e1f3e57267efbb6a (diff)
drm/edid: parse Tiled Display Topology Data Block for DisplayID 2.0
Currently we only parse the Tiled Display Topology Data Block for DisplayID structure version 1.2, but not 2.0. The contents seem to be the same for both, so expand the parsing to structure version 2.0. Note that DisplayID spec version is not the same as DisplayID structure version; DisplayID 1.3 uses structure version 1.2, and DisplayID 2.0-2.1 use structure version 2.0. Lovely. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230217104627.1360015-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/drm_edid.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 03ad53a1ba82..ebab862b8b1a 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -7267,6 +7267,15 @@ static void drm_parse_tiled_block(struct drm_connector *connector,
}
}
+static bool displayid_is_tiled_block(const struct displayid_iter *iter,
+ const struct displayid_block *block)
+{
+ return (displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_12 &&
+ block->tag == DATA_BLOCK_TILED_DISPLAY) ||
+ (displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
+ block->tag == DATA_BLOCK_2_TILED_DISPLAY_TOPOLOGY);
+}
+
static void _drm_update_tile_info(struct drm_connector *connector,
const struct drm_edid *drm_edid)
{
@@ -7277,7 +7286,7 @@ static void _drm_update_tile_info(struct drm_connector *connector,
displayid_iter_edid_begin(drm_edid, &iter);
displayid_iter_for_each(block, &iter) {
- if (block->tag == DATA_BLOCK_TILED_DISPLAY)
+ if (displayid_is_tiled_block(&iter, block))
drm_parse_tiled_block(connector, block);
}
displayid_iter_end(&iter);