[i-g-t,2/3] tests/kms_chamelium: Increase HPD storm threshold to 10 from 1

Submitted by Lyude Paul on Nov. 21, 2018, 12:33 a.m.

Details

Message ID 20181121003338.16956-3-lyude@redhat.com
State New
Series "Add tests for HPD short storm detection"
Headers show

Commit Message

Lyude Paul Nov. 21, 2018, 12:33 a.m.
From: Lyude Paul <lyude@redhat.com>

This is to adjust for the changes to how long pulses are counted towards
HPD storms that were made in https://patchwork.freedesktop.org/patch/260597/

Also, update the appropriate documentation in igt to reflect this.

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 lib/igt_debugfs.c     | 3 +++
 tests/kms_chamelium.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index a3aca846..358b4cab 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -557,6 +557,9 @@  static void igt_hpd_storm_exit_handler(int sig)
  * through debugfs. Useful for hotplugging tests where HPD storm detection
  * might get in the way and slow things down.
  *
+ * Note that each long HPD pulse will count as 10 towards the threshold, and
+ * short HPD pulses (if enabled) will count as 1 towards the threshold.
+ *
  * If the system does not support HPD storm detection, this function does
  * nothing.
  *
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index f051344d..0097dbcc 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -742,7 +742,7 @@  test_hpd_storm_detect(data_t *data, struct chamelium_port *port, int width)
 	igt_require_hpd_storm_ctl(data->drm_fd);
 	reset_state(data, port);
 
-	igt_hpd_storm_set_threshold(data->drm_fd, 1);
+	igt_hpd_storm_set_threshold(data->drm_fd, 10);
 	chamelium_fire_hpd_pulses(data->chamelium, port, width, 10, false);
 	igt_assert(igt_hpd_storm_detected(data->drm_fd));
 

Comments

Ville Syrjälä Dec. 11, 2018, 4:56 p.m.
On Tue, Nov 20, 2018 at 07:33:37PM -0500, Lyude wrote:
> From: Lyude Paul <lyude@redhat.com>
> 
> This is to adjust for the changes to how long pulses are counted towards
> HPD storms that were made in https://patchwork.freedesktop.org/patch/260597/
> 
> Also, update the appropriate documentation in igt to reflect this.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>


> ---
>  lib/igt_debugfs.c     | 3 +++
>  tests/kms_chamelium.c | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index a3aca846..358b4cab 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -557,6 +557,9 @@ static void igt_hpd_storm_exit_handler(int sig)
>   * through debugfs. Useful for hotplugging tests where HPD storm detection
>   * might get in the way and slow things down.
>   *
> + * Note that each long HPD pulse will count as 10 towards the threshold, and
> + * short HPD pulses (if enabled) will count as 1 towards the threshold.
> + *
>   * If the system does not support HPD storm detection, this function does
>   * nothing.
>   *
> diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
> index f051344d..0097dbcc 100644
> --- a/tests/kms_chamelium.c
> +++ b/tests/kms_chamelium.c
> @@ -742,7 +742,7 @@ test_hpd_storm_detect(data_t *data, struct chamelium_port *port, int width)
>  	igt_require_hpd_storm_ctl(data->drm_fd);
>  	reset_state(data, port);
>  
> -	igt_hpd_storm_set_threshold(data->drm_fd, 1);
> +	igt_hpd_storm_set_threshold(data->drm_fd, 10);

Old threshold was one long hpd with old kernel new one is one long hpd
with new kernel. Seems consistent.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	chamelium_fire_hpd_pulses(data->chamelium, port, width, 10, false);
>  	igt_assert(igt_hpd_storm_detected(data->drm_fd));
>  
> -- 
> 2.19.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev