[igt-dev] [PATCH] [i-g-t] lib/igt_amd: add delay waiting for hotplug complete

Alex Hung alex.hung at amd.com
Tue Apr 25 22:59:32 UTC 2023


Reviewed-by: Alex Hung <alex.hung at amd.com>

On 2023-04-24 07:06, Hersen Wu wrote:
> when run amd tests, amd_hotplug, amd_link_setings, in patch,
> amd_link_settings be skipped. debugfs_hpd_trigger requests
> kernel to generate hot plug event, but not wait for process
> finish.it takes time for kernel and user mode components to
> complete process for hot plug.
> 
> Signed-off-by: Hersen Wu <hersenxs.wu at amd.com>
> ---
>   lib/igt_amd.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c
> index bef9c193..09923101 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -799,6 +799,8 @@ int igt_amd_trigger_hotplug(int drm_fd, char *connector_name)
>           wr_len = write(hpd_fd, enable_hpd, strlen(enable_hpd));
>           close(hpd_fd);
>           igt_assert_eq(wr_len, strlen(enable_hpd));
> +	/* wait for hotplug process complete by kernel and user mode components */
> +	sleep(30);
>   
>           return 0;
>   }


More information about the igt-dev mailing list