* ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3
2024-06-05 14:30 [PATCH i-g-t RFC 00/13] " Louis Chauvet
@ 2024-06-05 16:36 ` Patchwork
0 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2024-06-05 16:36 UTC (permalink / raw)
To: Louis Chauvet; +Cc: igt-dev
== Series Details ==
Series: tests/chamelium: Integrate the chamelium v3
URL : https://patchwork.freedesktop.org/series/134506/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
08560f766a505e729dfee2846c1c11d28dd0e3d0 tools/intel_vbt_decode: Decode device handle as a bitmask
Tail of build.log:
[1573/1687] Generating xe_pat.testlist with a meson_exe.py custom command.
[1574/1687] Linking target tools/intel_bios_dumper.
[1575/1687] Generating xe_pm.testlist with a meson_exe.py custom command.
[1576/1687] Linking target benchmarks/gem_userptr_benchmark.
[1577/1687] Generating xe_peer2peer.testlist with a meson_exe.py custom command.
[1578/1687] Generating xe_pm_residency.testlist with a meson_exe.py custom command.
[1579/1687] Generating xe_noexec_ping_pong.testlist with a meson_exe.py custom command.
[1580/1687] Linking target benchmarks/gem_exec_nop.
[1581/1687] Linking target benchmarks/gem_exec_fault.
[1582/1687] Linking target benchmarks/gem_syslatency.
[1583/1687] Linking target benchmarks/gem_exec_trace.
[1584/1687] Generating xe_vm.testlist with a meson_exe.py custom command.
[1585/1687] Linking target benchmarks/gem_latency.
[1586/1687] Generating xe_query.testlist with a meson_exe.py custom command.
[1587/1687] Linking target benchmarks/gem_prw.
[1588/1687] Linking target benchmarks/gem_set_domain.
[1589/1687] Generating xe_render_copy.testlist with a meson_exe.py custom command.
[1590/1687] Generating xe_prime_self_import.testlist with a meson_exe.py custom command.
[1591/1687] Generating kms_chamelium_hpd.testlist with a meson_exe.py custom command.
[1592/1687] Linking target benchmarks/gem_exec_reloc.
[1593/1687] Generating kms_chamelium_audio.testlist with a meson_exe.py custom command.
[1594/1687] Generating xe_spin_batch.testlist with a meson_exe.py custom command.
[1595/1687] Generating xe_sysfs_scheduler.testlist with a meson_exe.py custom command.
[1596/1687] Linking target benchmarks/gem_wsim.
[1597/1687] Generating xe_waitfence.testlist with a meson_exe.py custom command.
[1598/1687] Generating xe_sysfs_defaults.testlist with a meson_exe.py custom command.
[1599/1687] Generating kms_chamelium_color.testlist with a meson_exe.py custom command.
[1600/1687] Generating kms_chamelium_edid.testlist with a meson_exe.py custom command.
[1601/1687] Generating kms_chamelium_frames.testlist with a meson_exe.py custom command.
[1602/1687] Generating kms_chamelium_v3_basic.testlist with a meson_exe.py custom command.
[1603/1687] Linking target benchmarks/kms_vblank.
[1604/1687] Linking target benchmarks/intel_upload_blit_large_gtt.
[1605/1687] Linking target benchmarks/intel_upload_blit_small.
[1606/1687] Linking target benchmarks/prime_lookup.
[1607/1687] Linking target benchmarks/intel_upload_blit_large.
[1608/1687] Linking target benchmarks/vgem_mmap.
[1609/1687] Linking target benchmarks/kms_fb_stress.
[1610/1687] Linking target benchmarks/intel_upload_blit_large_map.
[1611/1687] Linking target tools/igt_stats.
[1612/1687] Linking target tools/intel_display_poller.
[1613/1687] Linking target tools/intel_display_crc.
[1614/1687] Linking target tools/intel_dump_decode.
[1615/1687] Linking target tools/skl_compute_wrpll.
[1616/1687] Linking target tools/intel_audio_dump.
[1617/1687] Linking target tools/hsw_compute_wrpll.
[1618/1687] Linking target tools/intel_backlight.
[1619/1687] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
[1620/1687] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt2.c.o'.
[1621/1687] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt3.c.o'.
ninja: build stopped: subcommand failed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3
2024-07-09 15:34 [PATCH i-g-t v2 00/39] " Louis Chauvet
@ 2024-07-09 16:16 ` Patchwork
2024-07-10 9:48 ` Louis Chauvet
0 siblings, 1 reply; 15+ messages in thread
From: Patchwork @ 2024-07-09 16:16 UTC (permalink / raw)
To: Louis Chauvet; +Cc: igt-dev
== Series Details ==
Series: tests/chamelium: Integrate the chamelium v3
URL : https://patchwork.freedesktop.org/series/135910/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
a7ef4e2bacb168f19605851986629d462b097df6 lib/i915/perf: Add ARL support in IGT perf library
Tail of build.log:
[381/1759] Compiling C object 'lib/76b5a35@@igt-igt_v3d_c@sta/igt_v3d.c.o'.
[382/1759] Compiling C object 'lib/76b5a35@@igt-gpu_cmds_c@sta/gpu_cmds.c.o'.
[383/1759] Compiling C object 'tests/59830eb@@kms_selftest@exe/kms_selftest.c.o'.
[384/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen7_c@sta/rendercopy_gen7.c.o'.
[385/1759] Compiling C object 'tests/59830eb@@kms_sysfs_edid_timing@exe/kms_sysfs_edid_timing.c.o'.
[386/1759] Compiling C object 'tests/59830eb@@gem_softpin@exe/intel_gem_softpin.c.o'.
[387/1759] Compiling C object 'tests/59830eb@@kms_scaling_modes@exe/kms_scaling_modes.c.o'.
[388/1759] Compiling C object 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o'.
[389/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen6_c@sta/rendercopy_gen6.c.o'.
[390/1759] Compiling C object 'lib/76b5a35@@igt-intel_compute_c@sta/intel_compute.c.o'.
[391/1759] Compiling C object 'tests/59830eb@@kms_plane_multiple@exe/kms_plane_multiple.c.o'.
[392/1759] Compiling C object 'tests/59830eb@@kms_tv_load_detect@exe/kms_tv_load_detect.c.o'.
[393/1759] Compiling C object 'tests/59830eb@@kms_rmfb@exe/kms_rmfb.c.o'.
[394/1759] Compiling C object 'tests/59830eb@@kms_plane_cursor@exe/kms_plane_cursor.c.o'.
[395/1759] Compiling C object 'tests/59830eb@@kms_plane_lowres@exe/kms_plane_lowres.c.o'.
[396/1759] Compiling C object 'lib/76b5a35@@igt-intel_bufops_c@sta/intel_bufops.c.o'.
[397/1759] Compiling C object 'tests/59830eb@@kms_pipe_crc_basic@exe/kms_pipe_crc_basic.c.o'.
[398/1759] Compiling C object 'lib/76b5a35@@igt-igt_pm_c@sta/igt_pm.c.o'.
[399/1759] Compiling C object 'tests/59830eb@@kms_prop_blob@exe/kms_prop_blob.c.o'.
[400/1759] Compiling C object 'tests/59830eb@@kms_plane_alpha_blend@exe/kms_plane_alpha_blend.c.o'.
[401/1759] Compiling C object 'tests/59830eb@@kms_prime@exe/kms_prime.c.o'.
[402/1759] Compiling C object 'lib/76b5a35@@igt-igt_amd_c@sta/igt_amd.c.o'.
[403/1759] Generating i915-perf-registers-acmgt3 with a custom command.
[404/1759] Compiling C object 'lib/76b5a35@@igt-igt_vmwgfx_c@sta/igt_vmwgfx.c.o'.
[405/1759] Compiling C object 'tests/59830eb@@kms_tiled_display@exe/kms_tiled_display.c.o'.
[406/1759] Compiling C object 'tests/59830eb@@kms_sequence@exe/kms_sequence.c.o'.
[407/1759] Compiling C object 'tests/59830eb@@gem_concurrent_blit@exe/intel_gem_concurrent_blit.c.o'.
[408/1759] Compiling C object 'lib/76b5a35@@xe_oa@sha/meson-generated_.._xe_oa_equations.c.o'.
[409/1759] Compiling C object 'tests/59830eb@@kms_flip@exe/kms_flip.c.o'.
[410/1759] Compiling C object 'lib/76b5a35@@igt-intel_blt_c@sta/intel_blt.c.o'.
[411/1759] Compiling C object 'tests/59830eb@@kms_plane@exe/kms_plane.c.o'.
[412/1759] Generating i915-perf-metrics-acmgt3 with a custom command.
[413/1759] Compiling C object 'lib/76b5a35@@igt-igt_kmod_c@sta/igt_kmod.c.o'.
[414/1759] Compiling C object 'tests/59830eb@@kms_properties@exe/kms_properties.c.o'.
[415/1759] Compiling C object 'tests/59830eb@@kms_setmode@exe/kms_setmode.c.o'.
[416/1759] Compiling C object 'tests/59830eb@@kms_plane_scaling@exe/kms_plane_scaling.c.o'.
[417/1759] Compiling C object 'tests/59830eb@@kms_lease@exe/kms_lease.c.o'.
[418/1759] Compiling C object 'lib/76b5a35@@igt-chamelium_v2_igt_chamelium_c@sta/chamelium_v2_igt_chamelium.c.o'.
[419/1759] Compiling C object 'tests/59830eb@@kms_rotation_crc@exe/kms_rotation_crc.c.o'.
[420/1759] Compiling C object 'tests/59830eb@@kms_atomic@exe/kms_atomic.c.o'.
[421/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen8_c@sta/rendercopy_gen8.c.o'.
[422/1759] Compiling C object 'tests/59830eb@@kms_cursor_legacy@exe/kms_cursor_legacy.c.o'.
[423/1759] Compiling C object 'lib/76b5a35@@igt-igt_core_c@sta/igt_core.c.o'.
[424/1759] Compiling C object 'lib/76b5a35@@igt-intel_batchbuffer_c@sta/intel_batchbuffer.c.o'.
[425/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen9_c@sta/rendercopy_gen9.c.o'.
[426/1759] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
[427/1759] Compiling C object 'lib/76b5a35@@igt-i915_intel_decode_c@sta/i915_intel_decode.c.o'.
[428/1759] Compiling C object 'lib/76b5a35@@igt-igt_kms_c@sta/igt_kms.c.o'.
[429/1759] Generating i915-perf-equations with a custom command.
ninja: build stopped: subcommand failed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3
2024-07-09 16:16 ` ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2024-07-10 9:48 ` Louis Chauvet
2024-08-26 9:30 ` Vignesh Raman
0 siblings, 1 reply; 15+ messages in thread
From: Louis Chauvet @ 2024-07-10 9:48 UTC (permalink / raw)
To: igt-dev
Hi all,
It seems like I forgot to include errno.h. Should I send a new version or
wait for comments before?
diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
index fa70e2c1e296..4ed408a49afb 100644
--- a/lib/chamelium/v3/igt_chamelium.c
+++ b/lib/chamelium/v3/igt_chamelium.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
+
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
This morning I attempted to run the CI locally to avoid more errors, it
was a bit tricky (gitlab-runner deprecated the exec option to run the CI
locally, the images used are in the private docker repository, I had to
rebuild docker image myself).
With the following diff, the fedora build seems to pass, but I have some
timeout on tests, this timeout is also present on master.
PASS build:tests-fedora
PASS build:tests-fedora-no-libunwind
PASS build:tests-fedora-oldest-meson
PASS build:tests-fedora-no-libdrm-nouveau
PASS build:tests-fedora-clang
PASS test:list-undocumented-tests
PASS test:verify-blacklists
FAIL test:ninja-test
> Skipped: 0
> Timeout: 1
> Full log written to /gcl-builds/build/meson-logs/testlog.txt
FAIL test:ninja-test-clang
> Skipped: 0
> Timeout: 1
> Full log written to /gcl-builds/build/meson-logs/testlog.txt
For test:ninja-test
419/431 runner TIMEOUT 300.01 s
For test:ninja-test-clang
419/431 runner TIMEOUT 300.00 s
I am not able to run debian images, I tried to build the Dockerfile, but
the debian version seems too old (404 during apt update), and I am not
able to fetch prebuild images from gitlab (it seems to require API keys).
I will send a series to explain how to run the CI locally.
> == Series Details ==
>
> Series: tests/chamelium: Integrate the chamelium v3
> URL : https://patchwork.freedesktop.org/series/135910/
> State : failure
>
> == Summary ==
>
> IGT patchset build failed on latest successful build
> a7ef4e2bacb168f19605851986629d462b097df6 lib/i915/perf: Add ARL support in IGT perf library
>
> Tail of build.log:
> [381/1759] Compiling C object 'lib/76b5a35@@igt-igt_v3d_c@sta/igt_v3d.c.o'.
> [382/1759] Compiling C object 'lib/76b5a35@@igt-gpu_cmds_c@sta/gpu_cmds.c.o'.
> [383/1759] Compiling C object 'tests/59830eb@@kms_selftest@exe/kms_selftest.c.o'.
> [384/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen7_c@sta/rendercopy_gen7.c.o'.
> [385/1759] Compiling C object 'tests/59830eb@@kms_sysfs_edid_timing@exe/kms_sysfs_edid_timing.c.o'.
> [386/1759] Compiling C object 'tests/59830eb@@gem_softpin@exe/intel_gem_softpin.c.o'.
> [387/1759] Compiling C object 'tests/59830eb@@kms_scaling_modes@exe/kms_scaling_modes.c.o'.
> [388/1759] Compiling C object 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o'.
> [389/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen6_c@sta/rendercopy_gen6.c.o'.
> [390/1759] Compiling C object 'lib/76b5a35@@igt-intel_compute_c@sta/intel_compute.c.o'.
> [391/1759] Compiling C object 'tests/59830eb@@kms_plane_multiple@exe/kms_plane_multiple.c.o'.
> [392/1759] Compiling C object 'tests/59830eb@@kms_tv_load_detect@exe/kms_tv_load_detect.c.o'.
> [393/1759] Compiling C object 'tests/59830eb@@kms_rmfb@exe/kms_rmfb.c.o'.
> [394/1759] Compiling C object 'tests/59830eb@@kms_plane_cursor@exe/kms_plane_cursor.c.o'.
> [395/1759] Compiling C object 'tests/59830eb@@kms_plane_lowres@exe/kms_plane_lowres.c.o'.
> [396/1759] Compiling C object 'lib/76b5a35@@igt-intel_bufops_c@sta/intel_bufops.c.o'.
> [397/1759] Compiling C object 'tests/59830eb@@kms_pipe_crc_basic@exe/kms_pipe_crc_basic.c.o'.
> [398/1759] Compiling C object 'lib/76b5a35@@igt-igt_pm_c@sta/igt_pm.c.o'.
> [399/1759] Compiling C object 'tests/59830eb@@kms_prop_blob@exe/kms_prop_blob.c.o'.
> [400/1759] Compiling C object 'tests/59830eb@@kms_plane_alpha_blend@exe/kms_plane_alpha_blend.c.o'.
> [401/1759] Compiling C object 'tests/59830eb@@kms_prime@exe/kms_prime.c.o'.
> [402/1759] Compiling C object 'lib/76b5a35@@igt-igt_amd_c@sta/igt_amd.c.o'.
> [403/1759] Generating i915-perf-registers-acmgt3 with a custom command.
> [404/1759] Compiling C object 'lib/76b5a35@@igt-igt_vmwgfx_c@sta/igt_vmwgfx.c.o'.
> [405/1759] Compiling C object 'tests/59830eb@@kms_tiled_display@exe/kms_tiled_display.c.o'.
> [406/1759] Compiling C object 'tests/59830eb@@kms_sequence@exe/kms_sequence.c.o'.
> [407/1759] Compiling C object 'tests/59830eb@@gem_concurrent_blit@exe/intel_gem_concurrent_blit.c.o'.
> [408/1759] Compiling C object 'lib/76b5a35@@xe_oa@sha/meson-generated_.._xe_oa_equations.c.o'.
> [409/1759] Compiling C object 'tests/59830eb@@kms_flip@exe/kms_flip.c.o'.
> [410/1759] Compiling C object 'lib/76b5a35@@igt-intel_blt_c@sta/intel_blt.c.o'.
> [411/1759] Compiling C object 'tests/59830eb@@kms_plane@exe/kms_plane.c.o'.
> [412/1759] Generating i915-perf-metrics-acmgt3 with a custom command.
> [413/1759] Compiling C object 'lib/76b5a35@@igt-igt_kmod_c@sta/igt_kmod.c.o'.
> [414/1759] Compiling C object 'tests/59830eb@@kms_properties@exe/kms_properties.c.o'.
> [415/1759] Compiling C object 'tests/59830eb@@kms_setmode@exe/kms_setmode.c.o'.
> [416/1759] Compiling C object 'tests/59830eb@@kms_plane_scaling@exe/kms_plane_scaling.c.o'.
> [417/1759] Compiling C object 'tests/59830eb@@kms_lease@exe/kms_lease.c.o'.
> [418/1759] Compiling C object 'lib/76b5a35@@igt-chamelium_v2_igt_chamelium_c@sta/chamelium_v2_igt_chamelium.c.o'.
> [419/1759] Compiling C object 'tests/59830eb@@kms_rotation_crc@exe/kms_rotation_crc.c.o'.
> [420/1759] Compiling C object 'tests/59830eb@@kms_atomic@exe/kms_atomic.c.o'.
> [421/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen8_c@sta/rendercopy_gen8.c.o'.
> [422/1759] Compiling C object 'tests/59830eb@@kms_cursor_legacy@exe/kms_cursor_legacy.c.o'.
> [423/1759] Compiling C object 'lib/76b5a35@@igt-igt_core_c@sta/igt_core.c.o'.
> [424/1759] Compiling C object 'lib/76b5a35@@igt-intel_batchbuffer_c@sta/intel_batchbuffer.c.o'.
> [425/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen9_c@sta/rendercopy_gen9.c.o'.
> [426/1759] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
> [427/1759] Compiling C object 'lib/76b5a35@@igt-i915_intel_decode_c@sta/i915_intel_decode.c.o'.
> [428/1759] Compiling C object 'lib/76b5a35@@igt-igt_kms_c@sta/igt_kms.c.o'.
> [429/1759] Generating i915-perf-equations with a custom command.
> ninja: build stopped: subcommand failed.
>
>
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3
2024-07-10 9:48 ` Louis Chauvet
@ 2024-08-26 9:30 ` Vignesh Raman
0 siblings, 0 replies; 15+ messages in thread
From: Vignesh Raman @ 2024-08-26 9:30 UTC (permalink / raw)
To: Louis Chauvet, igt-dev; +Cc: daniels
Hi Louis,
On 10/07/24 15:18, Louis Chauvet wrote:
> Hi all,
>
> It seems like I forgot to include errno.h. Should I send a new version or
> wait for comments before?
>
> diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
> index fa70e2c1e296..4ed408a49afb 100644
> --- a/lib/chamelium/v3/igt_chamelium.c
> +++ b/lib/chamelium/v3/igt_chamelium.c
> @@ -1,5 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
>
> +#include <errno.h>
> +
> #include <xmlrpc-c/base.h>
> #include <xmlrpc-c/client.h>
>
>
> This morning I attempted to run the CI locally to avoid more errors, it
> was a bit tricky (gitlab-runner deprecated the exec option to run the CI
> locally, the images used are in the private docker repository, I had to
> rebuild docker image myself).
>
> With the following diff, the fedora build seems to pass, but I have some
> timeout on tests, this timeout is also present on master.
>
> PASS build:tests-fedora
> PASS build:tests-fedora-no-libunwind
> PASS build:tests-fedora-oldest-meson
> PASS build:tests-fedora-no-libdrm-nouveau
> PASS build:tests-fedora-clang
> PASS test:list-undocumented-tests
> PASS test:verify-blacklists
> FAIL test:ninja-test
> > Skipped: 0
> > Timeout: 1
> > Full log written to /gcl-builds/build/meson-logs/testlog.txt
> FAIL test:ninja-test-clang
> > Skipped: 0
> > Timeout: 1
> > Full log written to /gcl-builds/build/meson-logs/testlog.txt
>
> For test:ninja-test
> 419/431 runner TIMEOUT 300.01 s
>
> For test:ninja-test-clang
> 419/431 runner TIMEOUT 300.00 s
>
> I am not able to run debian images, I tried to build the Dockerfile, but
> the debian version seems too old (404 during apt update), and I am not
> able to fetch prebuild images from gitlab (it seems to require API keys).
Thanks for this series.
I'm able to add your patches in a test branch and build it in drm-ci
using debian images. There are some failures seen in lib/igt_kms.c and I
sent some review comments for your patches. Please could you send an
updated series. Thank you.
Regards,
Vignesh
>
> I will send a series to explain how to run the CI locally.
>
>> == Series Details ==
>>
>> Series: tests/chamelium: Integrate the chamelium v3
>> URL : https://patchwork.freedesktop.org/series/135910/
>> State : failure
>>
>> == Summary ==
>>
>> IGT patchset build failed on latest successful build
>> a7ef4e2bacb168f19605851986629d462b097df6 lib/i915/perf: Add ARL support in IGT perf library
>>
>> Tail of build.log:
>> [381/1759] Compiling C object 'lib/76b5a35@@igt-igt_v3d_c@sta/igt_v3d.c.o'.
>> [382/1759] Compiling C object 'lib/76b5a35@@igt-gpu_cmds_c@sta/gpu_cmds.c.o'.
>> [383/1759] Compiling C object 'tests/59830eb@@kms_selftest@exe/kms_selftest.c.o'.
>> [384/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen7_c@sta/rendercopy_gen7.c.o'.
>> [385/1759] Compiling C object 'tests/59830eb@@kms_sysfs_edid_timing@exe/kms_sysfs_edid_timing.c.o'.
>> [386/1759] Compiling C object 'tests/59830eb@@gem_softpin@exe/intel_gem_softpin.c.o'.
>> [387/1759] Compiling C object 'tests/59830eb@@kms_scaling_modes@exe/kms_scaling_modes.c.o'.
>> [388/1759] Compiling C object 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o'.
>> [389/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen6_c@sta/rendercopy_gen6.c.o'.
>> [390/1759] Compiling C object 'lib/76b5a35@@igt-intel_compute_c@sta/intel_compute.c.o'.
>> [391/1759] Compiling C object 'tests/59830eb@@kms_plane_multiple@exe/kms_plane_multiple.c.o'.
>> [392/1759] Compiling C object 'tests/59830eb@@kms_tv_load_detect@exe/kms_tv_load_detect.c.o'.
>> [393/1759] Compiling C object 'tests/59830eb@@kms_rmfb@exe/kms_rmfb.c.o'.
>> [394/1759] Compiling C object 'tests/59830eb@@kms_plane_cursor@exe/kms_plane_cursor.c.o'.
>> [395/1759] Compiling C object 'tests/59830eb@@kms_plane_lowres@exe/kms_plane_lowres.c.o'.
>> [396/1759] Compiling C object 'lib/76b5a35@@igt-intel_bufops_c@sta/intel_bufops.c.o'.
>> [397/1759] Compiling C object 'tests/59830eb@@kms_pipe_crc_basic@exe/kms_pipe_crc_basic.c.o'.
>> [398/1759] Compiling C object 'lib/76b5a35@@igt-igt_pm_c@sta/igt_pm.c.o'.
>> [399/1759] Compiling C object 'tests/59830eb@@kms_prop_blob@exe/kms_prop_blob.c.o'.
>> [400/1759] Compiling C object 'tests/59830eb@@kms_plane_alpha_blend@exe/kms_plane_alpha_blend.c.o'.
>> [401/1759] Compiling C object 'tests/59830eb@@kms_prime@exe/kms_prime.c.o'.
>> [402/1759] Compiling C object 'lib/76b5a35@@igt-igt_amd_c@sta/igt_amd.c.o'.
>> [403/1759] Generating i915-perf-registers-acmgt3 with a custom command.
>> [404/1759] Compiling C object 'lib/76b5a35@@igt-igt_vmwgfx_c@sta/igt_vmwgfx.c.o'.
>> [405/1759] Compiling C object 'tests/59830eb@@kms_tiled_display@exe/kms_tiled_display.c.o'.
>> [406/1759] Compiling C object 'tests/59830eb@@kms_sequence@exe/kms_sequence.c.o'.
>> [407/1759] Compiling C object 'tests/59830eb@@gem_concurrent_blit@exe/intel_gem_concurrent_blit.c.o'.
>> [408/1759] Compiling C object 'lib/76b5a35@@xe_oa@sha/meson-generated_.._xe_oa_equations.c.o'.
>> [409/1759] Compiling C object 'tests/59830eb@@kms_flip@exe/kms_flip.c.o'.
>> [410/1759] Compiling C object 'lib/76b5a35@@igt-intel_blt_c@sta/intel_blt.c.o'.
>> [411/1759] Compiling C object 'tests/59830eb@@kms_plane@exe/kms_plane.c.o'.
>> [412/1759] Generating i915-perf-metrics-acmgt3 with a custom command.
>> [413/1759] Compiling C object 'lib/76b5a35@@igt-igt_kmod_c@sta/igt_kmod.c.o'.
>> [414/1759] Compiling C object 'tests/59830eb@@kms_properties@exe/kms_properties.c.o'.
>> [415/1759] Compiling C object 'tests/59830eb@@kms_setmode@exe/kms_setmode.c.o'.
>> [416/1759] Compiling C object 'tests/59830eb@@kms_plane_scaling@exe/kms_plane_scaling.c.o'.
>> [417/1759] Compiling C object 'tests/59830eb@@kms_lease@exe/kms_lease.c.o'.
>> [418/1759] Compiling C object 'lib/76b5a35@@igt-chamelium_v2_igt_chamelium_c@sta/chamelium_v2_igt_chamelium.c.o'.
>> [419/1759] Compiling C object 'tests/59830eb@@kms_rotation_crc@exe/kms_rotation_crc.c.o'.
>> [420/1759] Compiling C object 'tests/59830eb@@kms_atomic@exe/kms_atomic.c.o'.
>> [421/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen8_c@sta/rendercopy_gen8.c.o'.
>> [422/1759] Compiling C object 'tests/59830eb@@kms_cursor_legacy@exe/kms_cursor_legacy.c.o'.
>> [423/1759] Compiling C object 'lib/76b5a35@@igt-igt_core_c@sta/igt_core.c.o'.
>> [424/1759] Compiling C object 'lib/76b5a35@@igt-intel_batchbuffer_c@sta/intel_batchbuffer.c.o'.
>> [425/1759] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen9_c@sta/rendercopy_gen9.c.o'.
>> [426/1759] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
>> [427/1759] Compiling C object 'lib/76b5a35@@igt-i915_intel_decode_c@sta/i915_intel_decode.c.o'.
>> [428/1759] Compiling C object 'lib/76b5a35@@igt-igt_kms_c@sta/igt_kms.c.o'.
>> [429/1759] Generating i915-perf-equations with a custom command.
>> ninja: build stopped: subcommand failed.
>>
>>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3
@ 2024-10-22 16:31 Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper Louis Chauvet
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-22 16:31 UTC (permalink / raw)
To: igt-dev, ihf, markyacoub, thomas.petazzoni, jeremie.dautheribes,
20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Cc: Louis Chauvet
Hi all,
This patch series introduces a new wrapper for the Chameleon v3 board, a
testing tool used primarily for Chromebooks, but also by community members
to increase test coverage of graphic devices. The Chameleon v3 is an
upgrade from its predecessor, with the ability to emulate 2 HDMI and 2
DisplayPort devices, including MST devices.
The board can read and analyze any stream on the DisplayPort and HDMI
cables, and even take captures, making it an ideal tool for testing
hardware, driver, and user space behavior in specific situations, such as
screen hotplugging and multiple MST screens. However, the changes between
the v2 and v3, such as the addition of MST support and the removal of CRC
for screen captures, would require significant modifications to the
existing tests and wrappers.
To avoid this complexity and ensure that the Chameleon v3 is fully
supported and the v2 is not broken, I wrote a new wrapper with
simplicity and ease of use in mind. The Chameleon v3 wrapper should only
manage the Chameleon itself, without the need for DRM displays, EDID
caching/modifications, or state machines. This approach will make it
easier for developers to use the Chameleon v3 and contribute to its
development.
This series depends on:
-https://lore.kernel.org/igt-dev/20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513@bootlin.com
-https://lore.kernel.org/igt-dev/20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6@bootlin.com
-https://lore.kernel.org/igt-dev/20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9@bootlin.com
In addition, I will send more series to:
- add more methods to the chamelium wrapper
- add new options in the configuration file to configure the chamelium
- add tests for the cv3
---
Changes in v3:
- Rebased and splitted the series
- Fixed few build issues
- Link to v2: https://lore.kernel.org/r/20240709-dev-remove-static-ports-v2-0-5adfc6985778@bootlin.com
Changes in v2:
- Mainly splitting and cleaning work since the RFC,
- Link to v1: https://lore.kernel.org/r/20240605-dev-remove-static-ports-v1-0-665f25b7a4db@bootlin.com
---
Louis Chauvet (5):
lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
lib/chamelium/v3: Introduce initialization and cleanup of Chamelium-related structures
lib/chamelium/v3: Add method to discover Chamelium ports
lib/chamelium/v3: Implement method to retrieve Chamelium port names
tests/chamelium/v3: Implement a basic Chamelium v3 accessibility test
lib/chamelium/v3/igt_chamelium.c | 309 ++++++++++++++++++++++++++++
lib/chamelium/v3/igt_chamelium.h | 52 +++++
lib/igt_kms.c | 8 +
lib/meson.build | 12 +-
lib/tests/meson.build | 4 +
meson.build | 15 +-
meson_options.txt | 4 +
tests/chamelium/v3/kms_chamelium_v3_basic.c | 30 +++
tests/meson.build | 26 +++
9 files changed, 458 insertions(+), 2 deletions(-)
---
base-commit: 9b8c0f6da8898f760bfaa2113455eb84b68a69f4
change-id: 20240522-dev-remove-static-ports-9382ffbbf146
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
prerequisite-message-id: 20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9@bootlin.com
prerequisite-patch-id: 4ac6bf11d25e80e99d5607d4864c3c7b4273dde3
prerequisite-patch-id: 2246b4289eca0b8e8b02519051af7564b0875a2a
prerequisite-patch-id: 394057bc39308265a03e026ac924f88d3d933d49
prerequisite-patch-id: ad1f0838e81fa620013313316afd35a3d5c146fa
Best regards,
--
Louis Chauvet <louis.chauvet@bootlin.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
@ 2024-10-22 16:31 ` Louis Chauvet
2024-11-12 9:37 ` Vignesh Raman
2025-03-12 10:11 ` [i-g-t, v3, " Joshi, Kunal1
2024-10-22 16:31 ` [PATCH i-g-t v3 2/5] lib/chamelium/v3: Introduce initialization and cleanup of Chamelium-related structures Louis Chauvet
` (5 subsequent siblings)
6 siblings, 2 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-22 16:31 UTC (permalink / raw)
To: igt-dev, ihf, markyacoub, thomas.petazzoni, jeremie.dautheribes,
20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Cc: Louis Chauvet
Adds a build option to enable building the Chamelium v3 wrapper.
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
lib/chamelium/v3/igt_chamelium.c | 9 +++++++++
lib/chamelium/v3/igt_chamelium.h | 8 ++++++++
lib/igt_kms.c | 8 ++++++++
lib/meson.build | 12 +++++++++++-
lib/tests/meson.build | 4 ++++
meson.build | 15 ++++++++++++++-
meson_options.txt | 4 ++++
tests/meson.build | 25 +++++++++++++++++++++++++
8 files changed, 83 insertions(+), 2 deletions(-)
diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
new file mode 100644
index 000000000000..152242998013
--- /dev/null
+++ b/lib/chamelium/v3/igt_chamelium.c
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: MIT
+
+#include <igt_core.h>
+#include "igt_chamelium.h"
+
+void chamelium_v3_init(void)
+{
+ igt_info("Using chamelium v3\n");
+}
diff --git a/lib/chamelium/v3/igt_chamelium.h b/lib/chamelium/v3/igt_chamelium.h
new file mode 100644
index 000000000000..3195be2bc384
--- /dev/null
+++ b/lib/chamelium/v3/igt_chamelium.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef V3_IGT_CHAMELIUM_H
+#define V3_IGT_CHAMELIUM_H
+
+void chamelium_v3_init(void);
+
+#endif //V3_IGT_CHAMELIUM_H
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 56003ceaf9dc..4d9df90e771f 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2908,7 +2908,14 @@ void igt_display_require(igt_display_t *display, int drm_fd)
if (!resources)
goto out;
+/*
+ * FIXME: Dirty hack to avoid those lines when chamelium v3 is used
+ *
+ * Must be replaced with a configuration file information, so the end user can choose if the
+ * chamelium must be connected or not.
+ */
#ifdef HAVE_CHAMELIUM_V2
+#ifndef HAVE_CHAMELIUM_V3
{
struct chamelium *chamelium;
@@ -2923,6 +2930,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
chamelium_deinit_rpc_only(chamelium);
}
}
+#endif
#endif
igt_require_f(resources->count_crtcs <= IGT_MAX_PIPES,
diff --git a/lib/meson.build b/lib/meson.build
index 5769f96fbdc1..8bcbd58bc0e6 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -195,7 +195,6 @@ if chamelium_v2.found()
'chamelium/v2/igt_chamelium.c',
'chamelium/v2/igt_chamelium_stream.c'
]
- lib_sources += 'monitor_edids/monitor_edids_helper.c'
endif
if build_xe_eudebug
@@ -203,6 +202,17 @@ if build_xe_eudebug
lib_sources += 'xe/xe_eudebug.c'
endif
+if chamelium_v3.found()
+ lib_deps += chamelium_v3
+ lib_sources += [
+ 'chamelium/v3/igt_chamelium.c',
+ ]
+endif
+
+if chamelium_v2.found() or chamelium_v3.found()
+ lib_sources += 'monitor_edids/monitor_edids_helper.c'
+endif
+
if libprocps.found()
lib_deps += libprocps
else
diff --git a/lib/tests/meson.build b/lib/tests/meson.build
index fa7741b7be61..8a96cd73ee42 100644
--- a/lib/tests/meson.build
+++ b/lib/tests/meson.build
@@ -41,6 +41,10 @@ if chamelium_v2.found()
lib_tests += 'igt_audio'
endif
+if chamelium_v3.found()
+ lib_deps += chamelium_v3
+endif
+
foreach lib_test : lib_tests
exec = executable(lib_test, lib_test + '.c', install : false,
dependencies : igt_deps)
diff --git a/meson.build b/meson.build
index b4b1026acb4c..d5d7b325eacd 100644
--- a/meson.build
+++ b/meson.build
@@ -87,6 +87,7 @@ foreach cc_arg : cc_args
endforeach
build_chamelium_v2 = get_option('chamelium_v2')
+build_chamelium_v3 = get_option('chamelium_v3')
build_docs = get_option('docs')
build_tests = not get_option('tests').disabled()
build_xe = not get_option('xe_driver').disabled()
@@ -174,7 +175,7 @@ if not xmlrpc.found() and xmlrpc_cmd.found()
endif
endif
-if build_chamelium_v2.enabled() and not (xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found())
+if (build_chamelium_v2.enabled() or build_chamelium_v3.enabled()) and not (xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found())
error('Chamelium build forced and required dependency xmlrpc not found')
endif
@@ -197,6 +198,18 @@ endif
build_info += 'Build Chamelium v2 test: @0@'.format(chamelium_v2.found())
+
+if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and libcurl.found()
+ config.set('HAVE_CHAMELIUM_V3', 1)
+ chamelium_v3 = declare_dependency(dependencies : [
+ xmlrpc,
+ xmlrpc_util,
+ xmlrpc_client,
+ ])
+else
+ chamelium_v3 = disabler()
+endif
+
pthreads = dependency('threads')
math = cc.find_library('m')
realtime = cc.find_library('rt')
diff --git a/meson_options.txt b/meson_options.txt
index 3a6edefba349..ebdb9976da1a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -12,6 +12,10 @@ option('chamelium_v2',
type : 'feature',
description : 'Build Chamelium v2 test')
+option('chamelium_v3',
+ type : 'feature',
+ description : 'Build Chamelium v3 tests')
+
option('valgrind',
type : 'feature',
description : 'Build with support for valgrind annotations')
diff --git a/tests/meson.build b/tests/meson.build
index 4eebe1838979..861101c2534e 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -340,6 +340,9 @@ chamelium_v2_progs = [
'kms_chamelium_hpd',
]
+chamelium_v3_progs = [
+]
+
test_deps = [ igt_deps ]
if libdrm_nouveau.found()
@@ -457,6 +460,28 @@ if chamelium_v2.found()
test_deps += chamelium_v2
endif
+if chamelium_v3.found()
+ foreach prog : chamelium_v3_progs
+ testexe = executable(prog,
+ [join_paths('chamelium', 'v3', prog + '.c')],
+ dependencies : test_deps,
+ install_dir : libexecdir,
+ install_rpath : libexecdir_rpathdir,
+ install : true)
+ test_list += prog
+ test_executables += testexe
+ name = prog.split('/').get(-1)
+ if not meson.is_cross_build()
+ testlist_files += custom_target(name + '.testlist',
+ build_by_default : true,
+ command : [testexe, '--show-testlist'],
+ capture : true,
+ output : name + '.testlist')
+ endif
+ endforeach
+ test_deps += chamelium_v3
+endif
+
subdir('amdgpu')
subdir('msm')
--
2.46.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t v3 2/5] lib/chamelium/v3: Introduce initialization and cleanup of Chamelium-related structures
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper Louis Chauvet
@ 2024-10-22 16:31 ` Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 3/5] lib/chamelium/v3: Add method to discover Chamelium ports Louis Chauvet
` (4 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-22 16:31 UTC (permalink / raw)
To: igt-dev, ihf, markyacoub, thomas.petazzoni, jeremie.dautheribes,
20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Cc: Louis Chauvet
In preparation for utilizing the Chamelium in tests, this commit
introduces a few helper functions to read the Chamelium configuration from
a file and initialize RPC-related structures.
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
lib/chamelium/v3/igt_chamelium.c | 148 ++++++++++++++++++++++++++++++++++++++-
lib/chamelium/v3/igt_chamelium.h | 39 ++++++++++-
2 files changed, 183 insertions(+), 4 deletions(-)
diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
index 152242998013..663f51aaa7b0 100644
--- a/lib/chamelium/v3/igt_chamelium.c
+++ b/lib/chamelium/v3/igt_chamelium.c
@@ -1,9 +1,151 @@
// SPDX-License-Identifier: MIT
-#include <igt_core.h>
+#include <xmlrpc-c/base.h>
+#include <xmlrpc-c/client.h>
+
#include "igt_chamelium.h"
+#include "igt_core.h"
+#include "igt_rc.h"
+
+#define CHAMELIUM_CONFIG_SECTION "Chameliumv3"
+#define CHAMELIUM_CONFIG_URL "URL"
+
+struct igt_chamelium_v3 {
+ xmlrpc_env env;
+ xmlrpc_client *client;
+ char *url;
+
+ struct igt_list_head port_mapping;
+};
+
+/**
+ * chamelium_v3_port_mapping_alloc - Allocate a port mapping with some default values
+ *
+ * @port_mapping: port mapping to free. The caller must remove the element from the list.
+ */
+static struct chamelium_v3_port_mapping *chamelium_v3_port_mapping_alloc(void)
+{
+ struct chamelium_v3_port_mapping *port_mapping = malloc(sizeof(*port_mapping));
+
+ igt_assert(port_mapping);
+ port_mapping->connector_name = NULL;
+ port_mapping->mst_path = NULL;
+ port_mapping->port_id = 0;
+ port_mapping->parent_id = 0;
+ port_mapping->is_children = false;
+ return port_mapping;
+}
-void chamelium_v3_init(void)
+/**
+ * chamelium_v3_port_mapping_free - Free memory assiciated with a port mapping
+ *
+ * @port_mapping: port mapping to free. The caller must remove the element from the list.
+ */
+static void chamelium_v3_port_mapping_free(struct chamelium_v3_port_mapping *port_mapping)
{
- igt_info("Using chamelium v3\n");
+ if (port_mapping->connector_name)
+ free(port_mapping->connector_name);
+ if (port_mapping->mst_path)
+ free(port_mapping->mst_path);
+ free(port_mapping);
}
+
+/**
+ * chamelium_v3_init() - Initialize the RPC connexion with a chamelium
+ *
+ * @url: URL to connect to the chamelium
+ *
+ * Returns a igt_chamelium_v3 pointer, which must be freed by chamelium_v3_uninit.
+ */
+struct igt_chamelium_v3 *chamelium_v3_init(char *url)
+{
+ struct igt_chamelium_v3 *chamelium = malloc(sizeof(struct igt_chamelium_v3));
+ struct xmlrpc_clientparms clientparms;
+ struct xmlrpc_curl_xportparms curlparms;
+
+ if (!chamelium)
+ return NULL;
+
+ memset(chamelium, 0, sizeof(*chamelium));
+ memset(&clientparms, 0, sizeof(clientparms));
+ memset(&curlparms, 0, sizeof(curlparms));
+
+ /* curl's timeout is in milliseconds */
+ curlparms.timeout = 10 * 1000;
+
+ clientparms.transport = "curl";
+ clientparms.transportparmsP = &curlparms;
+ clientparms.transportparm_size = XMLRPC_CXPSIZE(timeout);
+
+ /* Setup the libxmlrpc context */
+ xmlrpc_env_init(&chamelium->env);
+ xmlrpc_client_setup_global_const(&chamelium->env);
+ xmlrpc_client_create(&chamelium->env, XMLRPC_CLIENT_NO_FLAGS, PACKAGE,
+ PACKAGE_VERSION, &clientparms, 0, &chamelium->client);
+ if (chamelium->env.fault_occurred) {
+ igt_debug("Failed to init xmlrpc: %s\n",
+ chamelium->env.fault_string);
+ goto error;
+ }
+
+ chamelium->url = strdup(url);
+ IGT_INIT_LIST_HEAD(&chamelium->port_mapping);
+
+ return chamelium;
+error:
+ chamelium_v3_uninit(chamelium);
+ return NULL;
+}
+
+/**
+ * chamelium_v3_init_from_config() - Initialize the RPC connexion with a chamelium from the config
+ * file
+ *
+ * Returns a igt_chamelium_v3 pointer, which must be freed by chamelium_v3_uninit.
+ */
+struct igt_chamelium_v3 *chamelium_v3_init_from_config(void)
+{
+ struct igt_chamelium_v3 *chamelium;
+ GError *error = NULL;
+ char *url;
+
+ if (!igt_key_file) {
+ igt_debug("No configuration file available for chamelium\n");
+ return NULL;
+ }
+
+ url = g_key_file_get_string(igt_key_file, CHAMELIUM_CONFIG_SECTION, CHAMELIUM_CONFIG_URL,
+ &error);
+ if (!url) {
+ igt_debug("Couldn't read chamelium URL from config file: %s\n", error->message);
+ return false;
+ }
+
+ chamelium = chamelium_v3_init(url);
+ free(url);
+ return chamelium;
+}
+
+/**
+ * chamelium_v3_uninit() - Free the resources used by a chamelium
+ *
+ * @chamelium: The Chamelium instance to free
+ *
+ * Frees the resources used by a connection to the chamelium that was set up
+ * with chamelium_rpc_init().
+ */
+void chamelium_v3_uninit(struct igt_chamelium_v3 *chamelium)
+{
+ struct chamelium_v3_port_mapping *port_mapping, *tmp_port_mapping;
+
+ /* Destroy any mapping we created to make sure we don't leak them */
+ igt_list_for_each_entry_safe(port_mapping, tmp_port_mapping, &chamelium->port_mapping,
+ link) {
+ chamelium_v3_port_mapping_free(port_mapping);
+ }
+ xmlrpc_client_destroy(chamelium->client);
+ xmlrpc_env_clean(&chamelium->env);
+ free(chamelium->url);
+ free(chamelium);
+}
+
diff --git a/lib/chamelium/v3/igt_chamelium.h b/lib/chamelium/v3/igt_chamelium.h
index 3195be2bc384..929d7d4b07b1 100644
--- a/lib/chamelium/v3/igt_chamelium.h
+++ b/lib/chamelium/v3/igt_chamelium.h
@@ -3,6 +3,43 @@
#ifndef V3_IGT_CHAMELIUM_H
#define V3_IGT_CHAMELIUM_H
-void chamelium_v3_init(void);
+#include <stdint.h>
+
+#include "igt_list.h"
+
+struct igt_chamelium_v3;
+typedef uint32_t chamelium_v3_port_id;
+
+/** struct chamelium_v3_port_mapping - Represent a mapping between a DRM connector and a port on
+ * the chamelium
+ *
+ * @port_id: Chamelium port ID.
+ * @connector_name: DRM connector name, used to identify the connector in DRM, mutually exclusive
+ * with @mst_path
+ * @mst_path: MST path property, used to identify the connector in DRM, mutually exclusive with
+ * @mst_path
+ * @is_children: Used to indicate that this chamelium port is a children and can't be plugged alone
+ * @parent_id: Used when @is_children is true to point to the correct parent in chamelium
+ * @link: Linked list structure
+ */
+struct chamelium_v3_port_mapping {
+ chamelium_v3_port_id port_id;
+
+ /* For normal DRM connector */
+ char *connector_name;
+
+ /* For MST connector */
+ char *mst_path;
+ bool is_children;
+ chamelium_v3_port_id parent_id;
+
+ /* Implementation details */
+ struct igt_list_head link;
+};
+
+struct igt_chamelium_v3 *chamelium_v3_init(char *url);
+struct igt_chamelium_v3 *chamelium_v3_init_from_config(void);
+
+void chamelium_v3_uninit(struct igt_chamelium_v3 *chamelium);
#endif //V3_IGT_CHAMELIUM_H
--
2.46.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t v3 3/5] lib/chamelium/v3: Add method to discover Chamelium ports
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 2/5] lib/chamelium/v3: Introduce initialization and cleanup of Chamelium-related structures Louis Chauvet
@ 2024-10-22 16:31 ` Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 4/5] lib/chamelium/v3: Implement method to retrieve Chamelium port names Louis Chauvet
` (3 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-22 16:31 UTC (permalink / raw)
To: igt-dev, ihf, markyacoub, thomas.petazzoni, jeremie.dautheribes,
20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Cc: Louis Chauvet
Since Chamelium v3 ports can change (recently added MST ports, for
example), they need to be discovered to prevent using an incorrect port.
This commit introduces the RPC calls GetSupportedPorts, IsMst, and
GetChildren to list all ports, check if a port is MST-capable, and fetch
the child ports of MST ports, respectively.
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
lib/chamelium/v3/igt_chamelium.c | 133 +++++++++++++++++++++++++++++++++++++++
lib/chamelium/v3/igt_chamelium.h | 6 ++
2 files changed, 139 insertions(+)
diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
index 663f51aaa7b0..1122ce102cde 100644
--- a/lib/chamelium/v3/igt_chamelium.c
+++ b/lib/chamelium/v3/igt_chamelium.c
@@ -149,3 +149,136 @@ void chamelium_v3_uninit(struct igt_chamelium_v3 *chamelium)
free(chamelium);
}
+/**
+ * __chamelium_rpc - Call a remote function on the chamelium
+ *
+ * @chamelium: Chamelium to call the function on
+ * @method_name: RPC endpoint name
+ * @format_str: RPC parameters description
+ * @...: RPC parameters
+ *
+ * Returns a xmlrpc_value that contains the call result.
+ */
+static xmlrpc_value *__chamelium_rpc(struct igt_chamelium_v3 *chamelium,
+ const char *method_name,
+ const char *format_str,
+ ...)
+{
+ xmlrpc_value *res;
+ va_list va_args;
+
+ if (chamelium->env.fault_occurred) {
+ xmlrpc_env_clean(&chamelium->env);
+ xmlrpc_env_init(&chamelium->env);
+ }
+ va_start(va_args, format_str);
+ xmlrpc_client_call2f_va(&chamelium->env, chamelium->client,
+ chamelium->url, method_name, format_str, &res,
+ va_args);
+ va_end(va_args);
+ igt_assert_f(!chamelium->env.fault_occurred,
+ "Chamelium RPC call[%s] failed: %s\n", method_name,
+ chamelium->env.fault_string);
+ return res;
+}
+
+/*
+ * For the RPC calls, please refer to the python code [1] for documentation.
+ *
+ * [1]: https://chromium.googlesource.com/chromiumos/platform/chameleon/+/refs/heads/main/v3/chameleond/v3.py
+ */
+
+/**
+ * chamelium_v3_get_supported_ports - Get the list of ports on the chamelium
+ *
+ * @chamelium: Chamelium to get the ports from
+ * @port_ids: Out pointer for the list of port ids
+ *
+ * Returns the number of element stored in @port_ids. The caller must free this pointer when not
+ * used anymore.
+ */
+int chamelium_v3_get_supported_ports(struct igt_chamelium_v3 *chamelium,
+ chamelium_v3_port_id **port_ids)
+{
+ xmlrpc_value *res, *res_port;
+ int port_count, i;
+
+ igt_assert(port_ids);
+
+ igt_debug("RPC GetSupportedPorts()\n");
+ res = __chamelium_rpc(chamelium, "GetSupportedPorts", "()");
+
+ port_count = xmlrpc_array_size(&chamelium->env, res);
+ *port_ids = calloc(port_count, sizeof(**port_ids));
+
+ for (i = 0; i < port_count; i++) {
+ xmlrpc_array_read_item(&chamelium->env, res, i, &res_port);
+ xmlrpc_read_int(&chamelium->env, res_port, (int *)&(*port_ids)[i]);
+ xmlrpc_DECREF(res_port);
+ }
+ xmlrpc_DECREF(res);
+
+ return port_count;
+}
+
+/**
+ * chamelium_v3_get_supported_ports - Get the list of children port for a specific port on the
+ * chamelium
+ *
+ * @chamelium: Chamelium to get the ports from
+ * @port_id: Parent port id to get the children port from
+ * @port_ids: Out pointer for the list of port ids
+ *
+ * MST ports on the chamelium have children ports that can be plugged independently, but are always
+ * connected with a parent connector.
+ *
+ * Returns the number of element stored in @port_ids. The caller must free this pointer when not
+ * used anymore.
+ */
+int chamelium_v3_get_children(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id,
+ chamelium_v3_port_id **port_ids)
+{
+ xmlrpc_value *res, *res_port;
+ int port_count, i;
+
+ igt_debug("RPC GetChildren(%d)\n", port_id);
+ res = __chamelium_rpc(chamelium, "GetChildren", "(i)", port_id);
+
+ port_count = xmlrpc_array_size(&chamelium->env, res);
+ *port_ids = calloc(port_count, sizeof(**port_ids));
+
+ for (i = 0; i < port_count; i++) {
+ xmlrpc_array_read_item(&chamelium->env, res, i, &res_port);
+ xmlrpc_read_int(&chamelium->env, res_port, (int *)&(*port_ids)[i]);
+ xmlrpc_DECREF(res_port);
+ }
+ xmlrpc_DECREF(res);
+
+ return port_count;
+}
+
+/**
+ * chamelium_v3_is_mst - Get the MST support for a specific port
+ *
+ * @chamelium: Chamelium to get the ports from
+ * @port_id: Port to get the support from
+ *
+ * Not all ports on the chamelium support MST. This functions allows checking if a specific port
+ * supports MST.
+ *
+ * Returns true if the @port_id supports MST.
+ */
+bool chamelium_v3_is_mst(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id)
+{
+ xmlrpc_value *res;
+ xmlrpc_bool is_mst;
+
+ igt_debug("RPC IsMst(%d)\n", port_id);
+ res = __chamelium_rpc(chamelium, "IsMst", "(i)", port_id);
+
+ xmlrpc_read_bool(&chamelium->env, res, &is_mst);
+
+ xmlrpc_DECREF(res);
+
+ return is_mst;
+}
diff --git a/lib/chamelium/v3/igt_chamelium.h b/lib/chamelium/v3/igt_chamelium.h
index 929d7d4b07b1..af525806865e 100644
--- a/lib/chamelium/v3/igt_chamelium.h
+++ b/lib/chamelium/v3/igt_chamelium.h
@@ -42,4 +42,10 @@ struct igt_chamelium_v3 *chamelium_v3_init_from_config(void);
void chamelium_v3_uninit(struct igt_chamelium_v3 *chamelium);
+int chamelium_v3_get_supported_ports(struct igt_chamelium_v3 *chamelium,
+ chamelium_v3_port_id **port_ids);
+int chamelium_v3_get_children(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id,
+ chamelium_v3_port_id **port_ids);
+bool chamelium_v3_is_mst(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id);
+
#endif //V3_IGT_CHAMELIUM_H
--
2.46.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t v3 4/5] lib/chamelium/v3: Implement method to retrieve Chamelium port names
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
` (2 preceding siblings ...)
2024-10-22 16:31 ` [PATCH i-g-t v3 3/5] lib/chamelium/v3: Add method to discover Chamelium ports Louis Chauvet
@ 2024-10-22 16:31 ` Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 5/5] tests/chamelium/v3: Implement a basic Chamelium v3 accessibility test Louis Chauvet
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-22 16:31 UTC (permalink / raw)
To: igt-dev, ihf, markyacoub, thomas.petazzoni, jeremie.dautheribes,
20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Cc: Louis Chauvet
Chamelium ports have descriptive names associated with them. This commit
introduces an RPC call to fetch these names, facilitating easier debugging
and better understanding of the port configuration.
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
lib/chamelium/v3/igt_chamelium.c | 25 +++++++++++++++++++++++++
lib/chamelium/v3/igt_chamelium.h | 1 +
2 files changed, 26 insertions(+)
diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
index 1122ce102cde..8fad88e74d66 100644
--- a/lib/chamelium/v3/igt_chamelium.c
+++ b/lib/chamelium/v3/igt_chamelium.c
@@ -282,3 +282,28 @@ bool chamelium_v3_is_mst(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_i
return is_mst;
}
+
+/**
+ * chamelium_v3_get_port_name - Get the port name from its id
+ *
+ * @chamelium: Chamelium to get the ports from
+ * @port_id: Port to get the name
+ *
+ * Returns a string containing the port name for @port_id. The caller must free this pointer when
+ * not used anymore.
+ */
+char *chamelium_v3_get_port_name(struct igt_chamelium_v3 *chamelium,
+ chamelium_v3_port_id port_id)
+{
+ xmlrpc_value *res;
+ char *port_name;
+
+ igt_debug("RPC GetPortName(%d)\n", port_id);
+ res = __chamelium_rpc(chamelium, "GetPortName", "(i)", port_id);
+
+ xmlrpc_read_string(&chamelium->env, res, (const char **)&port_name);
+
+ xmlrpc_DECREF(res);
+
+ return port_name;
+}
diff --git a/lib/chamelium/v3/igt_chamelium.h b/lib/chamelium/v3/igt_chamelium.h
index af525806865e..71351e579001 100644
--- a/lib/chamelium/v3/igt_chamelium.h
+++ b/lib/chamelium/v3/igt_chamelium.h
@@ -47,5 +47,6 @@ int chamelium_v3_get_supported_ports(struct igt_chamelium_v3 *chamelium,
int chamelium_v3_get_children(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id,
chamelium_v3_port_id **port_ids);
bool chamelium_v3_is_mst(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id);
+char *chamelium_v3_get_port_name(struct igt_chamelium_v3 *chamelium, chamelium_v3_port_id port_id);
#endif //V3_IGT_CHAMELIUM_H
--
2.46.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH i-g-t v3 5/5] tests/chamelium/v3: Implement a basic Chamelium v3 accessibility test
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
` (3 preceding siblings ...)
2024-10-22 16:31 ` [PATCH i-g-t v3 4/5] lib/chamelium/v3: Implement method to retrieve Chamelium port names Louis Chauvet
@ 2024-10-22 16:31 ` Louis Chauvet
2024-10-22 18:17 ` ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3 Patchwork
2024-11-12 9:41 ` [PATCH i-g-t v3 0/5] " Vignesh Raman
6 siblings, 0 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-22 16:31 UTC (permalink / raw)
To: igt-dev, ihf, markyacoub, thomas.petazzoni, jeremie.dautheribes,
20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Cc: Louis Chauvet
Utilizing the RPC calls introduced earlier, this commit adds a simple test
to verify if the Chamelium v3 device is accessible.
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
---
tests/chamelium/v3/kms_chamelium_v3_basic.c | 30 +++++++++++++++++++++++++++++
tests/meson.build | 1 +
2 files changed, 31 insertions(+)
diff --git a/tests/chamelium/v3/kms_chamelium_v3_basic.c b/tests/chamelium/v3/kms_chamelium_v3_basic.c
new file mode 100644
index 000000000000..4d48e68e2936
--- /dev/null
+++ b/tests/chamelium/v3/kms_chamelium_v3_basic.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: MIT
+
+#include <igt.h>
+#include "chamelium/v3/igt_chamelium.h"
+
+igt_main
+{
+ struct igt_chamelium_v3 *chamelium;
+
+ igt_describe("Test if the chamelium can list all the ports.");
+ igt_subtest("chamelium-list-ports") {
+ chamelium_v3_port_id *ports;
+ int port_count;
+
+ chamelium = chamelium_v3_init_from_config();
+
+ port_count = chamelium_v3_get_supported_ports(chamelium, &ports);
+
+ for (int i = 0; i < port_count; i++) {
+ char *name = chamelium_v3_get_port_name(chamelium, ports[i]);
+
+ igt_info("Port %d: name: %s\n", ports[i], name);
+ free(name);
+ }
+
+ free(ports);
+
+ chamelium_v3_uninit(chamelium);
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index 861101c2534e..9ddf906723e8 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -341,6 +341,7 @@ chamelium_v2_progs = [
]
chamelium_v3_progs = [
+ 'kms_chamelium_v3_basic',
]
test_deps = [ igt_deps ]
--
2.46.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
` (4 preceding siblings ...)
2024-10-22 16:31 ` [PATCH i-g-t v3 5/5] tests/chamelium/v3: Implement a basic Chamelium v3 accessibility test Louis Chauvet
@ 2024-10-22 18:17 ` Patchwork
2024-10-23 7:52 ` Louis Chauvet
2024-11-12 9:41 ` [PATCH i-g-t v3 0/5] " Vignesh Raman
6 siblings, 1 reply; 15+ messages in thread
From: Patchwork @ 2024-10-22 18:17 UTC (permalink / raw)
To: Louis Chauvet; +Cc: igt-dev
== Series Details ==
Series: tests/chamelium: Integrate the chamelium v3
URL : https://patchwork.freedesktop.org/series/140328/
State : failure
== Summary ==
Applying: lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
Patch failed at 0001 lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
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] 15+ messages in thread
* Re: ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3
2024-10-22 18:17 ` ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3 Patchwork
@ 2024-10-23 7:52 ` Louis Chauvet
0 siblings, 0 replies; 15+ messages in thread
From: Louis Chauvet @ 2024-10-23 7:52 UTC (permalink / raw)
To: igt-dev
On 22/10/24 - 18:17, Patchwork wrote:
> == Series Details ==
>
> Series: tests/chamelium: Integrate the chamelium v3
> URL : https://patchwork.freedesktop.org/series/140328/
> State : failure
>
> == Summary ==
>
> Applying: lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
> Patch failed at 0001 lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
> 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 it depends on previous series:
- 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513@bootlin.com
- 20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6@bootlin.com
- 20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9@bootlin.com
Thanks,
Louis Chauvet
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
2024-10-22 16:31 ` [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper Louis Chauvet
@ 2024-11-12 9:37 ` Vignesh Raman
2025-03-12 10:11 ` [i-g-t, v3, " Joshi, Kunal1
1 sibling, 0 replies; 15+ messages in thread
From: Vignesh Raman @ 2024-11-12 9:37 UTC (permalink / raw)
To: Louis Chauvet, igt-dev, ihf, markyacoub, thomas.petazzoni,
jeremie.dautheribes, 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Hi Louis,
On 22/10/24 22:01, Louis Chauvet wrote:
> Adds a build option to enable building the Chamelium v3 wrapper.
>
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
> lib/chamelium/v3/igt_chamelium.c | 9 +++++++++
> lib/chamelium/v3/igt_chamelium.h | 8 ++++++++
> lib/igt_kms.c | 8 ++++++++
> lib/meson.build | 12 +++++++++++-
> lib/tests/meson.build | 4 ++++
> meson.build | 15 ++++++++++++++-
> meson_options.txt | 4 ++++
> tests/meson.build | 25 +++++++++++++++++++++++++
> 8 files changed, 83 insertions(+), 2 deletions(-)
>
> diff --git a/lib/chamelium/v3/igt_chamelium.c b/lib/chamelium/v3/igt_chamelium.c
> new file mode 100644
> index 000000000000..152242998013
> --- /dev/null
> +++ b/lib/chamelium/v3/igt_chamelium.c
> @@ -0,0 +1,9 @@
> +// SPDX-License-Identifier: MIT
> +
> +#include <igt_core.h>
> +#include "igt_chamelium.h"
> +
> +void chamelium_v3_init(void)
> +{
> + igt_info("Using chamelium v3\n");
> +}
> diff --git a/lib/chamelium/v3/igt_chamelium.h b/lib/chamelium/v3/igt_chamelium.h
> new file mode 100644
> index 000000000000..3195be2bc384
> --- /dev/null
> +++ b/lib/chamelium/v3/igt_chamelium.h
> @@ -0,0 +1,8 @@
> +/* SPDX-License-Identifier: MIT */
> +
> +#ifndef V3_IGT_CHAMELIUM_H
> +#define V3_IGT_CHAMELIUM_H
> +
> +void chamelium_v3_init(void);
> +
> +#endif //V3_IGT_CHAMELIUM_H
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 56003ceaf9dc..4d9df90e771f 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -2908,7 +2908,14 @@ void igt_display_require(igt_display_t *display, int drm_fd)
> if (!resources)
> goto out;
>
> +/*
> + * FIXME: Dirty hack to avoid those lines when chamelium v3 is used
> + *
> + * Must be replaced with a configuration file information, so the end user can choose if the
> + * chamelium must be connected or not.
> + */
> #ifdef HAVE_CHAMELIUM_V2
> +#ifndef HAVE_CHAMELIUM_V3
> {
> struct chamelium *chamelium;
>
> @@ -2923,6 +2930,7 @@ void igt_display_require(igt_display_t *display, int drm_fd)
> chamelium_deinit_rpc_only(chamelium);
> }
> }
> +#endif
> #endif
>
> igt_require_f(resources->count_crtcs <= IGT_MAX_PIPES,
> diff --git a/lib/meson.build b/lib/meson.build
> index 5769f96fbdc1..8bcbd58bc0e6 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -195,7 +195,6 @@ if chamelium_v2.found()
> 'chamelium/v2/igt_chamelium.c',
> 'chamelium/v2/igt_chamelium_stream.c'
> ]
> - lib_sources += 'monitor_edids/monitor_edids_helper.c'
> endif
>
> if build_xe_eudebug
> @@ -203,6 +202,17 @@ if build_xe_eudebug
> lib_sources += 'xe/xe_eudebug.c'
> endif
>
> +if chamelium_v3.found()
> + lib_deps += chamelium_v3
> + lib_sources += [
> + 'chamelium/v3/igt_chamelium.c',
> + ]
> +endif
> +
> +if chamelium_v2.found() or chamelium_v3.found()
> + lib_sources += 'monitor_edids/monitor_edids_helper.c'
> +endif
> +
> if libprocps.found()
> lib_deps += libprocps
> else
> diff --git a/lib/tests/meson.build b/lib/tests/meson.build
> index fa7741b7be61..8a96cd73ee42 100644
> --- a/lib/tests/meson.build
> +++ b/lib/tests/meson.build
> @@ -41,6 +41,10 @@ if chamelium_v2.found()
> lib_tests += 'igt_audio'
> endif
>
> +if chamelium_v3.found()
> + lib_deps += chamelium_v3
> +endif
> +
> foreach lib_test : lib_tests
> exec = executable(lib_test, lib_test + '.c', install : false,
> dependencies : igt_deps)
> diff --git a/meson.build b/meson.build
> index b4b1026acb4c..d5d7b325eacd 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -87,6 +87,7 @@ foreach cc_arg : cc_args
> endforeach
>
> build_chamelium_v2 = get_option('chamelium_v2')
> +build_chamelium_v3 = get_option('chamelium_v3')
> build_docs = get_option('docs')
> build_tests = not get_option('tests').disabled()
> build_xe = not get_option('xe_driver').disabled()
> @@ -174,7 +175,7 @@ if not xmlrpc.found() and xmlrpc_cmd.found()
> endif
> endif
>
> -if build_chamelium_v2.enabled() and not (xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found())
> +if (build_chamelium_v2.enabled() or build_chamelium_v3.enabled()) and not (xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found())
> error('Chamelium build forced and required dependency xmlrpc not found')
> endif
>
> @@ -197,6 +198,18 @@ endif
>
> build_info += 'Build Chamelium v2 test: @0@'.format(chamelium_v2.found())
We need to add this for Chamelium v3 test also?
>
> +
> +if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and libcurl.found()
> + config.set('HAVE_CHAMELIUM_V3', 1)
> + chamelium_v3 = declare_dependency(dependencies : [
> + xmlrpc,
> + xmlrpc_util,
> + xmlrpc_client,
> + ])
> +else
> + chamelium_v3 = disabler()
> +endif
> +
> pthreads = dependency('threads')
> math = cc.find_library('m')
> realtime = cc.find_library('rt')
> diff --git a/meson_options.txt b/meson_options.txt
> index 3a6edefba349..ebdb9976da1a 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -12,6 +12,10 @@ option('chamelium_v2',
> type : 'feature',
> description : 'Build Chamelium v2 test')
>
> +option('chamelium_v3',
> + type : 'feature',
> + description : 'Build Chamelium v3 tests')
> +
> option('valgrind',
> type : 'feature',
> description : 'Build with support for valgrind annotations')
> diff --git a/tests/meson.build b/tests/meson.build
> index 4eebe1838979..861101c2534e 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -340,6 +340,9 @@ chamelium_v2_progs = [
> 'kms_chamelium_hpd',
> ]
>
> +chamelium_v3_progs = [
> +]
> +
> test_deps = [ igt_deps ]
>
> if libdrm_nouveau.found()
> @@ -457,6 +460,28 @@ if chamelium_v2.found()
> test_deps += chamelium_v2
> endif
>
> +if chamelium_v3.found()
> + foreach prog : chamelium_v3_progs
> + testexe = executable(prog,
> + [join_paths('chamelium', 'v3', prog + '.c')],
> + dependencies : test_deps,
> + install_dir : libexecdir,
> + install_rpath : libexecdir_rpathdir,
> + install : true)
> + test_list += prog
> + test_executables += testexe
> + name = prog.split('/').get(-1)
> + if not meson.is_cross_build()
> + testlist_files += custom_target(name + '.testlist',
> + build_by_default : true,
> + command : [testexe, '--show-testlist'],
> + capture : true,
> + output : name + '.testlist')
> + endif
> + endforeach
> + test_deps += chamelium_v3
> +endif
> +
> subdir('amdgpu')
>
> subdir('msm')
>
Regards,
Vignesh
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
` (5 preceding siblings ...)
2024-10-22 18:17 ` ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3 Patchwork
@ 2024-11-12 9:41 ` Vignesh Raman
6 siblings, 0 replies; 15+ messages in thread
From: Vignesh Raman @ 2024-11-12 9:41 UTC (permalink / raw)
To: Louis Chauvet, igt-dev, ihf, markyacoub, thomas.petazzoni,
jeremie.dautheribes, 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Hi Louis,
On 22/10/24 22:01, Louis Chauvet wrote:
> Hi all,
>
> This patch series introduces a new wrapper for the Chameleon v3 board, a
> testing tool used primarily for Chromebooks, but also by community members
> to increase test coverage of graphic devices. The Chameleon v3 is an
> upgrade from its predecessor, with the ability to emulate 2 HDMI and 2
> DisplayPort devices, including MST devices.
>
> The board can read and analyze any stream on the DisplayPort and HDMI
> cables, and even take captures, making it an ideal tool for testing
> hardware, driver, and user space behavior in specific situations, such as
> screen hotplugging and multiple MST screens. However, the changes between
> the v2 and v3, such as the addition of MST support and the removal of CRC
> for screen captures, would require significant modifications to the
> existing tests and wrappers.
>
> To avoid this complexity and ensure that the Chameleon v3 is fully
> supported and the v2 is not broken, I wrote a new wrapper with
> simplicity and ease of use in mind. The Chameleon v3 wrapper should only
> manage the Chameleon itself, without the need for DRM displays, EDID
> caching/modifications, or state machines. This approach will make it
> easier for developers to use the Chameleon v3 and contribute to its
> development.
>
> This series depends on:
> -https://lore.kernel.org/igt-dev/20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513@bootlin.com
> -https://lore.kernel.org/igt-dev/20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6@bootlin.com
> -https://lore.kernel.org/igt-dev/20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9@bootlin.com
I have tested this series and the dependent patches,
https://gitlab.freedesktop.org/vigneshraman/igt-gpu-tools/-/commits/test-chamelium-v3-fix/?ref_type=heads
kms_chamelium_v3_basic test passes in drm-ci,
https://gitlab.freedesktop.org/vigneshraman/linux/-/jobs/66445667
Regards,
Vignesh
>
> In addition, I will send more series to:
> - add more methods to the chamelium wrapper
> - add new options in the configuration file to configure the chamelium
> - add tests for the cv3
>
> ---
> Changes in v3:
> - Rebased and splitted the series
> - Fixed few build issues
> - Link to v2: https://lore.kernel.org/r/20240709-dev-remove-static-ports-v2-0-5adfc6985778@bootlin.com
>
> Changes in v2:
> - Mainly splitting and cleaning work since the RFC,
> - Link to v1: https://lore.kernel.org/r/20240605-dev-remove-static-ports-v1-0-665f25b7a4db@bootlin.com
>
> ---
> Louis Chauvet (5):
> lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
> lib/chamelium/v3: Introduce initialization and cleanup of Chamelium-related structures
> lib/chamelium/v3: Add method to discover Chamelium ports
> lib/chamelium/v3: Implement method to retrieve Chamelium port names
> tests/chamelium/v3: Implement a basic Chamelium v3 accessibility test
>
> lib/chamelium/v3/igt_chamelium.c | 309 ++++++++++++++++++++++++++++
> lib/chamelium/v3/igt_chamelium.h | 52 +++++
> lib/igt_kms.c | 8 +
> lib/meson.build | 12 +-
> lib/tests/meson.build | 4 +
> meson.build | 15 +-
> meson_options.txt | 4 +
> tests/chamelium/v3/kms_chamelium_v3_basic.c | 30 +++
> tests/meson.build | 26 +++
> 9 files changed, 458 insertions(+), 2 deletions(-)
> ---
> base-commit: 9b8c0f6da8898f760bfaa2113455eb84b68a69f4
> change-id: 20240522-dev-remove-static-ports-9382ffbbf146
> 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
> prerequisite-message-id: 20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9@bootlin.com
> prerequisite-patch-id: 4ac6bf11d25e80e99d5607d4864c3c7b4273dde3
> prerequisite-patch-id: 2246b4289eca0b8e8b02519051af7564b0875a2a
> prerequisite-patch-id: 394057bc39308265a03e026ac924f88d3d933d49
> prerequisite-patch-id: ad1f0838e81fa620013313316afd35a3d5c146fa
>
> Best regards,
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [i-g-t, v3, 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper
2024-10-22 16:31 ` [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper Louis Chauvet
2024-11-12 9:37 ` Vignesh Raman
@ 2025-03-12 10:11 ` Joshi, Kunal1
1 sibling, 0 replies; 15+ messages in thread
From: Joshi, Kunal1 @ 2025-03-12 10:11 UTC (permalink / raw)
To: Louis Chauvet, igt-dev, ihf, markyacoub, thomas.petazzoni,
jeremie.dautheribes, 20241022-b4-cv3-01-igt-kms-v2-0-8f654694b513,
20241022-b4-cv3-02-monitor-edids-v2-0-7634786c21e6,
20241022-b4-cv3-03-cv2-split-v1-0-9f7cc8591ff9
Hello,
On 22-10-2024 22:01, Louis Chauvet wrote:
> Adds a build option to enable building the Chamelium v3 wrapper.
>
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
> lib/chamelium/v3/igt_chamelium.c | 9 +++++++++
> lib/chamelium/v3/igt_chamelium.h | 8 ++++++++
> lib/igt_kms.c | 8 ++++++++
> lib/meson.build | 12 +++++++++++-
> lib/tests/meson.build | 4 ++++
> meson.build | 15 ++++++++++++++-
> meson_options.txt | 4 ++++
> tests/meson.build | 25 +++++++++++++++++++++++++
> 8 files changed, 83 insertions(+), 2 deletions(-)
>
Can you please sent all below series together, need to test changes once
before reviewing.
[1] [https://patchwork.freedesktop.org/series/137915/]
[2] [https://patchwork.freedesktop.org/series/137925/]
[3] [https://patchwork.freedesktop.org/series/140319/]
[4] [https://patchwork.freedesktop.org/series/140328/]
Thanks and Regards
Kunal Joshi
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-03-12 10:11 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 16:31 [PATCH i-g-t v3 0/5] tests/chamelium: Integrate the chamelium v3 Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 1/5] lib/chamelium/v3: Introduce the foundation for the Chamelium v3 wrapper Louis Chauvet
2024-11-12 9:37 ` Vignesh Raman
2025-03-12 10:11 ` [i-g-t, v3, " Joshi, Kunal1
2024-10-22 16:31 ` [PATCH i-g-t v3 2/5] lib/chamelium/v3: Introduce initialization and cleanup of Chamelium-related structures Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 3/5] lib/chamelium/v3: Add method to discover Chamelium ports Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 4/5] lib/chamelium/v3: Implement method to retrieve Chamelium port names Louis Chauvet
2024-10-22 16:31 ` [PATCH i-g-t v3 5/5] tests/chamelium/v3: Implement a basic Chamelium v3 accessibility test Louis Chauvet
2024-10-22 18:17 ` ✗ Fi.CI.BUILD: failure for tests/chamelium: Integrate the chamelium v3 Patchwork
2024-10-23 7:52 ` Louis Chauvet
2024-11-12 9:41 ` [PATCH i-g-t v3 0/5] " Vignesh Raman
-- strict thread matches above, loose matches on Subject: below --
2024-07-09 15:34 [PATCH i-g-t v2 00/39] " Louis Chauvet
2024-07-09 16:16 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-07-10 9:48 ` Louis Chauvet
2024-08-26 9:30 ` Vignesh Raman
2024-06-05 14:30 [PATCH i-g-t RFC 00/13] " Louis Chauvet
2024-06-05 16:36 ` ✗ Fi.CI.BUILD: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox