summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Khajapasha <mohammed.khajapasha@intel.com>2020-07-20 20:50:38 +0530
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2020-07-21 12:58:17 +0300
commitc087c36c1c9bda0a1c95c00eff95cf995510c4d7 (patch)
tree2787258a14fa13cf491f3e5388ec151ff4509044
parent439b3e54665c7f9d920280ceb6091bb11cdb0186 (diff)
tests/kms_lease: Get pipe from crtc for enable pipes
Get pipe from drm crtc for enabled pipes only. v3: Beak the for_each_pipe() loop for a bad crtc <Hiler, Arkadiusz> Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r--tests/kms_lease.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 2e6cf9b0..4ec9d49f 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -683,7 +683,10 @@ static void lease_unleased_crtc(data_t *data)
/* Find another CRTC that we don't control */
bad_crtc_id = 0;
- for (p = 0; bad_crtc_id == 0 && p < data->master.display.n_pipes; p++) {
+
+ for_each_pipe(&data->master.display, p) {
+ if (bad_crtc_id != 0)
+ break;
if (pipe_to_crtc_id(&data->master.display, p) != data->crtc_id)
bad_crtc_id = pipe_to_crtc_id(&data->master.display, p);
}