Skip to content

Commit 57b3a1e

Browse files
riastradhriastradh
authored andcommitted
i915: Fix unit error gen6_ppgtt_insert_page.
Oops. Probably fixes a few PRs out there, not sure which ones...
1 parent bd74f2c commit 57b3a1e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/* $NetBSD: intel_ggtt.c,v 1.16 2023/07/09 20:24:06 riastradh Exp $ */
1+
/* $NetBSD: intel_ggtt.c,v 1.17 2025/01/26 17:52:23 riastradh Exp $ */
22

33
// SPDX-License-Identifier: MIT
44
/*
55
* Copyright © 2020 Intel Corporation
66
*/
77

88
#include <sys/cdefs.h>
9-
__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.16 2023/07/09 20:24:06 riastradh Exp $");
9+
__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.17 2025/01/26 17:52:23 riastradh Exp $");
1010

1111
#include <linux/stop_machine.h>
1212

@@ -300,7 +300,9 @@ static void gen6_ggtt_insert_page(struct i915_address_space *vm,
300300
#endif
301301

302302
#ifdef __NetBSD__
303-
bus_space_write_4(ggtt->gsmt, ggtt->gsmh, offset / I915_GTT_PAGE_SIZE,
303+
CTASSERT(sizeof(gen6_pte_t) == 4);
304+
bus_space_write_4(ggtt->gsmt, ggtt->gsmh,
305+
sizeof(gen6_pte_t) * (offset / I915_GTT_PAGE_SIZE),
304306
vm->pte_encode(addr, level, flags));
305307
#else
306308
iowrite32(vm->pte_encode(addr, level, flags), pte);

0 commit comments

Comments
 (0)