[igt-dev] [i-g-t 1/2] tests/kms_cursor_legacy: Add Spin support for XE

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Thu Jun 22 04:46:03 UTC 2023


On Mon-19-06-2023 02:27 pm, Bhanuprakash Modem wrote:
> To support the SPIN tests for XE, just need to fix the allocator
> handle, since the same spin apis works for both i915 & XE.
> 
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>

Cc: Sai Gowtham Ch <sai.gowtham.ch at intel.com>

> ---
>   tests/kms_cursor_legacy.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index f7a6202cf..1f0f3b7e6 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -595,7 +595,10 @@ static void basic_flip_cursor(igt_display_t *display,
>   	if (flags & BASIC_BUSY)
>   	{
>   		igt_require_intel(display->drm_fd);
> -		ahnd = get_reloc_ahnd(display->drm_fd, 0);
> +
> +		ahnd = is_i915_device(display->drm_fd) ?
> +			get_reloc_ahnd(display->drm_fd, 0) :
> +			intel_allocator_open(display->drm_fd, 0, INTEL_ALLOCATOR_RELOC);
>   	}
>   
>   	if (mode >= flip_test_atomic)
> @@ -1505,7 +1508,9 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
>   	igt_output_t *output;
>   	igt_plane_t *cursor;
>   
> -	ahnd = get_reloc_ahnd(display->drm_fd, 0);
> +	ahnd = is_i915_device(display->drm_fd) ?
> +		get_reloc_ahnd(display->drm_fd, 0) :
> +		intel_allocator_open(display->drm_fd, 0, INTEL_ALLOCATOR_RELOC);
>   
>   	if (atomic)
>   		igt_require(display->is_atomic);


More information about the igt-dev mailing list