]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
drm: Fix tiled mode detection
authorHans de Goede <hdegoede@redhat.com>
Sun, 26 May 2019 15:54:05 +0000 (17:54 +0200)
committerRay Strode <halfline@gmail.com>
Tue, 28 May 2019 14:52:36 +0000 (14:52 +0000)
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 <hdegoede@redhat.com>
src/plugins/renderers/drm/plugin.c

index 88c9d978329703adb407cb07851118bab8ecc3b4..7ddd9c5f170b4b02b0a8ece1ab64fd7e16ddf23b 100644 (file)
@@ -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) &&