Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/libdrm/dist reduce diff to upstream
details: https://anonhg.NetBSD.org/xsrc/rev/7157d682b0e8
branches: trunk
changeset: 10093:7157d682b0e8
user: tnn <tnn%NetBSD.org@localhost>
date: Sat Jan 19 11:50:05 2019 +0000
description:
reduce diff to upstream
diffstat:
external/mit/libdrm/dist/intel/intel_bufmgr_gem.c | 8 +++++---
external/mit/libdrm/dist/radeon/radeon_bo_gem.c | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r a52e2376d7db -r 7157d682b0e8 external/mit/libdrm/dist/intel/intel_bufmgr_gem.c
--- a/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c Fri Jan 18 23:06:21 2019 +0000
+++ b/external/mit/libdrm/dist/intel/intel_bufmgr_gem.c Sat Jan 19 11:50:05 2019 +0000
@@ -1539,10 +1539,12 @@
}
/* and mmap it */
- ret = drmMap(bufmgr_gem->fd, mmap_arg.offset, bo->size,
- &bo_gem->gtt_virtual);
- if (ret) {
+ bo_gem->gtt_virtual = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE,
+ MAP_SHARED, bufmgr_gem->fd,
+ mmap_arg.offset);
+ if (bo_gem->gtt_virtual == MAP_FAILED) {
bo_gem->gtt_virtual = NULL;
+ ret = -errno;
DBG("%s:%d: Error mapping buffer %d (%s): %s .\n",
__FILE__, __LINE__,
bo_gem->gem_handle, bo_gem->name,
diff -r a52e2376d7db -r 7157d682b0e8 external/mit/libdrm/dist/radeon/radeon_bo_gem.c
--- a/external/mit/libdrm/dist/radeon/radeon_bo_gem.c Fri Jan 18 23:06:21 2019 +0000
+++ b/external/mit/libdrm/dist/radeon/radeon_bo_gem.c Sat Jan 19 11:50:05 2019 +0000
@@ -175,8 +175,8 @@
boi, boi->handle, r);
return r;
}
- r = drmMap(boi->bom->fd, args.addr_ptr, args.size, &ptr);
- if (r)
+ ptr = drm_mmap(0, args.size, PROT_READ|PROT_WRITE, MAP_SHARED, boi->bom->fd, args.addr_ptr);
+ if (ptr == MAP_FAILED)
return -errno;
bo_gem->priv_ptr = ptr;
wait:
Home |
Main Index |
Thread Index |
Old Index