Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915/gt Enable the scratch_or...
details: https://anonhg.NetBSD.org/src/rev/05c66fb15a15
branches: trunk
changeset: 1028505:05c66fb15a15
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:12:13 2021 +0000
description:
Enable the scratch_order code and not have our own.
Now there's multiple scratch pages. Maybe it's best to follow
what upstream does here.
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.c | 8 ++++----
sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.h | 6 +-----
2 files changed, 5 insertions(+), 9 deletions(-)
diffs (65 lines):
diff -r c37ca3f3ff6c -r 05c66fb15a15 sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.c Sun Dec 19 11:12:06 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.c Sun Dec 19 11:12:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_gtt.c,v 1.4 2021/12/19 01:35:35 riastradh Exp $ */
+/* $NetBSD: intel_gtt.c,v 1.5 2021/12/19 11:12:13 riastradh Exp $ */
// SPDX-License-Identifier: MIT
/*
@@ -6,7 +6,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_gtt.c,v 1.4 2021/12/19 01:35:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_gtt.c,v 1.5 2021/12/19 11:12:13 riastradh Exp $");
#include <linux/slab.h> /* fault-inject.h is not standalone! */
@@ -387,6 +387,7 @@
gfp |= __GFP_ZERO | __GFP_RETRY_MAYFAIL;
do {
+ unsigned int order = get_order(size);
#ifdef __NetBSD__
struct vm_page *vm_page;
void *kva;
@@ -429,7 +430,6 @@
vm->scratch_page.page = container_of(vm_page, struct page,
p_vmp);
#else
- unsigned int order = get_order(size);
struct page *page;
dma_addr_t addr;
@@ -450,8 +450,8 @@
vm->scratch[0].base.page = page;
vm->scratch[0].base.daddr = addr;
+#endif
vm->scratch_order = order;
-#endif
return 0;
#ifdef __NetBSD__
diff -r c37ca3f3ff6c -r 05c66fb15a15 sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.h
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.h Sun Dec 19 11:12:06 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_gtt.h Sun Dec 19 11:12:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intel_gtt.h,v 1.5 2021/12/19 11:11:03 riastradh Exp $ */
+/* $NetBSD: intel_gtt.h,v 1.6 2021/12/19 11:12:13 riastradh Exp $ */
/* SPDX-License-Identifier: MIT */
/*
@@ -415,11 +415,7 @@
static inline bool
i915_vm_has_scratch_64K(struct i915_address_space *vm)
{
-#ifdef __NetBSD__
- return vm->scratch_page.seg.ds_len == I915_GTT_PAGE_SIZE_64K;
-#else
return vm->scratch_order == get_order(I915_GTT_PAGE_SIZE_64K);
-#endif
}
static inline bool
Home |
Main Index |
Thread Index |
Old Index