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 Move hint setting nearer...
details: https://anonhg.NetBSD.org/src/rev/857baaeea787
branches: trunk
changeset: 366184:857baaeea787
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 13:43:22 2018 +0000
description:
Move hint setting nearer to uvm_map for clarity. CTASSERT page size.
Elsewhere this code says 4096, rather than PAGE_SIZE. PAGE_SIZE is
the smallest unit that uvm_map accepts, so it had better match.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r a19cd87bad31 -r 857baaeea787 sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c Mon Aug 27 13:43:12 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem_render_state.c Mon Aug 27 13:43:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_gem_render_state.c,v 1.6 2018/08/27 13:43:12 riastradh Exp $ */
+/* $NetBSD: i915_gem_render_state.c,v 1.7 2018/08/27 13:43:22 riastradh Exp $ */
/*
* Copyright © 2014 Intel Corporation
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_render_state.c,v 1.6 2018/08/27 13:43:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_render_state.c,v 1.7 2018/08/27 13:43:22 riastradh Exp $");
#include "i915_drv.h"
#include "intel_renderstate.h"
@@ -101,7 +101,7 @@
const struct intel_renderstate_rodata *rodata = so->rodata;
unsigned int i = 0, reloc_index = 0;
#ifdef __NetBSD__
- vaddr_t kva = 0; /* hint */
+ vaddr_t kva;
#else
struct page *page;
#endif
@@ -113,6 +113,8 @@
return ret;
#ifdef __NetBSD__
+ CTASSERT(PAGE_SIZE == 4096);
+ kva = 0; /* hint */
/* XXX errno NetBSD->Linux */
ret = -uvm_map(kernel_map, &kva, PAGE_SIZE, so->obj->base.filp, 0,
sizeof(*d), UVM_MAPFLAG(UVM_PROT_W, UVM_PROT_W, UVM_INH_NONE,
Home |
Main Index |
Thread Index |
Old Index