tests/kms_flip: disable DRRS if eDP support variable refresh rate
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.
--- tests/kms_flip.c | 4 ++++ 1 file changed, 4 insertions(+)
tests/kms_flip.c +4 -0
@@ -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 ;
Signature · 1 line
2.34.1
Modem, Bhanuprakash
Reviewed-byQuoted 30 lines · Lee Shawn C
Just like https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/148.
kms_flipused 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 <[email protected]>Cc Vidya Srinivas <[email protected]>Cc Juha-Pekka Heikkila <[email protected]>Cc Bhanuprakash Modem <[email protected]>Cc Kamil Konieczny <[email protected]>Signed-off-by Lee Shawn C <[email protected]>--- tests/kms_flip.c | 4 ++++ 1 file changed, 4 insertions(+)tests/kms_flip.c +1
-0@@ -30,6 +30,7 @@#include "config.h" #include "igt.h" +#include "i915/intel_drrs.h" #include <cairo.h> #include <errno.h>
tests/kms_flip.c static int set_mode(struct test_output *o, uint32_t fb, int x, int y) · line 917
Quoted 6 lines
tests/kms_flip.c +3
-0@@ -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);
LGTM
- Bhanu
Quoted 3 lines
tests/kms_flip.c +0
-0}return 0 ;