lib/igt_kms: generate an EDID suitable for DP audio
PATCH 1/1 lib/igt_kms: generate an EDID suitable for DP audio
Prior to this commit, we were using the Chamelium's default EDID for DP audio. This relies on the fact that this EDID supports audio and has correct audio paremeters for our testing.
Generating our own EDID is less error-prone and will allow us to test different audio parameters.
--- lib/igt_kms.c | 44 +++++++++++++++++++++++++++++++++++-------- lib/igt_kms.h | 2 ++ tests/kms_chamelium.c | 7 +++++-- 3 files changed, 43 insertions(+), 10 deletions(-)
lib/igt_kms.c +36 -8
@@ -183,9 +183,9 @@ const unsigned char *igt_kms_get_alt_edid(void) }static void -generate_hdmi_audio_edid (unsigned char raw_edid[static HDMI_AUDIO_EDID_LENGTH ], -struct cea_sad *sad, -struct cea_speaker_alloc *speaker_alloc) +generate_audio_edid (unsigned char raw_edid[static HDMI_AUDIO_EDID_LENGTH ], +bool with_vsd,struct cea_sad *sad, +struct cea_speaker_alloc *speaker_alloc) {struct edid *edid;struct edid_ext *edid_ext;
@@ -210,10 +210,12 @@ generate_hdmi_audio_edid(unsigned char raw_edid[static HDMI_AUDIO_EDID_LENGTH], cea_data_size +=edid_cea_data_block_set_sad (block, sad,1 );/* A Vendor Specific Data block is needed for HDMI audio */ - block = (struct edid_cea_data_block *) &cea_data[cea_data_size]; - vsd =cea_vsd_get_hdmi_default (&vsd_size); - cea_data_size +=edid_cea_data_block_set_vsd (block, vsd, - vsd_size); +if (with_vsd) { + block = (struct edid_cea_data_block *) &cea_data[cea_data_size]; + vsd =cea_vsd_get_hdmi_default (&vsd_size); + cea_data_size +=edid_cea_data_block_set_vsd (block, vsd, + vsd_size); + }/* Speaker Allocation Data block */ block = (struct edid_cea_data_block *) &cea_data[cea_data_size];
@@ -250,7 +252,33 @@ const unsigned char *igt_kms_get_hdmi_audio_edid(void)/* Initialize the Speaker Allocation Data */ speaker_alloc.speakers =CEA_SPEAKER_FRONT_LEFT_RIGHT_CENTER ; -generate_hdmi_audio_edid (raw_edid, &sad, &speaker_alloc); +generate_audio_edid (raw_edid, true, &sad, &speaker_alloc); + +return raw_edid; +} + +const unsigned char *igt_kms_get_dp_audio_edid (void ) +{ +int channels; +uint8_t sampling_rates, sample_sizes; +static unsigned char raw_edid[DP_AUDIO_EDID_LENGTH ] = {0 }; +struct cea_sad sad = {0 }; +struct cea_speaker_alloc speaker_alloc = {0 }; + +/* Initialize the Short Audio Descriptor for PCM */ + channels =2 ; + sampling_rates =CEA_SAD_SAMPLING_RATE_32KHZ | +CEA_SAD_SAMPLING_RATE_44KHZ | +CEA_SAD_SAMPLING_RATE_48KHZ ; + sample_sizes =CEA_SAD_SAMPLE_SIZE_16 | +CEA_SAD_SAMPLE_SIZE_20 | +CEA_SAD_SAMPLE_SIZE_24 ; +cea_sad_init_pcm (&sad, channels, sampling_rates, sample_sizes); + +/* Initialize the Speaker Allocation Data */ + speaker_alloc.speakers =CEA_SPEAKER_FRONT_LEFT_RIGHT_CENTER ; + +generate_audio_edid (raw_edid, false, &sad, &speaker_alloc);return raw_edid; }
lib/igt_kms.h +2 -0
@@ -758,9 +758,11 @@ struct cea_speaker_alloc;#define EDID_LENGTH 128#define HDMI_AUDIO_EDID_LENGTH (2 * EDID_LENGTH) +#define DP_AUDIO_EDID_LENGTH (2 * EDID_LENGTH)const unsigned char *igt_kms_get_base_edid (void );const unsigned char *igt_kms_get_alt_edid (void );const unsigned char *igt_kms_get_hdmi_audio_edid (void ); +const unsigned char *igt_kms_get_dp_audio_edid (void );struct udev_monitor *igt_watch_hotplug (void ); bool igt_hotplug_detected(struct udev_monitor *mon,
tests/kms_chamelium.c +5 -2
@@ -39,6 +39,7 @@ enum test_edid {TEST_EDID_BASE ,TEST_EDID_ALT ,TEST_EDID_HDMI_AUDIO , + TEST_EDID_DP_AUDIO, }; typedef struct {
@@ -49,7 +50,7 @@ typedef struct {int drm_fd; -int edids[4 ]; +int edids[5 ]; } data_t;#define HOTPLUG_TIMEOUT 20/* seconds */
@@ -1997,6 +1998,8 @@ static const unsigned char *get_edid(enum test_edid edid)return igt_kms_get_alt_edid ();case TEST_EDID_HDMI_AUDIO :return igt_kms_get_hdmi_audio_edid (); +case TEST_EDID_DP_AUDIO : +return igt_kms_get_dp_audio_edid (); }assert (0 );/* unreachable */ }
@@ -2113,7 +2116,7 @@ igt_main* Use the Chamelium's default EDID for DP audio. */ connector_subtest("dp-audio", DisplayPort)test_display_audio (&data, port,"HDMI" , -TEST_EDID_CHAMELIUM_DEFAULT ); +TEST_EDID_DP_AUDIO ); } igt_subtest_group {
--
2.21.0
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: generate an EDID suitable for DP audio
== Series Details ==
== Series Details ==
Series: lib/igt_kms: generate an EDID suitable for DP audio
URL : https://patchwork.freedesktop.org/series/61579/
State : success
== Summary ==
CI Bug Log - changes from IGT_5037 -> IGTPW_3102
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/61579/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3102 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_reloc@basic-cpu-gtt:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/fi-icl-u3/igt@[email protected]
* igt@gem_mmap_gtt@basic:
- fi-glk-dsi: [PASS][3] -> [INCOMPLETE][4] ([fdo#103359] / [k.org#198133])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/fi-glk-dsi/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/fi-glk-dsi/igt@[email protected]
* igt@i915_selftest@live_hangcheck:
- fi-icl-y: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713] / [fdo#108569])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/fi-icl-y/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/fi-icl-y/igt@i915_selftest@live_hangcheck.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (52 -> 45)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* IGT: IGT_5037 -> IGTPW_3102
CI_DRM_6185: a7fbba50ee7d0b89b18afb39e2d5f187501a0f0e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3102: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/
IGT_5037: a98c9cd50aa48933217ca41055279ccb1680d25b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for lib/igt_kms: generate an EDID suitable for DP audio
In reply to Simon Ser== Series Details ==
== Series Details ==
Series: lib/igt_kms: generate an EDID suitable for DP audio
URL : https://patchwork.freedesktop.org/series/61579/
State : success
== Summary ==
CI Bug Log - changes from IGT_5037_full -> IGTPW_3102_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/61579/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3102_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_nop@basic-parallel:
- shard-hsw: [PASS][1] -> [INCOMPLETE][2] ([fdo#103540]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-hsw5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-hsw5/igt@[email protected]
* igt@gem_mmap_gtt@forked-medium-copy-xy:
- shard-iclb: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#109100])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb5/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-64x64-sliding:
- shard-kbl: [PASS][5] -> [FAIL][6] ([fdo#103232])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-kbl3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-kbl7/igt@[email protected]
- shard-apl: [PASS][7] -> [FAIL][8] ([fdo#103232])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-apl2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-apl3/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
- shard-iclb: [PASS][9] -> [FAIL][10] ([fdo#103167]) +6 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109441]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
* igt@kms_setmode@basic:
- shard-kbl: [PASS][13] -> [FAIL][14] ([fdo#99912])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-kbl1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-kbl1/igt@[email protected]
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: [PASS][15] -> [DMESG-WARN][16] ([fdo#108566]) +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-apl3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-apl3/igt@[email protected]
#### Possible fixes ####
* {igt@gem_ctx_param@vm}:
- shard-hsw: [DMESG-WARN][17] ([fdo#110836]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-hsw2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-hsw2/igt@[email protected]
* igt@gem_tiled_swapping@non-threaded:
- shard-iclb: [FAIL][19] ([fdo#108686]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb4/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb4/igt@[email protected]
* igt@kms_atomic_interruptible@legacy-cursor:
- shard-snb: [SKIP][21] ([fdo#109271]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-snb5/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-snb6/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render:
- shard-iclb: [FAIL][23] ([fdo#103167]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [DMESG-WARN][25] ([fdo#108566]) -> [PASS][26] +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-apl4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-apl4/igt@[email protected]
* igt@kms_psr@psr2_primary_mmap_gtt:
- shard-iclb: [SKIP][27] ([fdo#109441]) -> [PASS][28] +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb8/igt@kms_psr@psr2_primary_mmap_gtt.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html
* igt@perf@blocking:
- shard-iclb: [FAIL][29] ([fdo#110728]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb6/igt@[email protected]
#### Warnings ####
* igt@gem_mmap_gtt@forked-big-copy-odd:
- shard-iclb: [INCOMPLETE][31] ([fdo#107713] / [fdo#109100]) -> [TIMEOUT][32] ([fdo#109673])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5037/shard-iclb3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/shard-iclb6/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#110836]: https://bugs.freedesktop.org/show_bug.cgi?id=110836
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 6)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_5037 -> IGTPW_3102
CI_DRM_6185: a7fbba50ee7d0b89b18afb39e2d5f187501a0f0e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3102: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/
IGT_5037: a98c9cd50aa48933217ca41055279ccb1680d25b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3102/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev