nouveau: mask push buffer length pushbuf_dump
authorKarol Herbst <kherbst@redhat.com>
Sun, 3 May 2020 14:21:09 +0000 (16:21 +0200)
committerKarol Herbst <kherbst@redhat.com>
Thu, 6 May 2021 17:41:09 +0000 (19:41 +0200)
nvc0 sets the NVC0_IB_ENTRY_1_NO_PREFETCH bit on some pushbuffers

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
nouveau/pushbuf.c

index 363ff0fcaf8c64ffd899893fb0f46655e71ada7e..7f1ed8caa30650beb64ca3f132c3d141a0583c15 100644 (file)
@@ -292,7 +292,7 @@ pushbuf_dump(struct nouveau_pushbuf_krec *krec, int krec_id, int chid)
                kref = krec->buffer + kpsh->bo_index;
                bo = (void *)(unsigned long)kref->user_priv;
                bgn = (uint32_t *)((char *)bo->map + kpsh->offset);
-               end = bgn + (kpsh->length /4);
+               end = bgn + ((kpsh->length & 0x7fffff) /4);
 
                err("ch%d: psh %s%08x %010llx %010llx\n", chid,
                    bo->map ? "" : "(unmapped) ", kpsh->bo_index,