Ilia Mirkin
2015-Jun-08 11:04 UTC
[Nouveau] [PATCH 4/5] gr/gf100: wait on bottom half of FE's pipeline
A naive question from someone who knows nothing of icmd or bundles... Would it be better to wait for both bits to become 0 (I.e. 0x6)? On Jun 8, 2015 11:54 AM, "Alexandre Courbot" <acourbot at nvidia.com> wrote:> When emitting the ICMD bundle, wait on the bottom half (bit 3 of the > GR_STATUS register) instead of upper half (bit 2) to make sure methods > are effectively emitted. > > Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> > --- > drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drm/nouveau/nvkm/engine/gr/gf100.c > b/drm/nouveau/nvkm/engine/gr/gf100.c > index 5606c25e5d02..01efc2c96045 100644 > --- a/drm/nouveau/nvkm/engine/gr/gf100.c > +++ b/drm/nouveau/nvkm/engine/gr/gf100.c > @@ -699,7 +699,7 @@ gf100_gr_icmd(struct gf100_gr_priv *priv, const struct > gf100_gr_pack *p) > > while (addr < next) { > nv_wr32(priv, 0x400200, addr); > - nv_wait(priv, 0x400700, 0x00000002, 0x00000000); > + nv_wait(priv, 0x400700, 0x00000004, 0x00000000); > addr += init->pitch; > } > } > -- > 2.4.2 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20150608/e8d66bc3/attachment.html>
Alexandre Courbot
2015-Jun-08 13:43 UTC
[Nouveau] [PATCH 4/5] gr/gf100: wait on bottom half of FE's pipeline
On Mon, Jun 8, 2015 at 8:04 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:> A naive question from someone who knows nothing of icmd or bundles... Would > it be better to wait for both bits to become 0 (I.e. 0x6)?My understanding is that a method reaching the bottom half implies it has passed to upper half (whatever these halfs are, I need to dig into the doc to completely figure it out), and thus that while waiting for both bits would do no harm, it would not do any good either. Waiting on the bottom half is what downstream does, so I think this behavior is safe to apply to Nouveau.> > On Jun 8, 2015 11:54 AM, "Alexandre Courbot" <acourbot at nvidia.com> wrote: >> >> When emitting the ICMD bundle, wait on the bottom half (bit 3 of the >> GR_STATUS register) instead of upper half (bit 2) to make sure methods >> are effectively emitted. >> >> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com> >> --- >> drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drm/nouveau/nvkm/engine/gr/gf100.c >> b/drm/nouveau/nvkm/engine/gr/gf100.c >> index 5606c25e5d02..01efc2c96045 100644 >> --- a/drm/nouveau/nvkm/engine/gr/gf100.c >> +++ b/drm/nouveau/nvkm/engine/gr/gf100.c >> @@ -699,7 +699,7 @@ gf100_gr_icmd(struct gf100_gr_priv *priv, const struct >> gf100_gr_pack *p) >> >> while (addr < next) { >> nv_wr32(priv, 0x400200, addr); >> - nv_wait(priv, 0x400700, 0x00000002, 0x00000000); >> + nv_wait(priv, 0x400700, 0x00000004, 0x00000000); >> addr += init->pitch; >> } >> } >> -- >> 2.4.2 >> >> _______________________________________________ >> Nouveau mailing list >> Nouveau at lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/nouveau
Alexandre Courbot
2015-Jun-10 05:25 UTC
[Nouveau] [PATCH 4/5] gr/gf100: wait on bottom half of FE's pipeline
On Mon, Jun 8, 2015 at 10:43 PM, Alexandre Courbot <gnurou at gmail.com> wrote:> On Mon, Jun 8, 2015 at 8:04 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote: >> A naive question from someone who knows nothing of icmd or bundles... Would >> it be better to wait for both bits to become 0 (I.e. 0x6)? > > My understanding is that a method reaching the bottom half implies it > has passed to upper half (whatever these halfs are, I need to dig into > the doc to completely figure it out), and thus that while waiting for > both bits would do no harm, it would not do any good either. > > Waiting on the bottom half is what downstream does, so I think this > behavior is safe to apply to Nouveau.After checking, this seems to be correct. Upper half of the front-end method pipeline corresponds to the decode stage, bottom half to validate and emit. So we need to wait on the bottom half to be sure methods are emitted.
Possibly Parallel Threads
- [PATCH 4/5] gr/gf100: wait on bottom half of FE's pipeline
- [PATCH 2/2] gr/gf100: do not assume a PMU is present
- [PATCH 0/5][GIT PULL] Miscellaneous fixes for GF100+
- [PATCH 2/2] gr/gf100: do not assume a PMU is present
- [PATCH 2/3] ltc/gf100: add flush/invalidate functions