* [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_port_get_video_params
@ 2019-07-03 7:57 Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: add chamelium_supports_get_video_params Simon Ser
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Simon Ser @ 2019-07-03 7:57 UTC (permalink / raw)
To: igt-dev; +Cc: martin.peres
This new XML-RPC call allows to retrieve mode information from the Chamelium.
We can use it to check the mode we've chosen has been applied correctly.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_chamelium.c | 58 +++++++++++++++++++++++++++++++++++++++++++++
lib/igt_chamelium.h | 9 +++++++
2 files changed, 67 insertions(+)
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 966d78dce146..c332291ef305 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <errno.h>
+#include <math.h>
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
#include <pthread.h>
@@ -657,6 +658,63 @@ void chamelium_port_get_resolution(struct chamelium *chamelium,
xmlrpc_DECREF(res);
}
+static void read_int_from_xml_struct(struct chamelium *chamelium,
+ xmlrpc_value *struct_val, const char *key,
+ int *dst)
+{
+ xmlrpc_value *val = NULL;
+
+ xmlrpc_struct_find_value(&chamelium->env, struct_val, key, &val);
+ if (val) {
+ xmlrpc_read_int(&chamelium->env, val, dst);
+ xmlrpc_DECREF(val);
+ } else
+ *dst = -1;
+}
+
+static void video_params_from_xml(struct chamelium *chamelium,
+ xmlrpc_value *res,
+ struct chamelium_video_params *params)
+{
+ xmlrpc_value *val = NULL;
+
+ xmlrpc_struct_find_value(&chamelium->env, res, "clock", &val);
+ if (val) {
+ xmlrpc_read_double(&chamelium->env, val, ¶ms->clock);
+ xmlrpc_DECREF(val);
+ } else
+ params->clock = NAN;
+
+ read_int_from_xml_struct(chamelium, res, "htotal", ¶ms->htotal);
+ read_int_from_xml_struct(chamelium, res, "hactive", ¶ms->hactive);
+ read_int_from_xml_struct(chamelium, res, "hsync_offset",
+ ¶ms->hsync_offset);
+ read_int_from_xml_struct(chamelium, res, "hsync_width",
+ ¶ms->hsync_width);
+ read_int_from_xml_struct(chamelium, res, "hsync_polarity",
+ ¶ms->hsync_polarity);
+ read_int_from_xml_struct(chamelium, res, "vtotal", ¶ms->vtotal);
+ read_int_from_xml_struct(chamelium, res, "vactive", ¶ms->vactive);
+ read_int_from_xml_struct(chamelium, res, "vsync_offset",
+ ¶ms->vsync_offset);
+ read_int_from_xml_struct(chamelium, res, "vsync_width",
+ ¶ms->vsync_width);
+ read_int_from_xml_struct(chamelium, res, "vsync_polarity",
+ ¶ms->vsync_polarity);
+}
+
+void chamelium_port_get_video_params(struct chamelium *chamelium,
+ struct chamelium_port *port,
+ struct chamelium_video_params *params)
+{
+ xmlrpc_value *res;
+
+ res = chamelium_rpc(chamelium, NULL, "GetVideoParams", "(i)", port->id);
+ video_params_from_xml(chamelium, res, params);
+
+ xmlrpc_DECREF(res);
+}
+
static void chamelium_get_captured_resolution(struct chamelium *chamelium,
int *w, int *h)
{
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index ce9e9ced75d9..cd5813821fb4 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -53,6 +53,12 @@ enum chamelium_check {
CHAMELIUM_CHECK_CRC,
};
+struct chamelium_video_params {
+ double clock;
+ int htotal, hactive, hsync_offset, hsync_width, hsync_polarity;
+ int vtotal, vactive, vsync_offset, vsync_width, vsync_polarity;
+};
+
struct chamelium_audio_file {
char *path;
int rate; /* Hz */
@@ -113,6 +119,9 @@ void chamelium_port_set_ddc_state(struct chamelium *chamelium,
void chamelium_port_get_resolution(struct chamelium *chamelium,
struct chamelium_port *port,
int *x, int *y);
+void chamelium_port_get_video_params(struct chamelium *chamelium,
+ struct chamelium_port *port,
+ struct chamelium_video_params *params);
igt_crc_t *chamelium_get_crc_for_area(struct chamelium *chamelium,
struct chamelium_port *port,
int x, int y, int w, int h);
--
2.22.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: add chamelium_supports_get_video_params
2019-07-03 7:57 [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_port_get_video_params Simon Ser
@ 2019-07-03 7:57 ` Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes Simon Ser
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Simon Ser @ 2019-07-03 7:57 UTC (permalink / raw)
To: igt-dev; +Cc: martin.peres
This allows to skip video params tests on Chamelium boards which aren't recent
enough.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
lib/igt_chamelium.c | 48 ++++++++++++++++++++++++++-------------------
lib/igt_chamelium.h | 1 +
2 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index c332291ef305..3803a90e4250 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -658,6 +658,33 @@ void chamelium_port_get_resolution(struct chamelium *chamelium,
xmlrpc_DECREF(res);
}
+/** chamelium_supports_method: checks if the Chamelium board supports a method.
+ *
+ * Note: this actually tries to call the method.
+ *
+ * See https://crbug.com/977995 for a discussion about a better solution.
+ */
+static bool chamelium_supports_method(struct chamelium *chamelium,
+ const char *name)
+{
+ xmlrpc_value *res;
+
+ res = __chamelium_rpc(chamelium, NULL, name, "()");
+ if (res)
+ xmlrpc_DECREF(res);
+
+ /* XML-RPC has a special code for unsupported methods
+ * (XMLRPC_NO_SUCH_METHOD_ERROR) however the Chamelium implementation
+ * doesn't return it. */
+ return (!chamelium->env.fault_occurred ||
+ strstr(chamelium->env.fault_string, "not supported") == NULL);
+}
+
+bool chamelium_supports_get_video_params(struct chamelium *chamelium)
+{
+ return chamelium_supports_method(chamelium, "GetVideoParams");
+}
+
static void read_int_from_xml_struct(struct chamelium *chamelium,
xmlrpc_value *struct_val, const char *key,
int *dst)
@@ -1018,32 +1045,13 @@ int chamelium_get_captured_frame_count(struct chamelium *chamelium)
return ret;
}
-/**
- * chamelium_supports_get_audio_format: check the Chamelium device supports
- * retrieving the capture audio format.
- */
-static bool chamelium_supports_get_audio_format(struct chamelium *chamelium)
-{
- xmlrpc_value *res;
-
- res = __chamelium_rpc(chamelium, NULL, "GetAudioFormat", "(i)", 3);
- if (res)
- xmlrpc_DECREF(res);
-
- /* XML-RPC has a special code for unsupported methods
- * (XMLRPC_NO_SUCH_METHOD_ERROR) however the Chamelium implementation
- * doesn't return it. */
- return (!chamelium->env.fault_occurred ||
- strstr(chamelium->env.fault_string, "not supported") == NULL);
-}
-
bool chamelium_has_audio_support(struct chamelium *chamelium,
struct chamelium_port *port)
{
xmlrpc_value *res;
xmlrpc_bool has_support;
- if (!chamelium_supports_get_audio_format(chamelium)) {
+ if (!chamelium_supports_method(chamelium, "GetAudioFormat")) {
igt_debug("The Chamelium device doesn't support GetAudioFormat\n");
return false;
}
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index cd5813821fb4..8b4fc3344c64 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -119,6 +119,7 @@ void chamelium_port_set_ddc_state(struct chamelium *chamelium,
void chamelium_port_get_resolution(struct chamelium *chamelium,
struct chamelium_port *port,
int *x, int *y);
+bool chamelium_supports_get_video_params(struct chamelium *chamelium);
void chamelium_port_get_video_params(struct chamelium *chamelium,
struct chamelium_port *port,
struct chamelium_video_params *params);
--
2.22.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes
2019-07-03 7:57 [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_port_get_video_params Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: add chamelium_supports_get_video_params Simon Ser
@ 2019-07-03 7:57 ` Simon Ser
2019-07-03 14:14 ` Peres, Martin
2019-07-03 8:32 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params Patchwork
2019-07-04 1:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
3 siblings, 1 reply; 9+ messages in thread
From: Simon Ser @ 2019-07-03 7:57 UTC (permalink / raw)
To: igt-dev; +Cc: martin.peres
The idea is to check that the mode is correctly applied. We use the Chamelium's
GetVideoParams method to get and check mode parameters.
We need to start a capture of zero frames to trigger the FSM. Without it,
Chamelium's receiver doesn't get stable video input.
Signed-off-by: Simon Ser <simon.ser@intel.com>
---
tests/kms_chamelium.c | 110 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index b749b5598c1d..b8d6718f5b68 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -758,6 +758,110 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
drmModeFreeConnector(connector);
}
+#define MODE_CLOCK_ACCURACY 0.05 /* 5% */
+
+static void check_mode(struct chamelium *chamelium, struct chamelium_port *port,
+ drmModeModeInfo *mode)
+{
+ struct chamelium_video_params video_params = {0};
+ double mode_clock;
+ int mode_hsync_offset, mode_vsync_offset;
+ int mode_hsync_width, mode_vsync_width;
+ int mode_hsync_polarity, mode_vsync_polarity;
+
+ chamelium_port_get_video_params(chamelium, port, &video_params);
+
+ mode_clock = (double) mode->clock / 1000;
+ mode_hsync_offset = mode->hsync_start - mode->hdisplay;
+ mode_vsync_offset = mode->vsync_start - mode->vdisplay;
+ mode_hsync_width = mode->hsync_end - mode->hsync_start;
+ mode_vsync_width = mode->vsync_end - mode->vsync_start;
+ mode_hsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PHSYNC);
+ mode_vsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PVSYNC);
+
+ igt_debug("Checking video mode:\n");
+ igt_debug("clock: got %f, expected %f ± %f%%\n",
+ video_params.clock, mode_clock, MODE_CLOCK_ACCURACY * 100);
+ igt_debug("hactive: got %d, expected %d\n",
+ video_params.hactive, mode->hdisplay);
+ igt_debug("vactive: got %d, expected %d\n",
+ video_params.vactive, mode->vdisplay);
+ igt_debug("hsync_offset: got %d, expected %d\n",
+ video_params.hsync_offset, mode_hsync_offset);
+ igt_debug("vsync_offset: got %d, expected %d\n",
+ video_params.vsync_offset, mode_vsync_offset);
+ igt_debug("htotal: got %d, expected %d\n",
+ video_params.htotal, mode->htotal);
+ igt_debug("vtotal: got %d, expected %d\n",
+ video_params.vtotal, mode->vtotal);
+ igt_debug("hsync_width: got %d, expected %d\n",
+ video_params.hsync_width, mode_hsync_width);
+ igt_debug("vsync_width: got %d, expected %d\n",
+ video_params.vsync_width, mode_vsync_width);
+ igt_debug("hsync_polarity: got %d, expected %d\n",
+ video_params.hsync_polarity, mode_hsync_polarity);
+ igt_debug("vsync_polarity: got %d, expected %d\n",
+ video_params.vsync_polarity, mode_vsync_polarity);
+
+ if (!isnan(video_params.clock)) {
+ igt_assert(video_params.clock >
+ mode_clock * (1 - MODE_CLOCK_ACCURACY));
+ igt_assert(video_params.clock <
+ mode_clock * (1 + MODE_CLOCK_ACCURACY));
+ }
+ igt_assert(video_params.hactive == mode->hdisplay);
+ igt_assert(video_params.vactive == mode->vdisplay);
+ igt_assert(video_params.hsync_offset == mode_hsync_offset);
+ igt_assert(video_params.vsync_offset == mode_vsync_offset);
+ igt_assert(video_params.htotal == mode->htotal);
+ igt_assert(video_params.vtotal == mode->vtotal);
+ igt_assert(video_params.hsync_width == mode_hsync_width);
+ igt_assert(video_params.vsync_width == mode_vsync_width);
+ igt_assert(video_params.hsync_polarity == mode_hsync_polarity);
+ igt_assert(video_params.vsync_polarity == mode_vsync_polarity);
+}
+
+static void test_modes(data_t *data, struct chamelium_port *port)
+{
+ igt_output_t *output;
+ igt_plane_t *primary;
+ drmModeConnector *connector;
+ int fb_id, i;
+ struct igt_fb fb;
+
+ igt_require(chamelium_supports_get_video_params(data->chamelium));
+
+ reset_state(data, port);
+
+ output = prepare_output(data, port, TEST_EDID_BASE);
+ connector = chamelium_port_get_connector(data->chamelium, port, false);
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ igt_assert(primary);
+
+ igt_assert(connector->count_modes > 0);
+ for (i = 0; i < connector->count_modes; i++) {
+ drmModeModeInfo *mode = &connector->modes[i];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay, mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ LOCAL_DRM_FORMAT_MOD_NONE,
+ 0, 0, 0, &fb);
+ igt_assert(fb_id > 0);
+
+ enable_output(data, port, output, mode, &fb);
+
+ /* Trigger the FSM */
+ chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 0);
+
+ check_mode(data->chamelium, port, mode);
+
+ igt_remove_fb(data->drm_fd, &fb);
+ }
+
+ drmModeFreeConnector(connector);
+}
+
/* Playback parameters control the audio signal we synthesize and send */
#define PLAYBACK_CHANNELS 2
@@ -2160,6 +2264,9 @@ igt_main
connector_subtest("dp-frame-dump", DisplayPort)
test_display_frame_dump(&data, port);
+ connector_subtest("dp-modes", DisplayPort)
+ test_modes(&data, port);
+
connector_subtest("dp-audio", DisplayPort)
test_display_audio(&data, port, "HDMI",
TEST_EDID_DP_AUDIO);
@@ -2315,6 +2422,9 @@ igt_main
connector_subtest("hdmi-frame-dump", HDMIA)
test_display_frame_dump(&data, port);
+ connector_subtest("hdmi-modes", HDMIA)
+ test_modes(&data, port);
+
connector_subtest("hdmi-audio", HDMIA)
test_display_audio(&data, port, "HDMI",
TEST_EDID_HDMI_AUDIO);
--
2.22.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params
2019-07-03 7:57 [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_port_get_video_params Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: add chamelium_supports_get_video_params Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes Simon Ser
@ 2019-07-03 8:32 ` Patchwork
2019-07-04 1:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-07-03 8:32 UTC (permalink / raw)
To: Ser, Simon; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params
URL : https://patchwork.freedesktop.org/series/63110/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6399 -> IGTPW_3229
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/63110/revisions/1/mbox/
Known issues
------------
Here are the changes found in IGTPW_3229 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@reload-with-fault-injection:
- fi-bsw-kefka: [PASS][1] -> [DMESG-WARN][2] ([fdo#110900])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-bsw-kefka/igt@i915_module_load@reload-with-fault-injection.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-bsw-kefka/igt@i915_module_load@reload-with-fault-injection.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#109485])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
#### Possible fixes ####
* igt@gem_basic@create-close:
- fi-icl-u3: [DMESG-WARN][5] ([fdo#107724]) -> [PASS][6] +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-icl-u3/igt@gem_basic@create-close.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-icl-u3/igt@gem_basic@create-close.html
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
* igt@kms_busy@basic-flip-c:
- fi-skl-6770hq: [SKIP][9] ([fdo#109271] / [fdo#109278]) -> [PASS][10] +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html
* igt@kms_chamelium@dp-crc-fast:
- fi-icl-u2: [FAIL][11] ([fdo#109635 ] / [fdo#110387]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-icl-u2/igt@kms_chamelium@dp-crc-fast.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-icl-u2/igt@kms_chamelium@dp-crc-fast.html
* igt@kms_flip@basic-flip-vs-dpms:
- fi-skl-6770hq: [SKIP][13] ([fdo#109271]) -> [PASS][14] +23 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387
[fdo#110900]: https://bugs.freedesktop.org/show_bug.cgi?id=110900
Participating hosts (54 -> 45)
------------------------------
Additional (2): fi-hsw-peppy fi-pnv-d510
Missing (11): fi-kbl-soraka fi-ilk-m540 fi-skl-gvtdvm fi-hsw-4200u fi-bdw-gvtdvm fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* IGT: IGT_5079 -> IGTPW_3229
CI_DRM_6399: c15e6447c0c506c058671d59082fcd710e42d6d4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3229: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/
IGT_5079: 873df2fa9e8f5fd02d4532b30ef2579f4fe4f27f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@kms_chamelium@dp-modes
+igt@kms_chamelium@hdmi-modes
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes Simon Ser
@ 2019-07-03 14:14 ` Peres, Martin
2019-07-04 7:25 ` Ser, Simon
0 siblings, 1 reply; 9+ messages in thread
From: Peres, Martin @ 2019-07-03 14:14 UTC (permalink / raw)
To: Ser, Simon, igt-dev@lists.freedesktop.org
On 03/07/2019 10:57, Ser, Simon wrote:
> The idea is to check that the mode is correctly applied. We use the Chamelium's
> GetVideoParams method to get and check mode parameters.
>
> We need to start a capture of zero frames to trigger the FSM. Without it,
> Chamelium's receiver doesn't get stable video input.
>
> Signed-off-by: Simon Ser <simon.ser@intel.com>
> ---
> tests/kms_chamelium.c | 110 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 110 insertions(+)
>
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index b749b5598c1d..b8d6718f5b68 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -758,6 +758,110 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
> drmModeFreeConnector(connector);
> }
>
> +#define MODE_CLOCK_ACCURACY 0.05 /* 5% */
> +
> +static void check_mode(struct chamelium *chamelium, struct chamelium_port *port,
> + drmModeModeInfo *mode)
> +{
> + struct chamelium_video_params video_params = {0};
> + double mode_clock;
> + int mode_hsync_offset, mode_vsync_offset;
> + int mode_hsync_width, mode_vsync_width;
> + int mode_hsync_polarity, mode_vsync_polarity;
> +
> + chamelium_port_get_video_params(chamelium, port, &video_params);
> +
> + mode_clock = (double) mode->clock / 1000;
> + mode_hsync_offset = mode->hsync_start - mode->hdisplay;
> + mode_vsync_offset = mode->vsync_start - mode->vdisplay;
> + mode_hsync_width = mode->hsync_end - mode->hsync_start;
> + mode_vsync_width = mode->vsync_end - mode->vsync_start;
> + mode_hsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PHSYNC);
> + mode_vsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PVSYNC);
> +
> + igt_debug("Checking video mode:\n");
> + igt_debug("clock: got %f, expected %f ± %f%%\n",
> + video_params.clock, mode_clock, MODE_CLOCK_ACCURACY * 100);
> + igt_debug("hactive: got %d, expected %d\n",
> + video_params.hactive, mode->hdisplay);
> + igt_debug("vactive: got %d, expected %d\n",
> + video_params.vactive, mode->vdisplay);
> + igt_debug("hsync_offset: got %d, expected %d\n",
> + video_params.hsync_offset, mode_hsync_offset);
> + igt_debug("vsync_offset: got %d, expected %d\n",
> + video_params.vsync_offset, mode_vsync_offset);
> + igt_debug("htotal: got %d, expected %d\n",
> + video_params.htotal, mode->htotal);
> + igt_debug("vtotal: got %d, expected %d\n",
> + video_params.vtotal, mode->vtotal);
> + igt_debug("hsync_width: got %d, expected %d\n",
> + video_params.hsync_width, mode_hsync_width);
> + igt_debug("vsync_width: got %d, expected %d\n",
> + video_params.vsync_width, mode_vsync_width);
> + igt_debug("hsync_polarity: got %d, expected %d\n",
> + video_params.hsync_polarity, mode_hsync_polarity);
> + igt_debug("vsync_polarity: got %d, expected %d\n",
> + video_params.vsync_polarity, mode_vsync_polarity);
> +
> + if (!isnan(video_params.clock)) {
> + igt_assert(video_params.clock >
> + mode_clock * (1 - MODE_CLOCK_ACCURACY));
> + igt_assert(video_params.clock <
> + mode_clock * (1 + MODE_CLOCK_ACCURACY));
> + }
> + igt_assert(video_params.hactive == mode->hdisplay);
> + igt_assert(video_params.vactive == mode->vdisplay);
> + igt_assert(video_params.hsync_offset == mode_hsync_offset);
> + igt_assert(video_params.vsync_offset == mode_vsync_offset);
> + igt_assert(video_params.htotal == mode->htotal);
> + igt_assert(video_params.vtotal == mode->vtotal);
> + igt_assert(video_params.hsync_width == mode_hsync_width);
> + igt_assert(video_params.vsync_width == mode_vsync_width);
> + igt_assert(video_params.hsync_polarity == mode_hsync_polarity);
> + igt_assert(video_params.vsync_polarity == mode_vsync_polarity);
> +}
> +
> +static void test_modes(data_t *data, struct chamelium_port *port)
> +{
> + igt_output_t *output;
> + igt_plane_t *primary;
> + drmModeConnector *connector;
> + int fb_id, i;
> + struct igt_fb fb;
> +
> + igt_require(chamelium_supports_get_video_params(data->chamelium));
> +
> + reset_state(data, port);
Is that using the default EDID? We want to test all fields, at a few
resolutions. Execution time is really important here since I assume each
round takes around 3s, so we cannot have too many modes being tested.
> +
> + output = prepare_output(data, port, TEST_EDID_BASE);
> + connector = chamelium_port_get_connector(data->chamelium, port, false);
> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> + igt_assert(primary);
> +
> + igt_assert(connector->count_modes > 0);
> + for (i = 0; i < connector->count_modes; i++) {
> + drmModeModeInfo *mode = &connector->modes[i];
> +
> + fb_id = igt_create_color_pattern_fb(data->drm_fd,
> + mode->hdisplay, mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + LOCAL_DRM_FORMAT_MOD_NONE,
> + 0, 0, 0, &fb);
Creating a new FB might be a little slow on some machines. Why not reuse
the same FB and scale it up and down? Or even better, why set an FB at all?
> + igt_assert(fb_id > 0);
> +
> + enable_output(data, port, output, mode, &fb);
> +
> + /* Trigger the FSM */
> + chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 0);
> +
> + check_mode(data->chamelium, port, mode);
> +
> + igt_remove_fb(data->drm_fd, &fb);
> + }
> +
> + drmModeFreeConnector(connector);
> +}
> +
>
> /* Playback parameters control the audio signal we synthesize and send */
> #define PLAYBACK_CHANNELS 2
> @@ -2160,6 +2264,9 @@ igt_main
> connector_subtest("dp-frame-dump", DisplayPort)
> test_display_frame_dump(&data, port);
>
> + connector_subtest("dp-modes", DisplayPort)
> + test_modes(&data, port);
dp-modes-check?
The series is:
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
However, I would really like to see if we can run this test under 30s
(unlike testdisplay).
Martin
> +
> connector_subtest("dp-audio", DisplayPort)
> test_display_audio(&data, port, "HDMI",
> TEST_EDID_DP_AUDIO);
> @@ -2315,6 +2422,9 @@ igt_main
> connector_subtest("hdmi-frame-dump", HDMIA)
> test_display_frame_dump(&data, port);
>
> + connector_subtest("hdmi-modes", HDMIA)
> + test_modes(&data, port);
> +
> connector_subtest("hdmi-audio", HDMIA)
> test_display_audio(&data, port, "HDMI",
> TEST_EDID_HDMI_AUDIO);
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params
2019-07-03 7:57 [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_port_get_video_params Simon Ser
` (2 preceding siblings ...)
2019-07-03 8:32 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params Patchwork
@ 2019-07-04 1:36 ` Patchwork
3 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2019-07-04 1:36 UTC (permalink / raw)
To: Ser, Simon; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params
URL : https://patchwork.freedesktop.org/series/63110/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6399_full -> IGTPW_3229_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/63110/revisions/1/mbox/
New tests
---------
New tests have been introduced between CI_DRM_6399_full and IGTPW_3229_full:
### New IGT tests (2) ###
* igt@kms_chamelium@dp-modes:
- Statuses : 6 skip(s)
- Exec time: [0.0] s
* igt@kms_chamelium@hdmi-modes:
- Statuses : 6 skip(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_3229_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_tiled_swapping@non-threaded:
- shard-apl: [PASS][1] -> [DMESG-WARN][2] ([fdo#108686])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-apl3/igt@gem_tiled_swapping@non-threaded.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-apl8/igt@gem_tiled_swapping@non-threaded.html
* igt@i915_pm_rpm@i2c:
- shard-hsw: [PASS][3] -> [FAIL][4] ([fdo#104097])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-hsw7/igt@i915_pm_rpm@i2c.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-hsw6/igt@i915_pm_rpm@i2c.html
* igt@i915_suspend@sysfs-reader:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-apl7/igt@i915_suspend@sysfs-reader.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-apl6/igt@i915_suspend@sysfs-reader.html
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: [PASS][7] -> [FAIL][8] ([fdo#105767])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-hsw8/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-hsw6/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: [PASS][9] -> [FAIL][10] ([fdo#103167]) +6 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
* igt@kms_psr@psr2_suspend:
- shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109441])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb2/igt@kms_psr@psr2_suspend.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb5/igt@kms_psr@psr2_suspend.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][13] -> [FAIL][14] ([fdo#99912])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-apl6/igt@kms_setmode@basic.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-apl3/igt@kms_setmode@basic.html
- shard-kbl: [PASS][15] -> [FAIL][16] ([fdo#99912])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-kbl1/igt@kms_setmode@basic.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-kbl4/igt@kms_setmode@basic.html
* igt@perf_pmu@rc6-runtime-pm-long:
- shard-hsw: [PASS][17] -> [FAIL][18] ([fdo#105010])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-hsw1/igt@perf_pmu@rc6-runtime-pm-long.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-hsw6/igt@perf_pmu@rc6-runtime-pm-long.html
* igt@prime_busy@hang-render:
- shard-snb: [PASS][19] -> [INCOMPLETE][20] ([fdo#105411])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-snb7/igt@prime_busy@hang-render.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-snb1/igt@prime_busy@hang-render.html
* igt@tools_test@sysfs_l3_parity:
- shard-hsw: [PASS][21] -> [SKIP][22] ([fdo#109271])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-hsw4/igt@tools_test@sysfs_l3_parity.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-hsw4/igt@tools_test@sysfs_l3_parity.html
#### Possible fixes ####
* igt@gem_eio@in-flight-suspend:
- shard-iclb: [INCOMPLETE][23] ([fdo#107713]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb3/igt@gem_eio@in-flight-suspend.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb1/igt@gem_eio@in-flight-suspend.html
* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][25] ([fdo#110854]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb6/igt@gem_exec_balancer@smoke.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb1/igt@gem_exec_balancer@smoke.html
* igt@kms_color@pipe-b-degamma:
- shard-kbl: [FAIL][27] ([fdo#104782]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-kbl2/igt@kms_color@pipe-b-degamma.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-kbl1/igt@kms_color@pipe-b-degamma.html
- shard-apl: [FAIL][29] ([fdo#104782]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-apl8/igt@kms_color@pipe-b-degamma.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-apl1/igt@kms_color@pipe-b-degamma.html
- shard-glk: [FAIL][31] ([fdo#104782]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-glk3/igt@kms_color@pipe-b-degamma.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-glk5/igt@kms_color@pipe-b-degamma.html
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][33] ([fdo#105363]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-glk1/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-blt:
- shard-snb: [SKIP][35] ([fdo#109271]) -> [PASS][36] +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-snb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-blt.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-snb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-blt.html
* igt@kms_frontbuffer_tracking@fbc-stridechange:
- shard-iclb: [FAIL][37] ([fdo#103167]) -> [PASS][38] +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-stridechange.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-stridechange.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-apl: [DMESG-WARN][39] ([fdo#108566]) -> [PASS][40] +6 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-apl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
* igt@kms_psr@no_drrs:
- shard-iclb: [FAIL][41] ([fdo#108341]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb1/igt@kms_psr@no_drrs.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb2/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_sprite_render:
- shard-iclb: [SKIP][43] ([fdo#109441]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6399/shard-iclb5/igt@kms_psr@psr2_sprite_render.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/shard-iclb2/igt@kms_psr@psr2_sprite_render.html
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#104097]: https://bugs.freedesktop.org/show_bug.cgi?id=104097
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (10 -> 6)
------------------------------
Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005
Build changes
-------------
* IGT: IGT_5079 -> IGTPW_3229
* Piglit: piglit_4509 -> None
CI_DRM_6399: c15e6447c0c506c058671d59082fcd710e42d6d4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3229: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/
IGT_5079: 873df2fa9e8f5fd02d4532b30ef2579f4fe4f27f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3229/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes
2019-07-03 14:14 ` Peres, Martin
@ 2019-07-04 7:25 ` Ser, Simon
2019-07-17 13:26 ` Martin Peres
0 siblings, 1 reply; 9+ messages in thread
From: Ser, Simon @ 2019-07-04 7:25 UTC (permalink / raw)
To: igt-dev@lists.freedesktop.org, Peres, Martin
On Wed, 2019-07-03 at 15:14 +0100, Peres, Martin wrote:
> On 03/07/2019 10:57, Ser, Simon wrote:
> > The idea is to check that the mode is correctly applied. We use the Chamelium's
> > GetVideoParams method to get and check mode parameters.
> >
> > We need to start a capture of zero frames to trigger the FSM. Without it,
> > Chamelium's receiver doesn't get stable video input.
> >
> > Signed-off-by: Simon Ser <simon.ser@intel.com>
> > ---
> > tests/kms_chamelium.c | 110 ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 110 insertions(+)
> >
> > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > index b749b5598c1d..b8d6718f5b68 100644
> > --- a/tests/kms_chamelium.c
> > +++ b/tests/kms_chamelium.c
> > @@ -758,6 +758,110 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
> > drmModeFreeConnector(connector);
> > }
> >
> > +#define MODE_CLOCK_ACCURACY 0.05 /* 5% */
> > +
> > +static void check_mode(struct chamelium *chamelium, struct chamelium_port *port,
> > + drmModeModeInfo *mode)
> > +{
> > + struct chamelium_video_params video_params = {0};
> > + double mode_clock;
> > + int mode_hsync_offset, mode_vsync_offset;
> > + int mode_hsync_width, mode_vsync_width;
> > + int mode_hsync_polarity, mode_vsync_polarity;
> > +
> > + chamelium_port_get_video_params(chamelium, port, &video_params);
> > +
> > + mode_clock = (double) mode->clock / 1000;
> > + mode_hsync_offset = mode->hsync_start - mode->hdisplay;
> > + mode_vsync_offset = mode->vsync_start - mode->vdisplay;
> > + mode_hsync_width = mode->hsync_end - mode->hsync_start;
> > + mode_vsync_width = mode->vsync_end - mode->vsync_start;
> > + mode_hsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PHSYNC);
> > + mode_vsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PVSYNC);
> > +
> > + igt_debug("Checking video mode:\n");
> > + igt_debug("clock: got %f, expected %f ± %f%%\n",
> > + video_params.clock, mode_clock, MODE_CLOCK_ACCURACY * 100);
> > + igt_debug("hactive: got %d, expected %d\n",
> > + video_params.hactive, mode->hdisplay);
> > + igt_debug("vactive: got %d, expected %d\n",
> > + video_params.vactive, mode->vdisplay);
> > + igt_debug("hsync_offset: got %d, expected %d\n",
> > + video_params.hsync_offset, mode_hsync_offset);
> > + igt_debug("vsync_offset: got %d, expected %d\n",
> > + video_params.vsync_offset, mode_vsync_offset);
> > + igt_debug("htotal: got %d, expected %d\n",
> > + video_params.htotal, mode->htotal);
> > + igt_debug("vtotal: got %d, expected %d\n",
> > + video_params.vtotal, mode->vtotal);
> > + igt_debug("hsync_width: got %d, expected %d\n",
> > + video_params.hsync_width, mode_hsync_width);
> > + igt_debug("vsync_width: got %d, expected %d\n",
> > + video_params.vsync_width, mode_vsync_width);
> > + igt_debug("hsync_polarity: got %d, expected %d\n",
> > + video_params.hsync_polarity, mode_hsync_polarity);
> > + igt_debug("vsync_polarity: got %d, expected %d\n",
> > + video_params.vsync_polarity, mode_vsync_polarity);
> > +
> > + if (!isnan(video_params.clock)) {
> > + igt_assert(video_params.clock >
> > + mode_clock * (1 - MODE_CLOCK_ACCURACY));
> > + igt_assert(video_params.clock <
> > + mode_clock * (1 + MODE_CLOCK_ACCURACY));
> > + }
> > + igt_assert(video_params.hactive == mode->hdisplay);
> > + igt_assert(video_params.vactive == mode->vdisplay);
> > + igt_assert(video_params.hsync_offset == mode_hsync_offset);
> > + igt_assert(video_params.vsync_offset == mode_vsync_offset);
> > + igt_assert(video_params.htotal == mode->htotal);
> > + igt_assert(video_params.vtotal == mode->vtotal);
> > + igt_assert(video_params.hsync_width == mode_hsync_width);
> > + igt_assert(video_params.vsync_width == mode_vsync_width);
> > + igt_assert(video_params.hsync_polarity == mode_hsync_polarity);
> > + igt_assert(video_params.vsync_polarity == mode_vsync_polarity);
> > +}
> > +
> > +static void test_modes(data_t *data, struct chamelium_port *port)
> > +{
> > + igt_output_t *output;
> > + igt_plane_t *primary;
> > + drmModeConnector *connector;
> > + int fb_id, i;
> > + struct igt_fb fb;
> > +
> > + igt_require(chamelium_supports_get_video_params(data->chamelium));
> > +
> > + reset_state(data, port);
>
> Is that using the default EDID? We want to test all fields, at a few
> resolutions. Execution time is really important here since I assume each
> round takes around 3s, so we cannot have too many modes being tested.
No: see the prepare_output call below with TEST_EDID_BASE. We use the
base IGT EDID for now. It doesn't contain a lot of modes.
> > +
> > + output = prepare_output(data, port, TEST_EDID_BASE);
> > + connector = chamelium_port_get_connector(data->chamelium, port, false);
> > + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > + igt_assert(primary);
> > +
> > + igt_assert(connector->count_modes > 0);
> > + for (i = 0; i < connector->count_modes; i++) {
> > + drmModeModeInfo *mode = &connector->modes[i];
> > +
> > + fb_id = igt_create_color_pattern_fb(data->drm_fd,
> > + mode->hdisplay, mode->vdisplay,
> > + DRM_FORMAT_XRGB8888,
> > + LOCAL_DRM_FORMAT_MOD_NONE,
> > + 0, 0, 0, &fb);
>
> Creating a new FB might be a little slow on some machines. Why not reuse
> the same FB and scale it up and down? Or even better, why set an FB at all?
I don't think you can do a modeset without a FB.
I'm also not sure scaling is always supported. Maybe we could create
multiple FBs with different sizes from the same dumb buffer.
> > + igt_assert(fb_id > 0);
> > +
> > + enable_output(data, port, output, mode, &fb);
> > +
> > + /* Trigger the FSM */
> > + chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 0);
> > +
> > + check_mode(data->chamelium, port, mode);
> > +
> > + igt_remove_fb(data->drm_fd, &fb);
> > + }
> > +
> > + drmModeFreeConnector(connector);
> > +}
> > +
> >
> > /* Playback parameters control the audio signal we synthesize and send */
> > #define PLAYBACK_CHANNELS 2
> > @@ -2160,6 +2264,9 @@ igt_main
> > connector_subtest("dp-frame-dump", DisplayPort)
> > test_display_frame_dump(&data, port);
> >
> > + connector_subtest("dp-modes", DisplayPort)
> > + test_modes(&data, port);
>
> dp-modes-check?
I'm not a fan of adding "check" in test names, because it seems
redundant. It's a test, so yes it's going to check something…
> The series is:
>
> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
>
> However, I would really like to see if we can run this test under 30s
> (unlike testdisplay).
Yeah, that's really not happening right now. It takes 38s on my
machine.
The modesets are taking a long time. I'm not sure we can do anything
about it.
> Martin
>
> > +
> > connector_subtest("dp-audio", DisplayPort)
> > test_display_audio(&data, port, "HDMI",
> > TEST_EDID_DP_AUDIO);
> > @@ -2315,6 +2422,9 @@ igt_main
> > connector_subtest("hdmi-frame-dump", HDMIA)
> > test_display_frame_dump(&data, port);
> >
> > + connector_subtest("hdmi-modes", HDMIA)
> > + test_modes(&data, port);
> > +
> > connector_subtest("hdmi-audio", HDMIA)
> > test_display_audio(&data, port, "HDMI",
> > TEST_EDID_HDMI_AUDIO);
> >
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes
2019-07-04 7:25 ` Ser, Simon
@ 2019-07-17 13:26 ` Martin Peres
2019-07-17 14:36 ` Ser, Simon
0 siblings, 1 reply; 9+ messages in thread
From: Martin Peres @ 2019-07-17 13:26 UTC (permalink / raw)
To: Ser, Simon, igt-dev@lists.freedesktop.org, Peres, Martin
On 04/07/2019 10:25, Ser, Simon wrote:
> On Wed, 2019-07-03 at 15:14 +0100, Peres, Martin wrote:
>> On 03/07/2019 10:57, Ser, Simon wrote:
>>> The idea is to check that the mode is correctly applied. We use the Chamelium's
>>> GetVideoParams method to get and check mode parameters.
>>>
>>> We need to start a capture of zero frames to trigger the FSM. Without it,
>>> Chamelium's receiver doesn't get stable video input.
>>>
>>> Signed-off-by: Simon Ser <simon.ser@intel.com>
>>> ---
>>> tests/kms_chamelium.c | 110 ++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 110 insertions(+)
>>>
>>> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
>>> index b749b5598c1d..b8d6718f5b68 100644
>>> --- a/tests/kms_chamelium.c
>>> +++ b/tests/kms_chamelium.c
>>> @@ -758,6 +758,110 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
>>> drmModeFreeConnector(connector);
>>> }
>>>
>>> +#define MODE_CLOCK_ACCURACY 0.05 /* 5% */
>>> +
>>> +static void check_mode(struct chamelium *chamelium, struct chamelium_port *port,
>>> + drmModeModeInfo *mode)
>>> +{
>>> + struct chamelium_video_params video_params = {0};
>>> + double mode_clock;
>>> + int mode_hsync_offset, mode_vsync_offset;
>>> + int mode_hsync_width, mode_vsync_width;
>>> + int mode_hsync_polarity, mode_vsync_polarity;
>>> +
>>> + chamelium_port_get_video_params(chamelium, port, &video_params);
>>> +
>>> + mode_clock = (double) mode->clock / 1000;
>>> + mode_hsync_offset = mode->hsync_start - mode->hdisplay;
>>> + mode_vsync_offset = mode->vsync_start - mode->vdisplay;
>>> + mode_hsync_width = mode->hsync_end - mode->hsync_start;
>>> + mode_vsync_width = mode->vsync_end - mode->vsync_start;
>>> + mode_hsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PHSYNC);
>>> + mode_vsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PVSYNC);
>>> +
>>> + igt_debug("Checking video mode:\n");
>>> + igt_debug("clock: got %f, expected %f ± %f%%\n",
>>> + video_params.clock, mode_clock, MODE_CLOCK_ACCURACY * 100);
>>> + igt_debug("hactive: got %d, expected %d\n",
>>> + video_params.hactive, mode->hdisplay);
>>> + igt_debug("vactive: got %d, expected %d\n",
>>> + video_params.vactive, mode->vdisplay);
>>> + igt_debug("hsync_offset: got %d, expected %d\n",
>>> + video_params.hsync_offset, mode_hsync_offset);
>>> + igt_debug("vsync_offset: got %d, expected %d\n",
>>> + video_params.vsync_offset, mode_vsync_offset);
>>> + igt_debug("htotal: got %d, expected %d\n",
>>> + video_params.htotal, mode->htotal);
>>> + igt_debug("vtotal: got %d, expected %d\n",
>>> + video_params.vtotal, mode->vtotal);
>>> + igt_debug("hsync_width: got %d, expected %d\n",
>>> + video_params.hsync_width, mode_hsync_width);
>>> + igt_debug("vsync_width: got %d, expected %d\n",
>>> + video_params.vsync_width, mode_vsync_width);
>>> + igt_debug("hsync_polarity: got %d, expected %d\n",
>>> + video_params.hsync_polarity, mode_hsync_polarity);
>>> + igt_debug("vsync_polarity: got %d, expected %d\n",
>>> + video_params.vsync_polarity, mode_vsync_polarity);
>>> +
>>> + if (!isnan(video_params.clock)) {
>>> + igt_assert(video_params.clock >
>>> + mode_clock * (1 - MODE_CLOCK_ACCURACY));
>>> + igt_assert(video_params.clock <
>>> + mode_clock * (1 + MODE_CLOCK_ACCURACY));
>>> + }
>>> + igt_assert(video_params.hactive == mode->hdisplay);
>>> + igt_assert(video_params.vactive == mode->vdisplay);
>>> + igt_assert(video_params.hsync_offset == mode_hsync_offset);
>>> + igt_assert(video_params.vsync_offset == mode_vsync_offset);
>>> + igt_assert(video_params.htotal == mode->htotal);
>>> + igt_assert(video_params.vtotal == mode->vtotal);
>>> + igt_assert(video_params.hsync_width == mode_hsync_width);
>>> + igt_assert(video_params.vsync_width == mode_vsync_width);
>>> + igt_assert(video_params.hsync_polarity == mode_hsync_polarity);
>>> + igt_assert(video_params.vsync_polarity == mode_vsync_polarity);
>>> +}
>>> +
>>> +static void test_modes(data_t *data, struct chamelium_port *port)
>>> +{
>>> + igt_output_t *output;
>>> + igt_plane_t *primary;
>>> + drmModeConnector *connector;
>>> + int fb_id, i;
>>> + struct igt_fb fb;
>>> +
>>> + igt_require(chamelium_supports_get_video_params(data->chamelium));
>>> +
>>> + reset_state(data, port);
>>
>> Is that using the default EDID? We want to test all fields, at a few
>> resolutions. Execution time is really important here since I assume each
>> round takes around 3s, so we cannot have too many modes being tested.
>
> No: see the prepare_output call below with TEST_EDID_BASE. We use the
> base IGT EDID for now. It doesn't contain a lot of modes.
OK! I guess we'll see how long it takes using the drmtip runs, once it
lands. Please remember to check :)
>
>>> +
>>> + output = prepare_output(data, port, TEST_EDID_BASE);
>>> + connector = chamelium_port_get_connector(data->chamelium, port, false);
>>> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>>> + igt_assert(primary);
>>> +
>>> + igt_assert(connector->count_modes > 0);
>>> + for (i = 0; i < connector->count_modes; i++) {
>>> + drmModeModeInfo *mode = &connector->modes[i];
>>> +
>>> + fb_id = igt_create_color_pattern_fb(data->drm_fd,
>>> + mode->hdisplay, mode->vdisplay,
>>> + DRM_FORMAT_XRGB8888,
>>> + LOCAL_DRM_FORMAT_MOD_NONE,
>>> + 0, 0, 0, &fb);
>>
>> Creating a new FB might be a little slow on some machines. Why not reuse
>> the same FB and scale it up and down? Or even better, why set an FB at all?
>
> I don't think you can do a modeset without a FB.
>
> I'm also not sure scaling is always supported. Maybe we could create
> multiple FBs with different sizes from the same dumb buffer.
Fair-enough! Maybe we could add debug messages in
igt_create_color_pattern_fb to tell how long this takes?
>
>>> + igt_assert(fb_id > 0);
>>> +
>>> + enable_output(data, port, output, mode, &fb);
>>> +
>>> + /* Trigger the FSM */
>>> + chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 0);
>>> +
>>> + check_mode(data->chamelium, port, mode);
>>> +
>>> + igt_remove_fb(data->drm_fd, &fb);
>>> + }
>>> +
>>> + drmModeFreeConnector(connector);
>>> +}
>>> +
>>>
>>> /* Playback parameters control the audio signal we synthesize and send */
>>> #define PLAYBACK_CHANNELS 2
>>> @@ -2160,6 +2264,9 @@ igt_main
>>> connector_subtest("dp-frame-dump", DisplayPort)
>>> test_display_frame_dump(&data, port);
>>>
>>> + connector_subtest("dp-modes", DisplayPort)
>>> + test_modes(&data, port);
>>
>> dp-modes-check?
>
> I'm not a fan of adding "check" in test names, because it seems
> redundant. It's a test, so yes it's going to check something…
That is a fair point :D How about dp-mode-timings?
>
>> The series is:
>>
>> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
>>
>> However, I would really like to see if we can run this test under 30s
>> (unlike testdisplay).
>
> Yeah, that's really not happening right now. It takes 38s on my
> machine.
>
> The modesets are taking a long time. I'm not sure we can do anything
> about it.
Well, we can: Reduce the amount of them by crafting a better EDID that
would check what we want to check.
I am still OK with merging it for now, but more work is needed to make
it better!
Martin
>
>> Martin
>>
>>> +
>>> connector_subtest("dp-audio", DisplayPort)
>>> test_display_audio(&data, port, "HDMI",
>>> TEST_EDID_DP_AUDIO);
>>> @@ -2315,6 +2422,9 @@ igt_main
>>> connector_subtest("hdmi-frame-dump", HDMIA)
>>> test_display_frame_dump(&data, port);
>>>
>>> + connector_subtest("hdmi-modes", HDMIA)
>>> + test_modes(&data, port);
>>> +
>>> connector_subtest("hdmi-audio", HDMIA)
>>> test_display_audio(&data, port, "HDMI",
>>> TEST_EDID_HDMI_AUDIO);
>>>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes
2019-07-17 13:26 ` Martin Peres
@ 2019-07-17 14:36 ` Ser, Simon
0 siblings, 0 replies; 9+ messages in thread
From: Ser, Simon @ 2019-07-17 14:36 UTC (permalink / raw)
To: igt-dev@lists.freedesktop.org, martin.peres@linux.intel.com,
Peres, Martin
On Wed, 2019-07-17 at 16:26 +0300, Martin Peres wrote:
> On 04/07/2019 10:25, Ser, Simon wrote:
> > On Wed, 2019-07-03 at 15:14 +0100, Peres, Martin wrote:
> > > On 03/07/2019 10:57, Ser, Simon wrote:
> > > > The idea is to check that the mode is correctly applied. We use the Chamelium's
> > > > GetVideoParams method to get and check mode parameters.
> > > >
> > > > We need to start a capture of zero frames to trigger the FSM. Without it,
> > > > Chamelium's receiver doesn't get stable video input.
> > > >
> > > > Signed-off-by: Simon Ser <simon.ser@intel.com>
> > > > ---
> > > > tests/kms_chamelium.c | 110 ++++++++++++++++++++++++++++++++++++++++++
> > > > 1 file changed, 110 insertions(+)
> > > >
> > > > diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> > > > index b749b5598c1d..b8d6718f5b68 100644
> > > > --- a/tests/kms_chamelium.c
> > > > +++ b/tests/kms_chamelium.c
> > > > @@ -758,6 +758,110 @@ test_display_frame_dump(data_t *data, struct chamelium_port *port)
> > > > drmModeFreeConnector(connector);
> > > > }
> > > >
> > > > +#define MODE_CLOCK_ACCURACY 0.05 /* 5% */
> > > > +
> > > > +static void check_mode(struct chamelium *chamelium, struct chamelium_port *port,
> > > > + drmModeModeInfo *mode)
> > > > +{
> > > > + struct chamelium_video_params video_params = {0};
> > > > + double mode_clock;
> > > > + int mode_hsync_offset, mode_vsync_offset;
> > > > + int mode_hsync_width, mode_vsync_width;
> > > > + int mode_hsync_polarity, mode_vsync_polarity;
> > > > +
> > > > + chamelium_port_get_video_params(chamelium, port, &video_params);
> > > > +
> > > > + mode_clock = (double) mode->clock / 1000;
> > > > + mode_hsync_offset = mode->hsync_start - mode->hdisplay;
> > > > + mode_vsync_offset = mode->vsync_start - mode->vdisplay;
> > > > + mode_hsync_width = mode->hsync_end - mode->hsync_start;
> > > > + mode_vsync_width = mode->vsync_end - mode->vsync_start;
> > > > + mode_hsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PHSYNC);
> > > > + mode_vsync_polarity = !!(mode->flags & DRM_MODE_FLAG_PVSYNC);
> > > > +
> > > > + igt_debug("Checking video mode:\n");
> > > > + igt_debug("clock: got %f, expected %f ± %f%%\n",
> > > > + video_params.clock, mode_clock, MODE_CLOCK_ACCURACY * 100);
> > > > + igt_debug("hactive: got %d, expected %d\n",
> > > > + video_params.hactive, mode->hdisplay);
> > > > + igt_debug("vactive: got %d, expected %d\n",
> > > > + video_params.vactive, mode->vdisplay);
> > > > + igt_debug("hsync_offset: got %d, expected %d\n",
> > > > + video_params.hsync_offset, mode_hsync_offset);
> > > > + igt_debug("vsync_offset: got %d, expected %d\n",
> > > > + video_params.vsync_offset, mode_vsync_offset);
> > > > + igt_debug("htotal: got %d, expected %d\n",
> > > > + video_params.htotal, mode->htotal);
> > > > + igt_debug("vtotal: got %d, expected %d\n",
> > > > + video_params.vtotal, mode->vtotal);
> > > > + igt_debug("hsync_width: got %d, expected %d\n",
> > > > + video_params.hsync_width, mode_hsync_width);
> > > > + igt_debug("vsync_width: got %d, expected %d\n",
> > > > + video_params.vsync_width, mode_vsync_width);
> > > > + igt_debug("hsync_polarity: got %d, expected %d\n",
> > > > + video_params.hsync_polarity, mode_hsync_polarity);
> > > > + igt_debug("vsync_polarity: got %d, expected %d\n",
> > > > + video_params.vsync_polarity, mode_vsync_polarity);
> > > > +
> > > > + if (!isnan(video_params.clock)) {
> > > > + igt_assert(video_params.clock >
> > > > + mode_clock * (1 - MODE_CLOCK_ACCURACY));
> > > > + igt_assert(video_params.clock <
> > > > + mode_clock * (1 + MODE_CLOCK_ACCURACY));
> > > > + }
> > > > + igt_assert(video_params.hactive == mode->hdisplay);
> > > > + igt_assert(video_params.vactive == mode->vdisplay);
> > > > + igt_assert(video_params.hsync_offset == mode_hsync_offset);
> > > > + igt_assert(video_params.vsync_offset == mode_vsync_offset);
> > > > + igt_assert(video_params.htotal == mode->htotal);
> > > > + igt_assert(video_params.vtotal == mode->vtotal);
> > > > + igt_assert(video_params.hsync_width == mode_hsync_width);
> > > > + igt_assert(video_params.vsync_width == mode_vsync_width);
> > > > + igt_assert(video_params.hsync_polarity == mode_hsync_polarity);
> > > > + igt_assert(video_params.vsync_polarity == mode_vsync_polarity);
> > > > +}
> > > > +
> > > > +static void test_modes(data_t *data, struct chamelium_port *port)
> > > > +{
> > > > + igt_output_t *output;
> > > > + igt_plane_t *primary;
> > > > + drmModeConnector *connector;
> > > > + int fb_id, i;
> > > > + struct igt_fb fb;
> > > > +
> > > > + igt_require(chamelium_supports_get_video_params(data->chamelium));
> > > > +
> > > > + reset_state(data, port);
> > >
> > > Is that using the default EDID? We want to test all fields, at a few
> > > resolutions. Execution time is really important here since I assume each
> > > round takes around 3s, so we cannot have too many modes being tested.
> >
> > No: see the prepare_output call below with TEST_EDID_BASE. We use the
> > base IGT EDID for now. It doesn't contain a lot of modes.
>
> OK! I guess we'll see how long it takes using the drmtip runs, once it
> lands. Please remember to check :)
Yeah!
> > > > +
> > > > + output = prepare_output(data, port, TEST_EDID_BASE);
> > > > + connector = chamelium_port_get_connector(data->chamelium, port, false);
> > > > + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> > > > + igt_assert(primary);
> > > > +
> > > > + igt_assert(connector->count_modes > 0);
> > > > + for (i = 0; i < connector->count_modes; i++) {
> > > > + drmModeModeInfo *mode = &connector->modes[i];
> > > > +
> > > > + fb_id = igt_create_color_pattern_fb(data->drm_fd,
> > > > + mode->hdisplay, mode->vdisplay,
> > > > + DRM_FORMAT_XRGB8888,
> > > > + LOCAL_DRM_FORMAT_MOD_NONE,
> > > > + 0, 0, 0, &fb);
> > >
> > > Creating a new FB might be a little slow on some machines. Why not reuse
> > > the same FB and scale it up and down? Or even better, why set an FB at all?
> >
> > I don't think you can do a modeset without a FB.
> >
> > I'm also not sure scaling is always supported. Maybe we could create
> > multiple FBs with different sizes from the same dumb buffer.
>
> Fair-enough! Maybe we could add debug messages in
> igt_create_color_pattern_fb to tell how long this takes?
Indeed :)
/me adds to todo-list
> > > > + igt_assert(fb_id > 0);
> > > > +
> > > > + enable_output(data, port, output, mode, &fb);
> > > > +
> > > > + /* Trigger the FSM */
> > > > + chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 0);
> > > > +
> > > > + check_mode(data->chamelium, port, mode);
> > > > +
> > > > + igt_remove_fb(data->drm_fd, &fb);
> > > > + }
> > > > +
> > > > + drmModeFreeConnector(connector);
> > > > +}
> > > > +
> > > >
> > > > /* Playback parameters control the audio signal we synthesize and send */
> > > > #define PLAYBACK_CHANNELS 2
> > > > @@ -2160,6 +2264,9 @@ igt_main
> > > > connector_subtest("dp-frame-dump", DisplayPort)
> > > > test_display_frame_dump(&data, port);
> > > >
> > > > + connector_subtest("dp-modes", DisplayPort)
> > > > + test_modes(&data, port);
> > >
> > > dp-modes-check?
> >
> > I'm not a fan of adding "check" in test names, because it seems
> > redundant. It's a test, so yes it's going to check something…
>
> That is a fair point :D How about dp-mode-timings?
Works for me!
> > > The series is:
> > >
> > > Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
> > >
> > > However, I would really like to see if we can run this test under 30s
> > > (unlike testdisplay).
> >
> > Yeah, that's really not happening right now. It takes 38s on my
> > machine.
> >
> > The modesets are taking a long time. I'm not sure we can do anything
> > about it.
>
> Well, we can: Reduce the amount of them by crafting a better EDID that
> would check what we want to check.
>
> I am still OK with merging it for now, but more work is needed to make
> it better!
Oh right. I suppose we could even expose just one or two modes each
time, picked at random from a list.
> Martin
> > > Martin
> > >
> > > > +
> > > > connector_subtest("dp-audio", DisplayPort)
> > > > test_display_audio(&data, port, "HDMI",
> > > > TEST_EDID_DP_AUDIO);
> > > > @@ -2315,6 +2422,9 @@ igt_main
> > > > connector_subtest("hdmi-frame-dump", HDMIA)
> > > > test_display_frame_dump(&data, port);
> > > >
> > > > + connector_subtest("hdmi-modes", HDMIA)
> > > > + test_modes(&data, port);
> > > > +
> > > > connector_subtest("hdmi-audio", HDMIA)
> > > > test_display_audio(&data, port, "HDMI",
> > > > TEST_EDID_HDMI_AUDIO);
> > > >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> >
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-07-17 14:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03 7:57 [igt-dev] [PATCH i-g-t 1/3] lib/igt_chamelium: add chamelium_port_get_video_params Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_chamelium: add chamelium_supports_get_video_params Simon Ser
2019-07-03 7:57 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_chamelium: add a test checking modes Simon Ser
2019-07-03 14:14 ` Peres, Martin
2019-07-04 7:25 ` Ser, Simon
2019-07-17 13:26 ` Martin Peres
2019-07-17 14:36 ` Ser, Simon
2019-07-03 8:32 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib/igt_chamelium: add chamelium_port_get_video_params Patchwork
2019-07-04 1:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox