[igt-dev] [PATCH i-g-t 05/11] tests/kms_lease: Read crtc id for a valid pipe
Mohammed Khajapasha
mohammed.khajapasha at intel.com
Sat Jul 11 18:04:51 UTC 2020
Read crtc id for enabled pipes only.
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha at intel.com>
---
tests/kms_lease.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 75a1149c..4045fbca 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -136,9 +136,11 @@ static enum pipe crtc_id_to_pipe(igt_display_t *display, uint32_t crtc_id)
{
enum pipe pipe;
- for (pipe = 0; pipe < display->n_pipes; pipe++)
- if (display->pipes[pipe].crtc_id == crtc_id)
+ for (pipe = 0; pipe < display->n_pipes; pipe++) {
+ if (display->pipes[pipe].enabled &&
+ display->pipes[pipe].crtc_id == crtc_id)
return pipe;
+ }
return -1;
}
--
2.24.1
More information about the igt-dev
mailing list