From 475ff0fcba57f19b5713500ced58bbeef11bb4c2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 26 May 2019 17:54:05 +0200 Subject: [PATCH] drm: Fix tiled mode detection The TILE property is present on all connectors which are DisplayPort MST (Multi-Stream) outputs, independent if they are connected to a tiled display are not. Starting with the 5.2 kernel, it is actually present on almost all outputs. Rather then just checking if the property is present, check that if it is present it has a valid (non zero) blob-id assigned to it, this fixes us mis-identifying DP MST outputs as always being tiled. Which in turn fixes us failing to pick the preferred mode on these outputs. Signed-off-by: Hans de Goede --- src/plugins/renderers/drm/plugin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c index 88c9d978..7ddd9c5f 100644 --- a/src/plugins/renderers/drm/plugin.c +++ b/src/plugins/renderers/drm/plugin.c @@ -459,7 +459,8 @@ ply_renderer_connector_get_rotation_and_tiled (ply_renderer_backend_t *back output->rotation = connector_orientation_prop_to_rotation (prop, connector->prop_values[i]); if ((prop->flags & DRM_MODE_PROP_BLOB) && - strcmp (prop->name, "TILE") == 0) + strcmp (prop->name, "TILE") == 0 && + connector->prop_values[i] != 0) output->tiled = true; if ((prop->flags & DRM_MODE_PROP_ENUM) &&