diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2019-07-24 16:05:05 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2019-08-07 18:11:54 +0200 |
commit | e6fce59a071220967fcd4e2c9e4a262c72870761 (patch) | |
tree | a117f997ccb79c9c269591a42fd32060046068e6 | |
parent | 5bb2580b266468f87843b5585ae64e056b63bb88 (diff) |
present: Don't check pixmap pitch in check_flip with non-DC >= 3.34
The current non-DC kernel driver also handles flipping between different
pitches correctly.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
-rw-r--r-- | src/amdgpu_present.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c index 7d46d52..cc3d113 100644 --- a/src/amdgpu_present.c +++ b/src/amdgpu_present.c @@ -260,6 +260,7 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); AMDGPUInfoPtr info = AMDGPUPTR(scrn); int num_crtcs_on; + Bool dc_enabled; int i; if (!scrn->vtSema) @@ -294,14 +295,20 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, /* Only DC supports advanced color management features, so we can use * drmmode_cm_enabled as a proxy for "Is DC enabled?" */ - if (info->dri2.pKernelDRMVersion->version_minor < 31 || - !drmmode_cm_enabled(&info->drmmode)) { + dc_enabled = drmmode_cm_enabled(&info->drmmode); + + if (info->dri2.pKernelDRMVersion->version_minor < (dc_enabled ? 31 : 34)) { /* The kernel driver doesn't handle flipping between BOs with - * different pitch / tiling parameters correctly + * different pitch correctly */ if (pixmap->devKind != screen_pixmap->devKind) return FALSE; + } + if (!dc_enabled || info->dri2.pKernelDRMVersion->version_minor < 31) { + /* 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; |