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

Ch, Sai Gowtham sai.gowtham.ch at intel.com
Thu Jun 22 06:14:09 UTC 2023


> -----Original Message-----
> From: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Sent: Thursday, June 22, 2023 10:16 AM
> To: igt-dev at lists.freedesktop.org; Ch, Sai Gowtham
> <sai.gowtham.ch at intel.com>
> Subject: Re: [i-g-t 1/2] tests/kms_cursor_legacy: Add Spin support for XE
> 
> 
> 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);
LGTM, However be aware we are not using dependency_handle in spinner.

Acked-by: Sai Gowtham Ch <sai.gowtham.ch at intel.com>
> >
> >   	if (atomic)
> >   		igt_require(display->is_atomic);


More information about the igt-dev mailing list