[PATCH 1/2] lib/amd: check output has hpd before trigger hotplug
Harry Wentland
harry.wentland at amd.com
Thu Mar 21 13:56:14 UTC 2024
On 2024-03-20 22:03, Alex Hung wrote:
> With commit ff1d9a601 writeback connector will be enabled and it has no
> hotplug capability. As a result, this function always fails for such
> cases. This is fixed by checking HDP in advance.
>
> Signed-off-by: Alex Hung <alex.hung at amd.com>
Reviewed-by: Harry Wentland <harry.wentland at amd.com>
Harry
> ---
> lib/igt_amd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c
> index d0b53c08a..623883dbc 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -799,6 +799,9 @@ int igt_amd_trigger_hotplug(int drm_fd, char *connector_name)
> int wr_len;
> const char *enable_hpd = "1";
>
> + if (!igt_amd_output_has_hpd(drm_fd, connector_name))
> + return 0;
> +
> fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
> igt_assert(fd >= 0);
> hpd_fd = openat(fd, DEBUGFS_HPD_TRIGGER, O_WRONLY);
More information about the igt-dev
mailing list