[PATCH i-g-t 11/21] tests/intel/kms_psr2_sf: Convert pipes[] to crtcs[]

Ville Syrjala
2026-02-20T14:02:46Z

Convert the pipes[] array to crtcs[] in kms_psr2_sf. The
remainder of the pipe->crtc conversions will be handled
with cocci.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/intel/kms_psr2_sf.c | 66 +++++++++++++++++++--------------------
1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 31db6760c73e..cb2f2fe70f80 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -1157,8 +1157,8 @@ int igt_main()
data_t data = {};
igt_output_t *outputs[IGT_MAX_PIPES * IGT_MAX_PIPES];
int i, y, z;
- int pipes[IGT_MAX_PIPES * IGT_MAX_PIPES];
- int n_pipes = 0;
+ igt_crtc_t *crtcs[IGT_MAX_PIPES * IGT_MAX_PIPES];
+ int n_crtcs = 0;
int coexist_features[IGT_MAX_PIPES * IGT_MAX_PIPES];
const char *append_fbc_subtest[2] = {
"",
@@ -1209,14 +1209,14 @@ int igt_main()
if (!output_supports_pr_psr2_sel_fetch)
continue;

- pipes[n_pipes] = data.pipe;
- outputs[n_pipes] = data.output;
+ crtcs[n_crtcs] = crtc;
+ outputs[n_crtcs] = data.output;

- coexist_features[n_pipes] = 0;
+ coexist_features[n_crtcs] = 0;
if (is_dsc_supported_by_sink(data.drm_fd, data.output))
- coexist_features[n_pipes] |= FEATURE_DSC;
+ coexist_features[n_crtcs] |= FEATURE_DSC;

- n_pipes++;
+ n_crtcs++;
pr_psr2_sel_fetch_supported = true;
}
igt_require_f(pr_psr2_sel_fetch_supported,
@@ -1241,8 +1241,8 @@ int igt_main()
append_fbc_subtest[y],
append_psr_subtest[z],
op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1262,8 +1262,8 @@ int igt_main()
append_fbc_subtest[y],
append_psr_subtest[z],
op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1283,8 +1283,8 @@ int igt_main()
append_fbc_subtest[y],
append_psr_subtest[z],
op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1300,8 +1300,8 @@ int igt_main()
igt_describe("Test that selective fetch works on cursor plane");
igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1317,8 +1317,8 @@ int igt_main()
"moving cursor plane (no update)");
igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1334,8 +1334,8 @@ int igt_main()
"plane exceeding partially visible area (no update)");
igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1351,8 +1351,8 @@ int igt_main()
"exceeding fully visible area (no update)");
igt_subtest_with_dynamic_f("%s%scursor-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1369,8 +1369,8 @@ int igt_main()
igt_describe("Test that selective fetch works on moving overlay plane");
igt_subtest_with_dynamic_f("%s%s%s-sf-dmg-area", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1385,8 +1385,8 @@ int igt_main()
"plane (no update)");
igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1402,8 +1402,8 @@ int igt_main()
"plane partially exceeding visible area (no update)");
igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1419,8 +1419,8 @@ int igt_main()
"fully exceeding visible area (no update)");
igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1437,8 +1437,8 @@ int igt_main()
"with blended overlay plane");
igt_subtest_with_dynamic_f("%s%s%s-sf-dmg-area", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
@@ -1457,8 +1457,8 @@ int igt_main()
igt_describe("Test that selective fetch works on overlay plane");
igt_subtest_with_dynamic_f("%s%soverlay-%s-sf", append_fbc_subtest[y],
append_psr_subtest[z], op_str(data.op)) {
- for (i = 0; i < n_pipes; i++) {
- data.pipe = pipes[i];
+ for (i = 0; i < n_crtcs; i++) {
+ data.pipe = crtcs[i]->pipe;
data.output = outputs[i];

if (!pipe_output_combo_valid(&data))
--
2.52.0