[PATCH i-g-t v2 1/1] tests/kms_invalid_mode: Add ultrajoiner support to adjust_mode_clock_too_high

Samala, Pranay pranay.samala at intel.com
Thu Dec 12 07:58:59 UTC 2024



> -----Original Message-----
> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
> Sent: Thursday, December 12, 2024 10:09 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Samala, Pranay <pranay.samala at intel.com>; B S, Karthik
> <karthik.b.s at intel.com>; Reddy Guddati, Santhosh
> <santhosh.reddy.guddati at intel.com>
> Subject: [PATCH i-g-t v2 1/1] tests/kms_invalid_mode: Add ultrajoiner support to
> adjust_mode_clock_too_high
> 
> Check ultrajoiner support on the output and adjust `max_dotclock` accordingly.
> 
> v2: remove extra parenthesis, indentation (Pranay)
> 
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
LGTM.
Reviewed-by: Pranay Samala <pranay.samala at intel.com>
> ---
>  tests/kms_invalid_mode.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c index
> 4fd644594..0c0765ec0 100644
> --- a/tests/kms_invalid_mode.c
> +++ b/tests/kms_invalid_mode.c
> @@ -34,6 +34,7 @@
>   */
> 
>  #include "igt.h"
> +#include "xe/xe_query.h"
>  #include <limits.h>
>  #include <stdbool.h>
> 
> @@ -99,6 +100,28 @@ can_bigjoiner(data_t *data)
>  	return false;
>  }
> 
> +static bool
> +can_ultrajoiner(data_t *data)
> +{
> +	bool ultra_joiner_supported = false;
> +	bool is_dgfx;
> +	int display_ver;
> +
> +	is_dgfx = is_xe_device(data->drm_fd) ? xe_has_vram(data->drm_fd) :
> +					       gem_has_lmem(data->drm_fd);
> +	display_ver = intel_display_ver(intel_get_drm_devid(data->drm_fd));
> +
> +	if ((is_dgfx && display_ver == 14) || display_ver > 14)
> +		ultra_joiner_supported = true;
> +
> +	if (ultra_joiner_supported) {
> +		igt_debug("Platform supports ultrajoiner\n");
> +		return true;
> +	}
> +
> +	return false;
> +}
> +
>  static bool
>  adjust_mode_clock_too_high(data_t *data, drmModeModeInfoPtr mode)  { @@
> -128,6 +151,12 @@ adjust_mode_clock_too_high(data_t *data,
> drmModeModeInfoPtr mode)
>  		max_dotclock *= 2;
>  	}
> 
> +	if (can_ultrajoiner(data)) {
> +		igt_info("Platform supports ultrajoiner with %s\n",
> +			 data->output->name);
> +		max_dotclock *= 4;
> +	}
> +
>  	mode->clock = max_dotclock + 1;
> 
>  	return true;
> --
> 2.34.1



More information about the igt-dev mailing list