summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2019-03-01 17:42:08 +0100
committerMichel Dänzer <michel@daenzer.net>2019-03-04 17:39:27 +0100
commita2b32e72fdaff3007a79b84929997d8176c2d512 (patch)
tree8509b57c45385f40159125a677e3ec055d8835b7
parent2798244be78df3ef3a7841597577506bfbe50156 (diff)
present: Don't check tiling parameters with DC & DRM minor version >= 31
Current DC handles any changes of tiling parameters for flips. v2: * Just check all tiling bits if DRM minor < 31 or DC is disabled. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
-rw-r--r--src/amdgpu_present.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c
index ce88bd8..fdedd32 100644
--- a/src/amdgpu_present.c
+++ b/src/amdgpu_present.c
@@ -278,12 +278,18 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
return FALSE;
#endif
- /* The kernel driver doesn't handle flipping between BOs with different
- * tiling parameters correctly yet
+ /* Only DC supports advanced color management features, so we can use
+ * drmmode_cm_enabled as a proxy for "Is DC enabled?"
*/
- if (amdgpu_pixmap_get_tiling_info(pixmap) !=
- amdgpu_pixmap_get_tiling_info(screen_pixmap))
- return FALSE;
+ if (info->dri2.pKernelDRMVersion->version_minor < 31 ||
+ !drmmode_cm_enabled(&info->drmmode)) {
+ /* The kernel driver doesn't handle flipping between BOs with
+ * different tiling parameters correctly
+ */
+ if (amdgpu_pixmap_get_tiling_info(pixmap) !=
+ amdgpu_pixmap_get_tiling_info(screen_pixmap))
+ return FALSE;
+ }
for (i = 0, num_crtcs_on = 0; i < config->num_crtc; i++) {
if (drmmode_crtc_can_flip(config->crtc[i]))