  {
  	uint32_t handles[4] = {0}, pitches[4] = {0}, offsets[4] = {0};
  	unsigned int other_fb_id;
-@@ -1258,7 +1258,7 @@ static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned
- 			fprintf(stderr, "select timed out or error (ret %d)\n",
- 				ret);
- 			continue;
--		} else if (FD_ISSET(0, &fds)) {
-+		} else if (!dont_stop && FD_ISSET(0, &fds)) {
- 			break;
- 		}
- #endif
-@@ -1492,7 +1492,7 @@ static int pipe_resolve_connectors(struct device *dev, struct pipe_arg *pipe)
+@@ -1255,7 +1255,7 @@ static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned
+ 		fd_set fds;
+ 
+ 		FD_ZERO(&fds);
+-		FD_SET(0, &fds);
++		if (!dont_stop) FD_SET(0, &fds);
+ 		FD_SET(dev->fd, &fds);
+ 		ret = select(dev->fd + 1, &fds, NULL, NULL, &timeout);
+ 
+@@ -1497,7 +1497,7 @@ static int pipe_resolve_connectors(struct device *dev, struct pipe_arg *pipe)
  	return 0;
  }
  

when a test is run

Signed-off-by: Alejandro Hernandez <ajhernandez@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 tests/modetest/modetest.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 22e3e81..a74e39a 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -1181,7 +1181,7 @@ static void clear_cursors(struct device *dev)
 		bo_destroy(dev->mode.cursor_bo);
 }
 

 	unsigned int prop_count = 0;
 	struct pipe_arg *pipe_args = NULL;
 	struct plane_arg *plane_args = NULL;
@@ -1599,6 +1600,10 @@ int main(int argc, char **argv)
 
 			prop_count++;
 			break;
+                case 't':
+			dont_stop = 1;
+			setvbuf(stdout, (char *)NULL, _IOLBF, 0);
+			break;
 		default:
 			usage(argv[0]);
 			break;
@@ -1671,7 +1676,7 @@ int main(int argc, char **argv)
 			set_cursors(&dev, pipe_args, count);
 
 		if (test_vsync)
