We need to be able to identify if the issue is feature related
or caused by another bug.

Also this feature allow users to have a visual feedback of what to
expect when running the test case for real.

Signed-off-by: Rodrigo Vivi <rodrigo.v...@intel.com>
---
 tests/kms_frontbuffer_tracking.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 312c08e..891fab5 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -239,6 +239,7 @@ struct {
        bool no_edp;
        bool no_suspend;
        bool psr_disabled;
+       bool fbc_disabled;
        bool small_modes;
        bool show_hidden;
        int step;
@@ -254,6 +255,7 @@ struct {
        .no_edp = false,
        .no_suspend = false,
        .psr_disabled = false,
+       .fbc_disabled = false,
        .small_modes = false,
        .show_hidden= false,
        .step = 0,
@@ -1717,8 +1719,13 @@ static void set_sprite_for_test(const struct test_mode 
*t,
 
 static void enable_features_for_test(const struct test_mode *t)
 {
-       if (t->feature & FEATURE_FBC)
-               fbc_enable();
+       if (t->feature & FEATURE_FBC) {
+               if (opt.fbc_disabled) {
+                       igt_info("WARNING: Running with PSR disabled\n");
+                       fbc_disable();
+               } else
+                       fbc_enable();
+       }
        if (t->feature & FEATURE_PSR) {
                if (opt.psr_disabled) {
                        igt_info("WARNING: Running with PSR disabled\n");
@@ -2967,6 +2974,9 @@ static int opt_handler(int option, int option_index, void 
*data)
        case 'R':
                opt.psr_disabled = true;
                break;
+       case 'F':
+               opt.fbc_disabled = true;
+               break;
        case 'm':
                opt.small_modes = true;
                break;
@@ -3011,6 +3021,7 @@ const char *help_str =
 "  --no-edp                    Don't use eDP monitors\n"
 "  --no-suspend                Don't run Suspend/Resume test cases\n"
 "  --psr-disabled              Dry-run. Run tests with PSR feature disabled.\n"
+"  --fbc-disabled              Dry-run. Run tests with FBC feature disabled.\n"
 "  --use-small-modes           Use smaller resolutions for the modes\n"
 "  --show-hidden               Show hidden subtests\n"
 "  --step                      Stop on each step so you can check the screen\n"
@@ -3138,6 +3149,7 @@ int main(int argc, char *argv[])
                { "no-edp",                   0, 0, 'e'},
                { "no-suspend",               0, 0, 'r'},
                { "psr-disabled",             0, 0, 'R'},
+               { "fbc-disabled",             0, 0, 'F'},
                { "use-small-modes",          0, 0, 'm'},
                { "show-hidden",              0, 0, 'i'},
                { "step",                     0, 0, 't'},
-- 
2.4.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to