[igt-dev] [i-g-t] tests/kms_flip: disable DRRS if eDP support variable refresh rate

Lee Shawn C shawn.c.lee at intel.com
Sun Oct 22 14:09:59 UTC 2023


Just like https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/148.

kms_flip used the same way to calculate frametime. It may have chance
to encounter this issue and get unexpected frame time due to DUT at
low RR mode. So disable DRRS after crtc setmode can avoid driver switch
to lower RR mode automatically to avoid this problem.

Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
Cc: Vidya Srinivas <vidya.srinivas at intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee at intel.com>
---
 tests/kms_flip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 2c60cdf6db64..fc7cee0501c4 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -30,6 +30,7 @@
 #include "config.h"
 
 #include "igt.h"
+#include "i915/intel_drrs.h"
 
 #include <cairo.h>
 #include <errno.h>
@@ -911,6 +912,9 @@ static int set_mode(struct test_output *o, uint32_t fb, int x, int y)
 				     conn, count, mode);
 		if (ret)
 			return ret;
+
+		if (is_intel_device(drm_fd))
+			intel_drrs_disable(drm_fd, o->pipe);
 	}
 
 	return 0;
-- 
2.34.1



More information about the igt-dev mailing list