Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: igt-dev@lists.freedesktop.org, ihf@google.com,
	markyacoub@google.com,  thomas.petazzoni@bootlin.com,
	Louis Chauvet <louis.chauvet@bootlin.com>
Subject: [PATCH i-g-t RFC 03/13] lib/chamelium: Change build options to split chamelium v2 and v3
Date: Wed, 05 Jun 2024 16:30:15 +0200	[thread overview]
Message-ID: <20240605-dev-remove-static-ports-v1-3-665f25b7a4db@bootlin.com> (raw)
In-Reply-To: <20240605-dev-remove-static-ports-v1-0-665f25b7a4db@bootlin.com>

Rename the Chamelium option to "chamelium_v2" to prepare for the
introduction of the v3 wrapper. Additionally, rename the "HAVE_CHAMELIUM"
define to avoid conflicts when the v3 is introduced.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 docs/testplan/meson.build     |  4 ++--
 lib/igt.h                     |  2 +-
 lib/igt_kms.c                 |  3 ++-
 lib/meson.build               |  4 ++--
 lib/tests/meson.build         |  4 ++--
 meson.build                   | 30 +++++++++++++++---------------
 meson_options.txt             |  4 ++--
 tests/kms_color_helper.h      |  2 +-
 tests/kms_feature_discovery.c |  4 ++--
 tests/kms_tiled_display.c     |  6 +++---
 tests/meson.build             |  8 ++++----
 11 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
index 5560347f1337..f60c82ad139c 100644
--- a/docs/testplan/meson.build
+++ b/docs/testplan/meson.build
@@ -21,8 +21,8 @@ if build_tests
 		build_info += 'Will Check if documentation is in sync with testlist'
 		check_testlist = [ '--check-testlist', '--igt-build-path', build_root ]
 
-		if not chamelium.found()
-			warning('WARNING: Will not check if documentation is in sync for KMS as chamelium is disabled')
+		if not chamelium_v2.found()
+			warning('WARNING: Will not check if documentation is in sync for KMS as chamelium v2 is disabled')
 		else
 			kms_check_testlist = check_testlist
 		endif
diff --git a/lib/igt.h b/lib/igt.h
index cf91e92eb2d4..390e59cd9b92 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -42,7 +42,7 @@
 #include "igt_sizes.h"
 #include "igt_stats.h"
 #include "igt_dsc.h"
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 #include "igt_alsa.h"
 #include "igt_audio.h"
 #include "chamelium/v2/igt_chamelium.h"
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4a61c3560999..fbb9c545e1b4 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -59,7 +59,7 @@
 #include "igt_device.h"
 #include "igt_sysfs.h"
 #include "sw_sync.h"
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 #include "chamelium/v2/igt_chamelium.h"
 #endif
 
@@ -2883,6 +2883,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		goto out;
 
 #ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 	{
 		struct chamelium *chamelium;
 
diff --git a/lib/meson.build b/lib/meson.build
index 74080e339c19..accf9ff41222 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -187,8 +187,8 @@ if alsa.found()
 	lib_sources += 'igt_alsa.c'
 endif
 
-if chamelium.found()
-	lib_deps += chamelium
+if chamelium_v2.found()
+	lib_deps += chamelium_v2
 	lib_sources += [
 		'chamelium/v2/igt_chamelium.c',
 		'chamelium/v2/igt_chamelium_stream.c'
diff --git a/lib/tests/meson.build b/lib/tests/meson.build
index fa3d81de6cef..f98c948bc827 100644
--- a/lib/tests/meson.build
+++ b/lib/tests/meson.build
@@ -34,8 +34,8 @@ lib_fail_tests = [
 
 lib_tests_deps = igt_deps
 
-if chamelium.found()
-	lib_deps += chamelium
+if chamelium_v2.found()
+	lib_deps += chamelium_v2
 	lib_tests += 'igt_audio'
 endif
 
diff --git a/meson.build b/meson.build
index ab44aadb1fdf..a6c8ddf6a128 100644
--- a/meson.build
+++ b/meson.build
@@ -86,7 +86,7 @@ foreach cc_arg : cc_args
   endif
 endforeach
 
-build_chamelium = get_option('chamelium')
+build_chamelium_v2 = get_option('chamelium_v2')
 build_docs = get_option('docs')
 build_tests = not get_option('tests').disabled()
 build_xe = not get_option('xe_driver').disabled()
@@ -172,28 +172,28 @@ if not xmlrpc.found() and xmlrpc_cmd.found()
 	endif
 endif
 
-if build_chamelium.enabled() and not (xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found())
+if build_chamelium_v2.enabled() and not (xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found())
 	error('Chamelium build forced and required dependency xmlrpc not found')
 endif
 
-gsl = dependency('gsl', required : build_chamelium)
-alsa = dependency('alsa', required : build_chamelium)
-libcurl = dependency('libcurl', required : build_chamelium)
+gsl = dependency('gsl', required : build_chamelium_v2)
+alsa = dependency('alsa', required : build_chamelium_v2)
+libcurl = dependency('libcurl', required : build_chamelium_v2)
 
 if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and gsl.found() and alsa.found() and libcurl.found()
-	config.set('HAVE_CHAMELIUM', 1)
-	chamelium = declare_dependency(dependencies : [
-		xmlrpc,
-		xmlrpc_util,
-		xmlrpc_client,
-		gsl,
-		alsa,
-	])
+	config.set('HAVE_CHAMELIUM_V2', 1)
+	chamelium_v2 = declare_dependency(dependencies : [
+										  xmlrpc,
+										  xmlrpc_util,
+										  xmlrpc_client,
+										  gsl,
+										  alsa,
+									  ])
 else
-	chamelium = disabler()
+	chamelium_v2 = disabler()
 endif
 
-build_info += 'Build Chamelium test: @0@'.format(chamelium.found())
+build_info += 'Build Chamelium v2 test: @0@'.format(chamelium_v2.found())
 
 pthreads = dependency('threads')
 math = cc.find_library('m')
diff --git a/meson_options.txt b/meson_options.txt
index 6a9493ea6ecd..fea91fb129aa 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,9 +8,9 @@ option('overlay_backends',
        choices : [ 'auto', 'x', 'xv' ],
        description : 'Overlay backends to enable')
 
-option('chamelium',
+option('chamelium_v2',
        type : 'feature',
-       description : 'Build Chamelium test')
+       description : 'Build Chamelium v2 test')
 
 option('valgrind',
        type : 'feature',
diff --git a/tests/kms_color_helper.h b/tests/kms_color_helper.h
index 23463b944b6f..910de27bf61f 100644
--- a/tests/kms_color_helper.h
+++ b/tests/kms_color_helper.h
@@ -57,7 +57,7 @@ typedef struct {
 	uint32_t color_depth;
 	uint64_t degamma_lut_size;
 	uint64_t gamma_lut_size;
-	#ifdef HAVE_CHAMELIUM
+	#ifdef HAVE_CHAMELIUM_V2
 	struct chamelium *chamelium;
 	struct chamelium_port **ports;
 	int port_count;
diff --git a/tests/kms_feature_discovery.c b/tests/kms_feature_discovery.c
index edb0186361a8..76e958c84d51 100644
--- a/tests/kms_feature_discovery.c
+++ b/tests/kms_feature_discovery.c
@@ -35,7 +35,7 @@
  */
 
 #include "igt.h"
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 #include "chamelium/v2/igt_chamelium.h"
 #endif
 #include "igt_kms.h"
@@ -140,7 +140,7 @@ igt_main {
 			}
 		}
 
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 		igt_describe("Make sure that Chamelium is configured and reachable.");
 		igt_subtest("chamelium") {
 			struct chamelium *chamelium =
diff --git a/tests/kms_tiled_display.c b/tests/kms_tiled_display.c
index 3ffd6a9a4a2d..c541115c2c74 100644
--- a/tests/kms_tiled_display.c
+++ b/tests/kms_tiled_display.c
@@ -83,7 +83,7 @@ typedef struct {
 	struct timeval first_ts;
 	int linetime_us;
 
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 	struct chamelium *chamelium;
 	struct chamelium_port **ports;
 	int port_count;
@@ -408,7 +408,7 @@ static bool got_all_page_flips(data_t *data)
 	return true;
 }
 
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 static void test_with_chamelium(data_t *data)
 {
 	int i, count = 0;
@@ -624,7 +624,7 @@ igt_main
 		test_cleanup(&data);
 	}
 
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 	igt_describe("Make sure the Tiled CRTCs are synchronized and we get "
 		     "page flips for all tiled CRTCs in one vblank (executes on chamelium).");
 	igt_subtest_f("basic-test-pattern-with-chamelium") {
diff --git a/tests/meson.build b/tests/meson.build
index 6063a02962a2..0b0a913bd878 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -326,7 +326,7 @@ msm_progs = [
 	'msm_submitoverhead',
 ]
 
-chamelium_progs = [
+chamelium_v2_progs = [
 	'kms_chamelium_audio',
 	'kms_chamelium_color',
 	'kms_chamelium_edid',
@@ -437,8 +437,8 @@ foreach prog : msm_progs
 	test_list += prog
 endforeach
 
-if chamelium.found()
-	foreach prog : chamelium_progs
+if chamelium_v2.found()
+	foreach prog : chamelium_v2_progs
 		testexe = executable(prog,
 				 [join_paths('chamelium', 'v2', prog + '.c')] + extra_sources.get(prog, []),
 				 dependencies : test_deps + extra_dependencies.get(prog, []),
@@ -456,7 +456,7 @@ if chamelium.found()
 				    output : name + '.testlist')
 		endif
 	endforeach
-	test_deps += chamelium
+	test_deps += chamelium_v2
 endif
 
 subdir('amdgpu')

-- 
2.43.2


  parent reply	other threads:[~2024-06-05 14:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 14:30 [PATCH i-g-t RFC 00/13] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 01/13] tests/chamelium: Extract chamelium v2 tests into its own directory Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 02/13] lib/chamelium: Extract chamelium v2 wrapper " Louis Chauvet
2024-06-05 14:30 ` Louis Chauvet [this message]
2024-06-05 14:30 ` [PATCH i-g-t RFC 04/13] lib/chamelium: Introduce the foundation for the chamelium v3 library Louis Chauvet
2024-06-11 16:45   ` Kamil Konieczny
2024-06-05 14:30 ` [PATCH i-g-t RFC 05/13] lib/chamelium: Implement all RPC calls for the chamelium v3 Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 06/13] lib/chamelium: Introduce a simple chamelium v3 test Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 07/13] tests/chamelium: Introduce basic edid test Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 08/13] lib/monitor_edids: Introduce helpers to get EDID from a monitor EDID Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 09/13] tests/chamelium: Introduce 4k stress edid Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 10/13] tests/chamelium: Introduce non-4k " Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 11/13] tests/chamelium: Introduce test resolution Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 12/13] tests/chamelium: Introduce test sleep Louis Chauvet
2024-06-05 14:30 ` [PATCH i-g-t RFC 13/13] tests/chamelium: Add MST test Louis Chauvet
2024-06-05 16:36 ` ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3 Patchwork
2024-06-07 19:05 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-06-11 16:51 ` [PATCH i-g-t RFC 00/13] " Kamil Konieczny

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=20240605-dev-remove-static-ports-v1-3-665f25b7a4db@bootlin.com \
    --to=louis.chauvet@bootlin.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ihf@google.com \
    --cc=markyacoub@google.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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