Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/dist/drm/i915 i915_gem_object...
details: https://anonhg.NetBSD.org/src/rev/fe69d81ac944
branches: riastradh-drm2
changeset: 788607:fe69d81ac944
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Jan 21 20:49:01 2014 +0000
description:
i915_gem_object_get_page takes a page number, not byte offset.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h | 3 ++-
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r a67648b3bedc -r fe69d81ac944 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Tue Jan 21 20:48:52 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Tue Jan 21 20:49:01 2014 +0000
@@ -1457,7 +1457,8 @@
*/
KASSERT(obj->pages != NULL);
mutex_enter(obj->base.gemo_shm_uao->vmobjlock);
- struct vm_page *const page = uvm_pagelookup(obj->base.gemo_shm_uao, n);
+ struct vm_page *const page = uvm_pagelookup(obj->base.gemo_shm_uao,
+ ptoa(n));
mutex_exit(obj->base.gemo_shm_uao->vmobjlock);
return container_of(page, struct page, p_vmp);
diff -r a67648b3bedc -r fe69d81ac944 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Tue Jan 21 20:48:52 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Tue Jan 21 20:49:01 2014 +0000
@@ -500,7 +500,7 @@
KASSERT(shmem_page_offset < PAGE_SIZE);
page_length = MIN(remain, (PAGE_SIZE - shmem_page_offset));
struct page *const page = i915_gem_object_get_page(obj,
- (offset & ~(PAGE_SIZE-1)));
+ atop(offset));
/* Decide whether to swizzle bit 17. */
page_do_bit17_swizzling = obj_do_bit17_swizzling &&
@@ -885,7 +885,7 @@
KASSERT(shmem_page_offset < PAGE_SIZE);
page_length = MIN(remain, (PAGE_SIZE - shmem_page_offset));
struct page *const page = i915_gem_object_get_page(obj,
- (offset & ~(PAGE_SIZE-1)));
+ atop(offset));
/* Decide whether to flush the cache or swizzle bit 17. */
const bool partial_cacheline_write = needs_clflush_before &&
Home |
Main Index |
Thread Index |
Old Index