xf86-video-amdgpu: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 16 17:45:31 UTC 2019


 src/amdgpu_kms.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a1b479c7d0066c481af920f297d6af9009dda11e
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Tue Jan 15 17:55:27 2019 +0100

    Don't allow TearFree scanout flips to complete in the same vblank period
    
    We were using a relative target of 0, meaning "complete the flip ASAP".
    This could result in the flip sometimes, but not always completing in
    the same vertical blank period where the corresponding drawing occurred,
    potentially causing judder artifacts with applications updating their
    window contents synchronized to the display refresh. A good way to test
    this is the vsynctester.com site in a windowed browser, where the judder
    results in the large "VSYNC" text intermittently appearing red or cyan
    instead of the expected gray.
    
    To avoid this, use a relative target MSC of 1, meaning that if a
    vertical blank period is in progress, the flip will only complete in the
    next one.
    
    Reported by Julian Tempel and Brandon Wright in
    https://bugs.freedesktop.org/106175 .
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 47e2170..feefd67 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -823,7 +823,7 @@ amdgpu_prime_scanout_flip(PixmapDirtyUpdatePtr ent)
 
 	if (drmmode_page_flip_target_relative(pAMDGPUEnt, drmmode_crtc,
 					      drmmode_crtc->flip_pending->handle,
-					      0, drm_queue_seq, 0) != 0) {
+					      0, drm_queue_seq, 1) != 0) {
 		if (!(drmmode_crtc->scanout_status & DRMMODE_SCANOUT_FLIP_FAILED)) {
 			xf86DrvMsg(scrn->scrnIndex, X_WARNING,
 				   "flip queue failed in %s: %s, TearFree inactive\n",
@@ -1132,7 +1132,7 @@ amdgpu_scanout_flip(ScreenPtr pScreen, AMDGPUInfoPtr info,
 
 	if (drmmode_page_flip_target_relative(pAMDGPUEnt, drmmode_crtc,
 					      drmmode_crtc->flip_pending->handle,
-					      0, drm_queue_seq, 0) != 0) {
+					      0, drm_queue_seq, 1) != 0) {
 		if (!(drmmode_crtc->scanout_status & DRMMODE_SCANOUT_FLIP_FAILED)) {
 			xf86DrvMsg(scrn->scrnIndex, X_WARNING,
 				   "flip queue failed in %s: %s, TearFree inactive\n",


More information about the xorg-commit mailing list