Skip to content

Commit 340ded4

Browse files
committed
filling the buffer at the end in intel_ggtt.c is using a different API on NetBSD.
1 parent 714aed1 commit 340ded4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static void gen8_ggtt_insert_entries(struct i915_address_space *vm,
254254
bus_dmamap_t map = vma->pages->sgl[0].sg_dmamap;
255255
unsigned seg;
256256
unsigned pgno;
257-
unsigned pgextra;
257+
unsigned pgend;
258258
#else
259259
struct sgt_iter sgt_iter;
260260
gen8_pte_t __iomem *gtt_entries;
@@ -278,16 +278,16 @@ static void gen8_ggtt_insert_entries(struct i915_address_space *vm,
278278
KASSERT((len % I915_GTT_PAGE_SIZE) == 0);
279279
for (;
280280
len >= I915_GTT_PAGE_SIZE;
281-
addr += I915_GTT_PAGE_SIZE, len -= I915_GTT_PAGE_SIZE)
281+
addr += I915_GTT_PAGE_SIZE, len -= I915_GTT_PAGE_SIZE) {
282282
gen8_set_pte(ggtt->gsmt, ggtt->gsmh, pgno++,
283283
pte_encode | addr);
284284
}
285285
KASSERT(len == 0);
286286
/* Fill the allocated but "unused" space beyond the end of the buffer */
287287
KASSERT(pgno <= pgend);
288-
for (;pgno<pgend;pgno++)
288+
for (;pgno<pgend;)
289289
{
290-
gen8_set_pte(ggtt->gsmt + pgno, vm->scratch[0].encode);
290+
gen8_set_pte(ggtt->gsmt, ggtt->gsmh, pgno++, vm->scratch[0].encode);
291291
}
292292
}
293293
#else

0 commit comments

Comments
 (0)