Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory
@ 2024-10-22 14:49 Louis Chauvet
  2024-10-22 14:49 ` [PATCH i-g-t 1/4] tests/chamelium: Extract Chamelium v2 tests into a separate directory Louis Chauvet
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Louis Chauvet @ 2024-10-22 14:49 UTC (permalink / raw)
  To: igt-dev
  Cc: Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem, Ashutosh Dixit,
	Thomas Petazzoni, nicolejadeyee, seanpaul, jeremie.dautheribes,
	markyacoub, Louis Chauvet,
	20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
	20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6

In preparation for the introduction of Chameleon v3, this series move 
the chamelium v2 support in its own folder.

Few rename are done to avoid confusion between chamelium v2 and chamelium 
v3 code.

This series have a small conflict with [1]. If you want to reverse the 
order of the series, let me know, I will resend a new iteration.

[1]: https://lore.kernel.org/all/20240828-b4-cv3-02-monitor-edids-v1-0-29c846bcf251@bootlin.com/

In addition, this series is in conflict with at least:
-https://lore.kernel.org/igt-dev/20241018035914.1740924-1-pranay.samala@intel.com
-https://lore.kernel.org/igt-dev/20241018190627.1367970-1-swati2.sharma@intel.com

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
Louis Chauvet (4):
      tests/chamelium: Extract Chamelium v2 tests into a separate directory
      lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory
      lib/chamelium/v2: Rename chamelium to chamelium_v2
      lib/chamelium/v2: Rename HAVE_CHAMELIUM to HAVE_CHAMELIUM_V2

 .gitlab-ci.yml                                  |  2 +-
 docs/testplan/meson.build                       |  4 ++--
 lib/{ => chamelium/v2}/igt_chamelium.c          |  2 +-
 lib/{ => chamelium/v2}/igt_chamelium.h          |  0
 lib/{ => chamelium/v2}/igt_chamelium_stream.c   |  2 +-
 lib/{ => chamelium/v2}/igt_chamelium_stream.h   |  0
 lib/igt.h                                       |  6 +++---
 lib/igt_kms.c                                   |  6 +++---
 lib/meson.build                                 |  9 ++++++---
 lib/monitor_edids/monitor_edids_helper.h        |  2 +-
 lib/tests/meson.build                           |  4 ++--
 meson.build                                     | 18 +++++++++---------
 meson_options.txt                               |  4 ++--
 tests/chamelium/{ => v2}/kms_chamelium_audio.c  |  0
 tests/chamelium/{ => v2}/kms_chamelium_color.c  |  0
 tests/chamelium/{ => v2}/kms_chamelium_edid.c   |  2 +-
 tests/chamelium/{ => v2}/kms_chamelium_frames.c |  0
 tests/chamelium/{ => v2}/kms_chamelium_helper.c |  0
 tests/chamelium/{ => v2}/kms_chamelium_helper.h |  0
 tests/chamelium/{ => v2}/kms_chamelium_hpd.c    |  0
 tests/kms_color_helper.h                        |  2 +-
 tests/kms_feature_discovery.c                   |  6 +++---
 tests/kms_tiled_display.c                       |  6 +++---
 tests/meson.build                               | 18 +++++++++---------
 24 files changed, 48 insertions(+), 45 deletions(-)
---
base-commit: 9b8c0f6da8898f760bfaa2113455eb84b68a69f4
change-id: 20240829-b4-cv3-03-cv2-split-473c924261e5
prerequisite-message-id: 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513@bootlin.com
prerequisite-patch-id: 0562bbe57a0b489e7f46a51717c54ea26296cb8c
prerequisite-patch-id: a16d6fdd238eab5a91630d0934c9186669406fc7
prerequisite-patch-id: c7fcc64d709f283da748a0f9bbe3bd6143d76300
prerequisite-patch-id: 09fc5e2f569fa8287e767ceb353bc0a0f94ae2e1
prerequisite-patch-id: 63cf2f6323333bb8cbd0dbbd883b5c9fe373dea1
prerequisite-message-id: 20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6@bootlin.com
prerequisite-patch-id: 90ffdddeda6dd4cd2ae64e60fb31b0bbfee0250f
prerequisite-patch-id: d62e9d4981a68ac6e71544ab2a3dfec37dfa3299
prerequisite-patch-id: 3d898f58702cc303e18d3afc487e46f68641989b
prerequisite-patch-id: 57f5446073d42a01c29e6ff8a24f6609eedb49a1
prerequisite-patch-id: e6d6ee4ecd0e738a60091b19449c8622bb8bb6ae

Best regards,
-- 
Louis Chauvet <louis.chauvet@bootlin.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH i-g-t 1/4] tests/chamelium: Extract Chamelium v2 tests into a separate directory
  2024-10-22 14:49 [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory Louis Chauvet
@ 2024-10-22 14:49 ` Louis Chauvet
  2024-10-22 14:49 ` [PATCH i-g-t 2/4] lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory Louis Chauvet
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Louis Chauvet @ 2024-10-22 14:49 UTC (permalink / raw)
  To: igt-dev
  Cc: Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem, Ashutosh Dixit,
	Thomas Petazzoni, nicolejadeyee, seanpaul, jeremie.dautheribes,
	markyacoub, Louis Chauvet,
	20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
	20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6

In preparation for Chamelium v3, the Chamelium v2 tests have been moved to
their own directory.

The two Chamelium versions have different sets of functionality (audio,
MST, CRC computation, etc.). Since most of the tests will need to be
rewritten to work with Chamelium v3, it is simpler to create new ones for
v3 to avoid breaking the existing tests.

The following complexities necessitate a thorough rework of the existing
v2 tests:

 - Not all ports are discoverable in v3 (MST ports are not physical
   ports, but they can have EDID, be plugged, etc.), and they can change
   over time.
 - The v3 is unable to perform CRC computation.
 - Not all ports can be plugged at once, which is a feature used by the
   existing v2 wrapper to set up the Chamelium.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 tests/chamelium/{ => v2}/kms_chamelium_audio.c  |  0
 tests/chamelium/{ => v2}/kms_chamelium_color.c  |  0
 tests/chamelium/{ => v2}/kms_chamelium_edid.c   |  0
 tests/chamelium/{ => v2}/kms_chamelium_frames.c |  0
 tests/chamelium/{ => v2}/kms_chamelium_helper.c |  0
 tests/chamelium/{ => v2}/kms_chamelium_helper.h |  0
 tests/chamelium/{ => v2}/kms_chamelium_hpd.c    |  0
 tests/meson.build                               | 10 +++++-----
 8 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/v2/kms_chamelium_audio.c
similarity index 100%
rename from tests/chamelium/kms_chamelium_audio.c
rename to tests/chamelium/v2/kms_chamelium_audio.c
diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/v2/kms_chamelium_color.c
similarity index 100%
rename from tests/chamelium/kms_chamelium_color.c
rename to tests/chamelium/v2/kms_chamelium_color.c
diff --git a/tests/chamelium/kms_chamelium_edid.c b/tests/chamelium/v2/kms_chamelium_edid.c
similarity index 100%
rename from tests/chamelium/kms_chamelium_edid.c
rename to tests/chamelium/v2/kms_chamelium_edid.c
diff --git a/tests/chamelium/kms_chamelium_frames.c b/tests/chamelium/v2/kms_chamelium_frames.c
similarity index 100%
rename from tests/chamelium/kms_chamelium_frames.c
rename to tests/chamelium/v2/kms_chamelium_frames.c
diff --git a/tests/chamelium/kms_chamelium_helper.c b/tests/chamelium/v2/kms_chamelium_helper.c
similarity index 100%
rename from tests/chamelium/kms_chamelium_helper.c
rename to tests/chamelium/v2/kms_chamelium_helper.c
diff --git a/tests/chamelium/kms_chamelium_helper.h b/tests/chamelium/v2/kms_chamelium_helper.h
similarity index 100%
rename from tests/chamelium/kms_chamelium_helper.h
rename to tests/chamelium/v2/kms_chamelium_helper.h
diff --git a/tests/chamelium/kms_chamelium_hpd.c b/tests/chamelium/v2/kms_chamelium_hpd.c
similarity index 100%
rename from tests/chamelium/kms_chamelium_hpd.c
rename to tests/chamelium/v2/kms_chamelium_hpd.c
diff --git a/tests/meson.build b/tests/meson.build
index 34b87b125bf2..4cb199d34527 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -358,11 +358,11 @@ extra_sources = {
 	'dumb_buffer': ['dumb_buffer.c' ],
 	'testdisplay': [ 'testdisplay_hotplug.c' ],
 	'kms_color':  [ 'kms_color_helper.c' ],
-	'kms_chamelium_audio': [ join_paths ('chamelium', 'kms_chamelium_helper.c') ],
+	'kms_chamelium_audio': [ join_paths ('chamelium', 'v2', 'kms_chamelium_helper.c') ],
 	'kms_chamelium_color':  [ 'kms_color_helper.c' ],
-	'kms_chamelium_edid': [ join_paths ('chamelium', 'kms_chamelium_helper.c') ],
-	'kms_chamelium_frames': [ join_paths ('chamelium', 'kms_chamelium_helper.c') ],
-	'kms_chamelium_hpd': [ join_paths ('chamelium', 'kms_chamelium_helper.c') ],
+	'kms_chamelium_edid': [ join_paths ('chamelium', 'v2', 'kms_chamelium_helper.c') ],
+	'kms_chamelium_frames': [ join_paths ('chamelium', 'v2', 'kms_chamelium_helper.c') ],
+	'kms_chamelium_hpd': [ join_paths ('chamelium', 'v2', 'kms_chamelium_helper.c') ],
 	'kms_dsc': [ join_paths ('intel', 'kms_dsc_helper.c') ],
 	'kms_psr2_sf':  [ join_paths ('intel', 'kms_dsc_helper.c') ],
 }
@@ -438,7 +438,7 @@ endforeach
 if chamelium.found()
 	foreach prog : chamelium_progs
 		testexe = executable(prog,
-				 [join_paths('chamelium', prog + '.c')] + extra_sources.get(prog, []),
+				 [join_paths('chamelium', 'v2', prog + '.c')] + extra_sources.get(prog, []),
 				 dependencies : test_deps + extra_dependencies.get(prog, []),
 				 install_dir : libexecdir,
 				 install_rpath : libexecdir_rpathdir,

-- 
2.46.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH i-g-t 2/4] lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory
  2024-10-22 14:49 [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory Louis Chauvet
  2024-10-22 14:49 ` [PATCH i-g-t 1/4] tests/chamelium: Extract Chamelium v2 tests into a separate directory Louis Chauvet
