From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 09/17] tests/kms_color*: Prefer "crtc" over "pipe" in function names
Date: Fri, 27 Feb 2026 10:06:45 +0200 [thread overview]
Message-ID: <20260227080653.30389-10-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260227080653.30389-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Rename a bunch of functions that operate on igt_crtc_t from
the old "pipe" terminology to the new "crtc" terminology.
#include "scripts/iterators.cocci"
@func@
typedef igt_crtc_t;
identifier OLD_FUNC =~ "pipe";
identifier CRTC;
@@
OLD_FUNC(..., igt_crtc_t *CRTC, ...) { ... }
@script:python rename@
OLD_FUNC << func.OLD_FUNC;
NEW_FUNC;
@@
coccinelle.NEW_FUNC = OLD_FUNC.replace("pipe", "crtc")
@@
identifier func.OLD_FUNC;
identifier rename.NEW_FUNC;
@@
- OLD_FUNC
+ NEW_FUNC
(...) { ... }
@@
identifier func.OLD_FUNC;
identifier rename.NEW_FUNC;
type T;
@@
T
- OLD_FUNC
+ NEW_FUNC
(...);
@@
identifier func.OLD_FUNC;
identifier rename.NEW_FUNC;
@@
- OLD_FUNC
+ NEW_FUNC
(...)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/chamelium/kms_chamelium_color.c | 22 ++++++++++----------
tests/kms_color.c | 22 ++++++++++----------
tests/kms_color_helper.c | 30 +++++++++++++--------------
tests/kms_color_helper.h | 6 +++---
tests/kms_color_pipeline.c | 2 +-
5 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/kms_chamelium_color.c
index 24d66f473ca2..d43c3be7775a 100644
--- a/tests/chamelium/kms_chamelium_color.c
+++ b/tests/chamelium/kms_chamelium_color.c
@@ -429,7 +429,7 @@ static bool test_pipe_limited_range_ctm(data_t *data,
}
static void
-prep_pipe(data_t *data, igt_crtc_t *crtc)
+prep_crtc(data_t *data, igt_crtc_t *crtc)
{
if (igt_crtc_has_prop(crtc, IGT_CRTC_DEGAMMA_LUT_SIZE)) {
data->degamma_lut_size =
@@ -451,7 +451,7 @@ static int test_setup(data_t *data, igt_crtc_t *crtc)
int i = 0;
igt_display_reset(&data->display);
- prep_pipe(data, crtc);
+ prep_crtc(data, crtc);
igt_require(crtc->n_planes >= 0);
data->primary = igt_crtc_get_plane_type(crtc, DRM_PLANE_TYPE_PRIMARY);
@@ -485,7 +485,7 @@ static int test_setup(data_t *data, igt_crtc_t *crtc)
}
static void
-run_gamma_degamma_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
+run_gamma_degamma_tests_for_crtc(data_t *data, igt_crtc_t *crtc,
bool (*test_t)(data_t*, igt_plane_t*, struct chamelium_port*))
{
int port_idx = test_setup(data,
@@ -497,7 +497,7 @@ run_gamma_degamma_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
data->drm_format = DRM_FORMAT_XRGB8888;
data->mode = igt_output_get_mode(data->output);
- if (!pipe_output_combo_valid(data, crtc))
+ if (!crtc_output_combo_valid(data, crtc))
return;
igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc), data->output->name)
@@ -505,7 +505,7 @@ run_gamma_degamma_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
}
static void
-run_ctm_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
+run_ctm_tests_for_crtc(data_t *data, igt_crtc_t *crtc,
color_t *expected_colors,
double *ctm,
int iter)
@@ -536,7 +536,7 @@ run_ctm_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
data->drm_format = DRM_FORMAT_XRGB8888;
data->mode = igt_output_get_mode(data->output);
- if (!pipe_output_combo_valid(data, crtc))
+ if (!crtc_output_combo_valid(data, crtc))
return;
igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc), data->output->name) {
@@ -572,7 +572,7 @@ run_ctm_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
}
static void
-run_limited_range_ctm_test_for_pipe(data_t *data, igt_crtc_t *crtc,
+run_limited_range_ctm_test_for_crtc(data_t *data, igt_crtc_t *crtc,
bool (*test_t)(data_t*, igt_plane_t*, struct chamelium_port*))
{
int port_idx = test_setup(data,
@@ -585,7 +585,7 @@ run_limited_range_ctm_test_for_pipe(data_t *data, igt_crtc_t *crtc,
data->drm_format = DRM_FORMAT_XRGB8888;
data->mode = igt_output_get_mode(data->output);
- if (!pipe_output_combo_valid(data, crtc))
+ if (!crtc_output_combo_valid(data, crtc))
return;
igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc), data->output->name)
@@ -687,7 +687,7 @@ run_tests_for_pipe(data_t *data)
igt_describe_f("%s", gamma_degamma_tests[i].desc);
igt_subtest_with_dynamic_f("%s", gamma_degamma_tests[i].name) {
for_each_crtc(&data->display, crtc) {
- run_gamma_degamma_tests_for_pipe(data,
+ run_gamma_degamma_tests_for_crtc(data,
crtc,
gamma_degamma_tests[i].test_t);
}
@@ -698,7 +698,7 @@ run_tests_for_pipe(data_t *data)
igt_describe_f("%s", ctm_tests[i].desc);
igt_subtest_with_dynamic_f("%s", ctm_tests[i].name) {
for_each_crtc(&data->display, crtc) {
- run_ctm_tests_for_pipe(data,
+ run_ctm_tests_for_crtc(data,
crtc,
ctm_tests[i].colors,
ctm_tests[i].ctm,
@@ -710,7 +710,7 @@ run_tests_for_pipe(data_t *data)
igt_describe("Compare after applying ctm matrix & identity matrix");
igt_subtest_with_dynamic("ctm-limited-range") {
for_each_crtc(&data->display, crtc) {
- run_limited_range_ctm_test_for_pipe(data,
+ run_limited_range_ctm_test_for_crtc(data,
crtc,
test_pipe_limited_range_ctm);
}
diff --git a/tests/kms_color.c b/tests/kms_color.c
index f54911b204a6..565edb2dc926 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -712,7 +712,7 @@ static void test_pipe_limited_range_ctm(data_t *data,
#endif
static void
-prep_pipe(data_t *data, igt_crtc_t *crtc)
+prep_crtc(data_t *data, igt_crtc_t *crtc)
{
if (igt_crtc_has_prop(crtc, IGT_CRTC_DEGAMMA_LUT_SIZE)) {
data->degamma_lut_size =
@@ -731,7 +731,7 @@ prep_pipe(data_t *data, igt_crtc_t *crtc)
static void test_setup(data_t *data, igt_crtc_t *crtc)
{
- prep_pipe(data, crtc);
+ prep_crtc(data, crtc);
igt_require_pipe_crc(data->drm_fd);
igt_require(crtc->n_planes >= 0);
@@ -749,7 +749,7 @@ static void test_cleanup(data_t *data)
}
static void
-run_gamma_degamma_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
+run_gamma_degamma_tests_for_crtc(data_t *data, igt_crtc_t *crtc,
bool (*test_t)(data_t*, igt_plane_t*))
{
test_setup(data, crtc);
@@ -762,7 +762,7 @@ run_gamma_degamma_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
data->drm_format = DRM_FORMAT_XRGB8888;
data->mode = igt_output_get_mode(data->output);
- igt_require(pipe_output_combo_valid(data, crtc));
+ igt_require(crtc_output_combo_valid(data, crtc));
igt_assert(test_t(data, data->primary));
@@ -779,7 +779,7 @@ static void transform_color(color_t *color, const double *ctm, double offset)
}
static void
-run_ctm_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
+run_ctm_tests_for_crtc(data_t *data, igt_crtc_t *crtc,
const color_t *fb_colors,
const double *ctm,
int iter)
@@ -804,7 +804,7 @@ run_ctm_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
data->drm_format = depth_10bit ? DRM_FORMAT_XRGB2101010 : DRM_FORMAT_XRGB8888;
data->mode = igt_output_get_mode(data->output);
- igt_require(pipe_output_combo_valid(data, crtc));
+ igt_require(crtc_output_combo_valid(data, crtc));
if (!iter)
iter = 1;
@@ -838,7 +838,7 @@ run_ctm_tests_for_pipe(data_t *data, igt_crtc_t *crtc,
}
static void
-run_deep_color_tests_for_pipe(data_t *data, igt_crtc_t *crtc)
+run_deep_color_tests_for_crtc(data_t *data, igt_crtc_t *crtc)
{
igt_output_t *output;
static const color_t blue_green_blue[] = {
@@ -982,7 +982,7 @@ run_invalid_tests_for_pipe(data_t *data)
igt_subtest_with_dynamic_f("%s", tests[i].name) {
for_each_crtc(&data->display, crtc) {
igt_dynamic_f("pipe-%s", igt_crtc_name(crtc)) {
- prep_pipe(data,
+ prep_crtc(data,
crtc);
tests[i].test_t(data,
crtc);
@@ -1128,7 +1128,7 @@ run_tests_for_pipe(data_t *data)
for_each_crtc_with_valid_output(&data->display, crtc, data->output) {
igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc),
igt_output_name(data->output))
- run_gamma_degamma_tests_for_pipe(data,
+ run_gamma_degamma_tests_for_crtc(data,
crtc,
gamma_degamma_tests[i].test_t);
}
@@ -1141,7 +1141,7 @@ run_tests_for_pipe(data_t *data)
for_each_crtc_with_valid_output(&data->display, crtc, data->output) {
igt_dynamic_f("pipe-%s-%s", igt_crtc_name(crtc),
igt_output_name(data->output))
- run_ctm_tests_for_pipe(data,
+ run_ctm_tests_for_crtc(data,
crtc,
ctm_tests[i].fb_colors,
ctm_tests[i].ctm,
@@ -1158,7 +1158,7 @@ run_tests_for_pipe(data_t *data)
igt_describe("Verify that deep color works correctly");
igt_subtest_with_dynamic("deep-color") {
for_each_crtc(&data->display, crtc) {
- run_deep_color_tests_for_pipe(data,
+ run_deep_color_tests_for_crtc(data,
crtc);
if (igt_run_in_simulation())
diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index 3cd282cbbee3..24663444a3f3 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -24,7 +24,7 @@
#include "kms_color_helper.h"
-bool pipe_output_combo_valid(data_t *data, igt_crtc_t *crtc)
+bool crtc_output_combo_valid(data_t *data, igt_crtc_t *crtc)
{
bool ret = true;
@@ -284,7 +284,7 @@ get_blob(data_t *data, igt_crtc_t *crtc, enum igt_atomic_crtc_properties prop)
}
int
-pipe_set_property_blob_id(igt_crtc_t *crtc,
+crtc_set_property_blob_id(igt_crtc_t *crtc,
enum igt_atomic_crtc_properties prop,
uint32_t blob_id)
{
@@ -304,7 +304,7 @@ pipe_set_property_blob_id(igt_crtc_t *crtc,
}
int
-pipe_set_property_blob(igt_crtc_t *crtc,
+crtc_set_property_blob(igt_crtc_t *crtc,
enum igt_atomic_crtc_properties prop,
void *ptr, size_t length)
{
@@ -331,17 +331,17 @@ invalid_lut_sizes(data_t *data, igt_crtc_t *crtc,
display->is_atomic ?
COMMIT_ATOMIC : COMMIT_LEGACY);
- igt_assert_eq(pipe_set_property_blob(crtc, prop, lut,
+ igt_assert_eq(crtc_set_property_blob(crtc, prop, lut,
1), -EINVAL);
- igt_assert_eq(pipe_set_property_blob(crtc, prop, lut,
+ igt_assert_eq(crtc_set_property_blob(crtc, prop, lut,
lut_size + 1), -EINVAL);
- igt_assert_eq(pipe_set_property_blob(crtc, prop, lut,
+ igt_assert_eq(crtc_set_property_blob(crtc, prop, lut,
lut_size - 1), -EINVAL);
- igt_assert_eq(pipe_set_property_blob(crtc, prop, lut,
+ igt_assert_eq(crtc_set_property_blob(crtc, prop, lut,
lut_size + sizeof(struct drm_color_lut)), -EINVAL);
- igt_assert_eq(pipe_set_property_blob_id(crtc, prop,
+ igt_assert_eq(crtc_set_property_blob_id(crtc, prop,
crtc->crtc_id), -EINVAL);
- igt_assert_eq(pipe_set_property_blob_id(crtc, prop,
+ igt_assert_eq(crtc_set_property_blob_id(crtc, prop,
4096 * 4096), -EINVAL);
free(lut);
@@ -371,20 +371,20 @@ void invalid_ctm_matrix_sizes(data_t *data, igt_crtc_t *crtc)
ptr = malloc(sizeof(struct drm_color_ctm) * 4);
- igt_assert_eq(pipe_set_property_blob(crtc, IGT_CRTC_CTM, ptr, 1),
+ igt_assert_eq(crtc_set_property_blob(crtc, IGT_CRTC_CTM, ptr, 1),
-EINVAL);
- igt_assert_eq(pipe_set_property_blob(crtc, IGT_CRTC_CTM, ptr,
+ igt_assert_eq(crtc_set_property_blob(crtc, IGT_CRTC_CTM, ptr,
sizeof(struct drm_color_ctm) + 1),
-EINVAL);
- igt_assert_eq(pipe_set_property_blob(crtc, IGT_CRTC_CTM, ptr,
+ igt_assert_eq(crtc_set_property_blob(crtc, IGT_CRTC_CTM, ptr,
sizeof(struct drm_color_ctm) - 1),
-EINVAL);
- igt_assert_eq(pipe_set_property_blob(crtc, IGT_CRTC_CTM, ptr,
+ igt_assert_eq(crtc_set_property_blob(crtc, IGT_CRTC_CTM, ptr,
sizeof(struct drm_color_ctm) * 2),
-EINVAL);
- igt_assert_eq(pipe_set_property_blob_id(crtc, IGT_CRTC_CTM,
+ igt_assert_eq(crtc_set_property_blob_id(crtc, IGT_CRTC_CTM,
crtc->crtc_id), -EINVAL);
- igt_assert_eq(pipe_set_property_blob_id(crtc, IGT_CRTC_CTM,
+ igt_assert_eq(crtc_set_property_blob_id(crtc, IGT_CRTC_CTM,
4096 * 4096), -EINVAL);
free(ptr);
diff --git a/tests/kms_color_helper.h b/tests/kms_color_helper.h
index daa0a729c9c6..e2b3da61e44c 100644
--- a/tests/kms_color_helper.h
+++ b/tests/kms_color_helper.h
@@ -68,7 +68,7 @@ typedef struct {
color_t coeffs[];
} gamma_lut_t;
-bool pipe_output_combo_valid(data_t *data, igt_crtc_t *crtc);
+bool crtc_output_combo_valid(data_t *data, igt_crtc_t *crtc);
bool panel_supports_deep_color(igt_output_t *output);
uint64_t get_max_bpc(igt_output_t *output);
void paint_gradient_rectangles(data_t *data,
@@ -104,10 +104,10 @@ void disable_prop(igt_crtc_t *pipe, enum igt_atomic_crtc_properties prop);
drmModePropertyBlobPtr get_blob(data_t *data, igt_crtc_t *pipe,
enum igt_atomic_crtc_properties prop);
bool crc_equal(igt_crc_t *a, igt_crc_t *b);
-int pipe_set_property_blob_id(igt_crtc_t *pipe,
+int crtc_set_property_blob_id(igt_crtc_t *pipe,
enum igt_atomic_crtc_properties prop,
uint32_t blob_id);
-int pipe_set_property_blob(igt_crtc_t *pipe,
+int crtc_set_property_blob(igt_crtc_t *pipe,
enum igt_atomic_crtc_properties prop,
void *ptr, size_t length);
void invalid_gamma_lut_sizes(data_t *data, igt_crtc_t *crtc);
diff --git a/tests/kms_color_pipeline.c b/tests/kms_color_pipeline.c
index 3b4b857580af..d31df6ff2319 100644
--- a/tests/kms_color_pipeline.c
+++ b/tests/kms_color_pipeline.c
@@ -328,7 +328,7 @@ run_tests_for_plane(data_t *data)
output) {
data->output = output;
- if (!pipe_output_combo_valid(data, crtc))
+ if (!crtc_output_combo_valid(data, crtc))
continue;
test_setup(data,
--
2.52.0
next prev parent reply other threads:[~2026-02-27 8:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 8:06 [PATCH i-g-t 00/17] lib/kms: Finish the igt_crtc_t API refactoring Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 01/17] lib/kms: Replace igt_pipe_has_valid_output() with igt_crtc_has_valid_output() Ville Syrjala
2026-02-27 10:42 ` Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 02/17] lib/kms: Replace igt_display_require_output_on_pipe() with igt_display_require_output_on_crtc() Ville Syrjala
2026-02-27 10:50 ` Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 03/17] lib/kms: Replace igt_get_single_output_for_pipe() with igt_get_single_output_for_crtc() Ville Syrjala
2026-02-27 10:22 ` Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 04/17] lib/kms: Make the igt_*_bpc_*() interfaces more abstract Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 05/17] tests/kms: Use igt_crtc_name() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 06/17] tests/kms: Clean up crtc->pipe comparions Ville Syrjala
2026-02-27 10:51 ` Jani Nikula
2026-02-27 8:06 ` [PATCH i-g-t 07/17] tests/vmwgfx/vmw_prime: Replace igt_pipe_crc_new() with igt_crtc_crc_new() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 08/17] lib/kms: Prefer "crtc" over "pipe" in function names Ville Syrjala
2026-02-27 8:06 ` Ville Syrjala [this message]
2026-02-27 8:06 ` [PATCH i-g-t 10/17] tests/kms: " Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 11/17] tests/kms_tiled_display: Remove mention of PIPE_NONE Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 12/17] tests/kms: Remove hand rolled get_vblank() stuff Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 13/17] lib/kms: Fix kmstest_get_vblank() docs Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 14/17] tests/kms: Pass crtc_index to kmstest_get_vbl_flag() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 15/17] tests/kms: Pass crtc_index to kmstest_get_vblank() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 16/17] lib/kms: Introduce igt_crtc_get_vbl_flag() Ville Syrjala
2026-02-27 8:06 ` [PATCH i-g-t 17/17] lib/kms: Introduce igt_crtc_get_vblank() Ville Syrjala
2026-02-27 10:55 ` [PATCH i-g-t 00/17] lib/kms: Finish the igt_crtc_t API refactoring Jani Nikula
2026-02-27 14:14 ` ✗ i915.CI.BAT: failure for " Patchwork
2026-02-27 14:24 ` ✓ Xe.CI.BAT: success " Patchwork
2026-02-27 23:28 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-04 5:58 ` ✓ Xe.CI.BAT: success for lib/kms: Finish the igt_crtc_t API refactoring (rev2) Patchwork
2026-03-04 6:19 ` ✓ i915.CI.BAT: " Patchwork
2026-03-05 5:01 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-05 8:15 ` ✗ i915.CI.Full: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260227080653.30389-10-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox