[Intel-gfx] [PATCH 1/1] drm/i915/selftests: Align igt_spinner_create_request with hangcheck

Matt Roper matthew.d.roper at intel.com
Thu Aug 10 22:37:12 UTC 2023


On Thu, Aug 10, 2023 at 03:34:35PM -0700, Matt Roper wrote:
> On Thu, Aug 10, 2023 at 01:36:20PM -0700, Jonathan Cavitt wrote:
> > Align igt_spinner_create_request with the hang_create_request
> > implementation in selftest_hangcheck.c.
> > 
> > Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> > ---
> >  drivers/gpu/drm/i915/selftests/igt_spinner.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/selftests/igt_spinner.c b/drivers/gpu/drm/i915/selftests/igt_spinner.c
> > index 0f064930ef11..8c3e1f20e5a1 100644
> > --- a/drivers/gpu/drm/i915/selftests/igt_spinner.c
> > +++ b/drivers/gpu/drm/i915/selftests/igt_spinner.c
> > @@ -179,6 +179,9 @@ igt_spinner_create_request(struct igt_spinner *spin,
> >  
> >  	*batch++ = arbitration_command;
> >  
> > +	memset32(batch, MI_NOOP, 128);
> > +	batch += 128;
> > +
> 
> This doesn't look like what you intended.  You zeroed out 128 bytes, but
> then jumped your batch cursor forward 128 dwords (512 bytes).

Actually, nevermind; you used memset32 here (whereas I was looking at
the memset() in selftest_hangcheck.c that you indicated you were
matching.  So the sizes do match up.


Matt

> 
> 
> Matt
> 
> >  	if (GRAPHICS_VER(rq->i915) >= 8)
> >  		*batch++ = MI_BATCH_BUFFER_START | BIT(8) | 1;
> >  	else if (IS_HASWELL(rq->i915))
> > -- 
> > 2.25.1
> > 
> 
> -- 
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-gfx mailing list