@ 2024-10-22 14:49 ` Louis Chauvet
  2024-10-22 14:49 ` [PATCH i-g-t 3/4] lib/chamelium/v2: Rename chamelium to chamelium_v2 Louis Chauvet
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Louis Chauvet @ 2024-10-22 14:49 UTC (permalink / raw)
  To: igt-dev
  Cc: Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem, Ashutosh Dixit,
	Thomas Petazzoni, nicolejadeyee, seanpaul, jeremie.dautheribes,
	markyacoub, Louis Chauvet,
	20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
	20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6

In preparation for the Chamelium v3, the support for Chamelium v2 is being
extracted into its own directory.

The two Chamelium versions have different sets of functionality (audio,
MST, CRC computation, etc.). As the current wrapper is already complex,
extracting the v2 part into its own directory allows for the v3 wrapper to
be written without breaking any existing tests or complicating the
existing code.

The current identified complexities that necessitate a thorough rework of
the existing v2 wrapper are:

 - Not all ports are discoverable in v3 (MST ports are not physical
   ports, but they can have EDID, be plugged, etc.), and they can change
   over time.
 - The v3 is unable to perform CRC computation, so many tests must be
   rewritten or adapted to work.
 - Not all ports can be plugged at once, which is a feature used by the
   existing v2 wrapper to set up the Chamelium.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 lib/{ => chamelium/v2}/igt_chamelium.c        | 2 +-
 lib/{ => chamelium/v2}/igt_chamelium.h        | 0
 lib/{ => chamelium/v2}/igt_chamelium_stream.c | 2 +-
 lib/{ => chamelium/v2}/igt_chamelium_stream.h | 0
 lib/igt.h                                     | 4 ++--
 lib/igt_kms.c                                 | 2 +-
 lib/meson.build                               | 5 ++++-
 lib/monitor_edids/monitor_edids_helper.h      | 2 +-
 tests/chamelium/v2/kms_chamelium_edid.c       | 2 +-
 tests/kms_feature_discovery.c                 | 2 +-
 10 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/chamelium/v2/igt_chamelium.c
similarity index 99%
rename from lib/igt_chamelium.c
rename to lib/chamelium/v2/igt_chamelium.c
index 620fbbf7d94f..2218c6cd694d 100644
--- a/lib/igt_chamelium.c
+++ b/lib/chamelium/v2/igt_chamelium.c
@@ -37,7 +37,7 @@
 #include <pixman.h>
 #include <cairo.h>
 
-#include "igt_chamelium.h"
+#include "chamelium/v2/igt_chamelium.h"
 #include "igt_core.h"
 #include "igt_aux.h"
 #include "igt_edid.h"
diff --git a/lib/igt_chamelium.h b/lib/chamelium/v2/igt_chamelium.h
similarity index 100%
rename from lib/igt_chamelium.h
rename to lib/chamelium/v2/igt_chamelium.h
diff --git a/lib/igt_chamelium_stream.c b/lib/chamelium/v2/igt_chamelium_stream.c
similarity index 99%
rename from lib/igt_chamelium_stream.c
rename to lib/chamelium/v2/igt_chamelium_stream.c
index a8cd19e51b0b..8d96e654947d 100644
--- a/lib/igt_chamelium_stream.c
+++ b/lib/chamelium/v2/igt_chamelium_stream.c
@@ -33,7 +33,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "igt_chamelium_stream.h"
+#include "chamelium/v2/igt_chamelium_stream.h"
 #include "igt_core.h"
 #include "igt_rc.h"
 
diff --git a/lib/igt_chamelium_stream.h b/lib/chamelium/v2/igt_chamelium_stream.h
similarity index 100%
rename from lib/igt_chamelium_stream.h
rename to lib/chamelium/v2/igt_chamelium_stream.h
diff --git a/lib/igt.h b/lib/igt.h
index 58c39e098016..f68d9b28eaa6 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -44,8 +44,8 @@
 #ifdef HAVE_CHAMELIUM
 #include "igt_alsa.h"
 #include "igt_audio.h"
-#include "igt_chamelium.h"
-#include "igt_chamelium_stream.h"
+#include "chamelium/v2/igt_chamelium.h"
+#include "chamelium/v2/igt_chamelium_stream.h"
 #endif
 #include "instdone.h"
 #include "intel_batchbuffer.h"
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 82d63d6e6229..8d4efde9b584 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -62,7 +62,7 @@
 #include "igt_sysfs.h"
 #include "sw_sync.h"
 #ifdef HAVE_CHAMELIUM
-#include "igt_chamelium.h"
+#include "chamelium/v2/igt_chamelium.h"
 #endif
 
 /**
diff --git a/lib/meson.build b/lib/meson.build
index c3556a921adf..dc70704bd919 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -191,7 +191,10 @@ endif
 
 if chamelium.found()
 	lib_deps += chamelium
-	lib_sources += [ 'igt_chamelium.c', 'igt_chamelium_stream.c' ]
+	lib_sources += [
+		'chamelium/v2/igt_chamelium.c',
+		'chamelium/v2/igt_chamelium_stream.c'
+	]
 	lib_sources += 'monitor_edids/monitor_edids_helper.c'
 endif
 
diff --git a/lib/monitor_edids/monitor_edids_helper.h b/lib/monitor_edids/monitor_edids_helper.h
index 50b08530826a..fed9a676fd97 100644
--- a/lib/monitor_edids/monitor_edids_helper.h
+++ b/lib/monitor_edids/monitor_edids_helper.h
@@ -16,7 +16,7 @@
 #include <stdbool.h>
 
 #include "igt_core.h"
-#include "igt_chamelium.h"
+#include "chamelium/v2/igt_chamelium.h"
 
 /* Max Length can be increased as needed, when new EDIDs are added. */
 #define EDID_NAME_MAX_LEN 28
diff --git a/tests/chamelium/v2/kms_chamelium_edid.c b/tests/chamelium/v2/kms_chamelium_edid.c
index 8438f5f156b7..772654f37de8 100644
--- a/tests/chamelium/v2/kms_chamelium_edid.c
+++ b/tests/chamelium/v2/kms_chamelium_edid.c
@@ -41,7 +41,7 @@
 
 #include "config.h"
 #include "igt.h"
-#include "igt_chamelium.h"
+#include "chamelium/v2/igt_chamelium.h"
 #include "igt_edid.h"
 #include "igt_eld.h"
 #include "igt_vc4.h"
diff --git a/tests/kms_feature_discovery.c b/tests/kms_feature_discovery.c
index 5bca9ad76684..edb0186361a8 100644
--- a/tests/kms_feature_discovery.c
+++ b/tests/kms_feature_discovery.c
@@ -36,7 +36,7 @@
 
 #include "igt.h"
 #ifdef HAVE_CHAMELIUM
-#include "igt_chamelium.h"
+#include "chamelium/v2/igt_chamelium.h"
 #endif
 #include "igt_kms.h"
 #include "igt_psr.h"

-- 
2.46.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH i-g-t 3/4] lib/chamelium/v2: Rename chamelium to chamelium_v2
  2024-10-22 14:49 [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory Louis Chauvet
  2024-10-22 14:49 ` [PATCH i-g-t 1/4] tests/chamelium: Extract Chamelium v2 tests into a separate directory Louis Chauvet
  2024-10-22 14:49 ` [PATCH i-g-t 2/4] lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory Louis Chauvet
@ 2024-10-22 14:49 ` Louis Chauvet
  2024-11-12  9:34   ` Vignesh Raman
  2024-10-22 14:49 ` [PATCH i-g-t 4/4] lib/chamelium/v2: Rename HAVE_CHAMELIUM to HAVE_CHAMELIUM_V2 Louis Chauvet
  2024-10-22 17:07 ` ✗ Fi.CI.BUILD: failure for lib/chamelium: Move chameliumv2 support in its own directory Patchwork
  4 siblings, 1 reply; 8+ messages in thread
From: Louis Chauvet @ 2024-10-22 14:49 UTC (permalink / raw)
  To: igt-dev
  Cc: Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem, Ashutosh Dixit,
	Thomas Petazzoni, nicolejadeyee, seanpaul, jeremie.dautheribes,
	markyacoub, Louis Chauvet,
	20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
	20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6

To avoid confusion in meson build file, rename the variable chamlium to
chamlium_v2.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 .gitlab-ci.yml            |  2 +-
 docs/testplan/meson.build |  4 ++--
 lib/meson.build           |  4 ++--
 lib/tests/meson.build     |  4 ++--
 meson.build               | 16 ++++++++--------
 meson_options.txt         |  4 ++--
 tests/meson.build         |  8 ++++----
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a6c076dba487..ff4f4f94b691 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ variables:
   MESON_OPTIONS: >
     -Dlibdrm_drivers=intel,nouveau,amdgpu
     -Doverlay=enabled
-    -Dchamelium=enabled
+    -Dchamelium_v2=enabled
     -Dvalgrind=enabled
     -Dman=enabled
     -Dtests=enabled
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/meson.build b/lib/meson.build
index dc70704bd919..5769f96fbdc1 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -189,8 +189,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 df8092638eca..fa7741b7be61 100644
--- a/lib/tests/meson.build
+++ b/lib/tests/meson.build
@@ -36,8 +36,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 64f57f232ad8..df0f7b718986 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()
@@ -174,17 +174,17 @@ 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 : [
+	chamelium_v2 = declare_dependency(dependencies : [
 		xmlrpc,
 		xmlrpc_util,
 		xmlrpc_client,
@@ -192,10 +192,10 @@ if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and gsl.foun
 		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 c410f9b777ad..3a6edefba349 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/meson.build b/tests/meson.build
index 4cb199d34527..4eebe1838979 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -332,7 +332,7 @@ if build_xe_eudebug
 	intel_xe_progs += intel_xe_eudebug_progs
 endif
 
-chamelium_progs = [
+chamelium_v2_progs = [
 	'kms_chamelium_audio',
 	'kms_chamelium_color',
 	'kms_chamelium_edid',
@@ -435,8 +435,8 @@ foreach prog : intel_progs
 	endif
 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, []),
@@ -454,7 +454,7 @@ if chamelium.found()
 				    output : name + '.testlist')
 		endif
 	endforeach
-	test_deps += chamelium
+	test_deps += chamelium_v2
 endif
 
 subdir('amdgpu')

-- 
2.46.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH i-g-t 4/4] lib/chamelium/v2: Rename HAVE_CHAMELIUM to HAVE_CHAMELIUM_V2
  2024-10-22 14:49 [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory Louis Chauvet
                   ` (2 preceding siblings ...)
  2024-10-22 14:49 ` [PATCH i-g-t 3/4] lib/chamelium/v2: Rename chamelium to chamelium_v2 Louis Chauvet
@ 2024-10-22 14:49 ` Louis Chauvet
  2024-10-22 17:07 ` ✗ Fi.CI.BUILD: failure for lib/chamelium: Move chameliumv2 support in its own directory Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Louis Chauvet @ 2024-10-22 14:49 UTC (permalink / raw)
  To: igt-dev
  Cc: Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem, Ashutosh Dixit,
	Thomas Petazzoni, nicolejadeyee, seanpaul, jeremie.dautheribes,
	markyacoub, Louis Chauvet,
	20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
	20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6

To avoid confusion in source file between the two chamelium version,
rename the HAVE_CHAMELIUM define to HAVE_CHAMELIUM_V2.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
 lib/igt.h                     | 2 +-
 lib/igt_kms.c                 | 4 ++--
 meson.build                   | 2 +-
 tests/kms_color_helper.h      | 2 +-
 tests/kms_feature_discovery.c | 4 ++--
 tests/kms_tiled_display.c     | 6 +++---
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/igt.h b/lib/igt.h
index f68d9b28eaa6..4bd845c07579 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -41,7 +41,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 8d4efde9b584..56003ceaf9dc 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -61,7 +61,7 @@
 #include "igt_rc.h"
 #include "igt_sysfs.h"
 #include "sw_sync.h"
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 #include "chamelium/v2/igt_chamelium.h"
 #endif
 
@@ -2908,7 +2908,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	if (!resources)
 		goto out;
 
-#ifdef HAVE_CHAMELIUM
+#ifdef HAVE_CHAMELIUM_V2
 	{
 		struct chamelium *chamelium;
 
diff --git a/meson.build b/meson.build
index df0f7b718986..b4b1026acb4c 100644
--- a/meson.build
+++ b/meson.build
@@ -183,7 +183,7 @@ 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)
+	config.set('HAVE_CHAMELIUM_V2', 1)
 	chamelium_v2 = declare_dependency(dependencies : [
 		xmlrpc,
 		xmlrpc_util,
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 ce42b890b0e8..fca3d4d23bcf 100644
--- a/tests/kms_tiled_display.c
+++ b/tests/kms_tiled_display.c
@@ -82,7 +82,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;
@@ -394,7 +394,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;
@@ -607,7 +607,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") {

-- 
2.46.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* ✗ Fi.CI.BUILD: failure for lib/chamelium: Move chameliumv2 support in its own directory
  2024-10-22 14:49 [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory Louis Chauvet
                   ` (3 preceding siblings ...)
  2024-10-22 14:49 ` [PATCH i-g-t 4/4] lib/chamelium/v2: Rename HAVE_CHAMELIUM to HAVE_CHAMELIUM_V2 Louis Chauvet
@ 2024-10-22 17:07 ` Patchwork
  2024-10-23  7:53   ` Louis Chauvet
  4 siblings, 1 reply; 8+ messages in thread
From: Patchwork @ 2024-10-22 17:07 UTC (permalink / raw)
  To: Louis Chauvet; +Cc: igt-dev

== Series Details ==

Series: lib/chamelium: Move chameliumv2 support in its own directory
URL   : https://patchwork.freedesktop.org/series/140319/
State : failure

== Summary ==

Applying: tests/chamelium: Extract Chamelium v2 tests into a separate directory
Applying: lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory
Using index info to reconstruct a base tree...
M	lib/igt_kms.c
M	lib/monitor_edids/monitor_edids_helper.h
Falling back to patching base and 3-way merge...
Auto-merging lib/monitor_edids/monitor_edids_helper.h
CONFLICT (content): Merge conflict in lib/monitor_edids/monitor_edids_helper.h
Auto-merging lib/igt_kms.c
Patch failed at 0002 lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ✗ Fi.CI.BUILD: failure for lib/chamelium: Move chameliumv2 support in its own directory
  2024-10-22 17:07 ` ✗ Fi.CI.BUILD: failure for lib/chamelium: Move chameliumv2 support in its own directory Patchwork
@ 2024-10-23  7:53   ` Louis Chauvet
  0 siblings, 0 replies; 8+ messages in thread
From: Louis Chauvet @ 2024-10-23  7:53 UTC (permalink / raw)
  To: igt-dev

On 22/10/24 - 17:07, Patchwork wrote:
> == Series Details ==
> 
> Series: lib/chamelium: Move chameliumv2 support in its own directory
> URL   : https://patchwork.freedesktop.org/series/140319/
> State : failure
> 
> == Summary ==
> 
> Applying: tests/chamelium: Extract Chamelium v2 tests into a separate directory
> Applying: lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory
> Using index info to reconstruct a base tree...
> M	lib/igt_kms.c
> M	lib/monitor_edids/monitor_edids_helper.h
> Falling back to patching base and 3-way merge...
> Auto-merging lib/monitor_edids/monitor_edids_helper.h
> CONFLICT (content): Merge conflict in lib/monitor_edids/monitor_edids_helper.h
> Auto-merging lib/igt_kms.c
> Patch failed at 0002 lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".

Hi,

This fail is expected as this series depends on:
- 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513@bootlin.com
- 20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6@bootlin.com

Thanks,
Louis Chauvet

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH i-g-t 3/4] lib/chamelium/v2: Rename chamelium to chamelium_v2
  2024-10-22 14:49 ` [PATCH i-g-t 3/4] lib/chamelium/v2: Rename chamelium to chamelium_v2 Louis Chauvet
@ 2024-11-12  9:34   ` Vignesh Raman
  0 siblings, 0 replies; 8+ messages in thread
From: Vignesh Raman @ 2024-11-12  9:34 UTC (permalink / raw)
  To: Louis Chauvet, igt-dev
  Cc: Petri Latvala, Arkadiusz Hiler, Kamil Konieczny,
	Juha-Pekka Heikkila, Bhanuprakash Modem, Ashutosh Dixit,
	Thomas Petazzoni, nicolejadeyee, seanpaul, jeremie.dautheribes,
	markyacoub, 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
	20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6

Hi Louis,

On 22/10/24 20:19, Louis Chauvet wrote:
> To avoid confusion in meson build file, rename the variable chamlium to
> chamlium_v2.
> 
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
>   .gitlab-ci.yml            |  2 +-
>   docs/testplan/meson.build |  4 ++--
>   lib/meson.build           |  4 ++--
>   lib/tests/meson.build     |  4 ++--
>   meson.build               | 16 ++++++++--------
>   meson_options.txt         |  4 ++--
>   tests/meson.build         |  8 ++++----
>   7 files changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index a6c076dba487..ff4f4f94b691 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -5,7 +5,7 @@ variables:
>     MESON_OPTIONS: >
>       -Dlibdrm_drivers=intel,nouveau,amdgpu
>       -Doverlay=enabled
> -    -Dchamelium=enabled
> +    -Dchamelium_v2=enabled
>       -Dvalgrind=enabled
>       -Dman=enabled
>       -Dtests=enabled
> 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/meson.build b/lib/meson.build
> index dc70704bd919..5769f96fbdc1 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -189,8 +189,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 df8092638eca..fa7741b7be61 100644
> --- a/lib/tests/meson.build
> +++ b/lib/tests/meson.build
> @@ -36,8 +36,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 64f57f232ad8..df0f7b718986 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()
> @@ -174,17 +174,17 @@ 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)

libcurl is required for chamelium v3 also. We can remove 
build_chamelium_v2 in this case.

>   
>   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 : [
> +	chamelium_v2 = declare_dependency(dependencies : [
>   		xmlrpc,
>   		xmlrpc_util,
>   		xmlrpc_client,
> @@ -192,10 +192,10 @@ if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and gsl.foun
>   		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())

This should be added inside the if condition?

>   
>   pthreads = dependency('threads')
>   math = cc.find_library('m')
> diff --git a/meson_options.txt b/meson_options.txt
> index c410f9b777ad..3a6edefba349 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/meson.build b/tests/meson.build
> index 4cb199d34527..4eebe1838979 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -332,7 +332,7 @@ if build_xe_eudebug
>   	intel_xe_progs += intel_xe_eudebug_progs
>   endif
>   
> -chamelium_progs = [
> +chamelium_v2_progs = [
>   	'kms_chamelium_audio',
>   	'kms_chamelium_color',
>   	'kms_chamelium_edid',
> @@ -435,8 +435,8 @@ foreach prog : intel_progs
>   	endif
>   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, []),
> @@ -454,7 +454,7 @@ if chamelium.found()
>   				    output : name + '.testlist')
>   		endif
>   	endforeach
> -	test_deps += chamelium
> +	test_deps += chamelium_v2
>   endif
>   
>   subdir('amdgpu')
> 

Regards,
Vignesh

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-12  9:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 14:49 [PATCH i-g-t 0/4] lib/chamelium: Move chameliumv2 support in its own directory Louis Chauvet
2024-10-22 14:49 ` [PATCH i-g-t 1/4] tests/chamelium: Extract Chamelium v2 tests into a separate directory Louis Chauvet
2024-10-22 14:49 ` [PATCH i-g-t 2/4] lib/chamelium/v2: Extract chamelium v2 wrapper into its own directory Louis Chauvet
2024-10-22 14:49 ` [PATCH i-g-t 3/4] lib/chamelium/v2: Rename chamelium to chamelium_v2 Louis Chauvet
2024-11-12  9:34   ` Vignesh Raman
2024-10-22 14:49 ` [PATCH i-g-t 4/4] lib/chamelium/v2: Rename HAVE_CHAMELIUM to HAVE_CHAMELIUM_V2 Louis Chauvet
2024-10-22 17:07 ` ✗ Fi.CI.BUILD: failure for lib/chamelium: Move chameliumv2 support in its own directory Patchwork
2024-10-23  7:53   ` Louis Chauvet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox