All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Steven Price <steven.price@arm.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Alyssa Rosenzweig <alyssa@collabora.com>,
	igt-dev@lists.freedesktop.org, Rob Herring <robh+dt@kernel.org>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [igt-dev] [PATCH 3/7] lib/panfrost: Add a helper to create a job loop
Date: Mon, 21 Jun 2021 16:29:32 +0200	[thread overview]
Message-ID: <20210621162932.273f2a52@collabora.com> (raw)
In-Reply-To: <7e6257fc-a29a-c0d1-58c8-da518a127861@arm.com>

On Mon, 21 Jun 2021 15:09:28 +0100
Steven Price <steven.price@arm.com> wrote:

> On 21/06/2021 14:35, Alyssa Rosenzweig wrote:
> > I don't see how this test works.
> >   
> >> +        struct mali_payload_set_value payload = {
> >> +                .unknown = 3,
> >> +        };  
> > 
> > 0x3 is the selector for "zero".
> >   
> >> +        payload.out = header.next_job_64 = submit->submit_bo->offset + ALIGN(sizeof(header) + sizeof(payload), 64);  
> > 
> > So you are writing 0 to the next_job_64 field, which ends the job chain
> > prematurely.
> > 
> > Perhaps you meant to use an "immediate 64" selector to write the address
> > to jump to? If so, that will be Bifrost only, since the "immediate 64"
> > selector is new in Midgard. 
> > 
> > Upon a second reading, maybe the idea is to ping-pong the jobs
> > statically? I.e. two jobs that have next_job pointed to one another,
> > a job barrier and prefetching disabled, with the content irrelevant. If
> > so, the `out` value can be the same for both and allocate upfront with
> > the payload so the logic is clearer. Even better, I think you could use
> > NULL jobs for the same purpose.
> >   
> 
> I think this is overwriting the status field on the next job. The
> hardware checks that job header to make sure the status field is zero
> before executing (precisely to avoid such a loop happening by accident).
> So two (or more) jobs where the next-job pointers are in a loop works as
> long as you clear the status fields.

Exactly.

> 
> As a side-note: this is very much in the not-really-supported area of
> the hardware. The architecture doesn't prevent the GPU from reading
> ahead in the job chain and rejecting a job before the write-value
> happens.

Good to know. I thought the barrier and no_prefetch flags would prevent
that from happening.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2021-06-21 14:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 12:57 [igt-dev] [PATCH 0/7] tests/panfrost: Misc fixes/improvements Boris Brezillon
2021-06-21 12:57 ` [igt-dev] [PATCH 1/7] tests/panfrost: Make sure we open a DUMB capable node for prime tests Boris Brezillon
2021-06-21 17:00   ` Petri Latvala
2021-06-22  6:52     ` Boris Brezillon
2021-06-21 12:57 ` [igt-dev] [PATCH 2/7] lib/panfrost: Handle the NULL case in igt_panfrost_free_bo() Boris Brezillon
2021-06-21 12:57 ` [igt-dev] [PATCH 3/7] lib/panfrost: Add a helper to create a job loop Boris Brezillon
2021-06-21 13:35   ` Alyssa Rosenzweig
2021-06-21 14:09     ` Steven Price
2021-06-21 14:29       ` Boris Brezillon [this message]
2021-06-21 14:18     ` Boris Brezillon
2021-06-21 16:02       ` Alyssa Rosenzweig
2021-06-21 12:57 ` [igt-dev] [PATCH 4/7] lib/panfrost: Add a helper to create a NULL job Boris Brezillon
2021-06-21 12:57 ` [igt-dev] [PATCH 5/7] tests/panfrost: Simplify submit tests Boris Brezillon
2021-06-21 13:36   ` Alyssa Rosenzweig
2021-06-21 12:57 ` [igt-dev] [PATCH 6/7] lib/panfrost: Get rid of igt_panfrost_trivial_job() Boris Brezillon
2021-06-21 13:37   ` Alyssa Rosenzweig
2021-06-21 12:57 ` [igt-dev] [PATCH 7/7] tests/panfrost: Test FD-close while jobs are still in-flight Boris Brezillon
2021-06-21 13:37   ` Alyssa Rosenzweig
2021-06-21 13:49 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/panfrost: Misc fixes/improvements Patchwork
2021-06-21 15:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210621162932.273f2a52@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=alyssa@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=steven.price@arm.com \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.