xf86-video-intel: 2 commits - src/legacy/i810 src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 26 05:19:17 PST 2015
src/legacy/i810/i810_memory.c | 6 +++---
src/sna/kgem.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 64e9c79017cb4bdb2dc18920ba9dcea0f9cea1a8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 26 13:10:21 2015 +0000
legacy/i810: Expand mask to match unsigned long
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/legacy/i810/i810_memory.c b/src/legacy/i810/i810_memory.c
index c3de277..6f27483 100644
--- a/src/legacy/i810/i810_memory.c
+++ b/src/legacy/i810/i810_memory.c
@@ -76,7 +76,7 @@ I810AllocateGARTMemory(ScrnInfoPtr pScrn)
unsigned long size = pScrn->videoRam * 1024UL;
I810Ptr pI810 = I810PTR(pScrn);
int key;
- long tom = 0;
+ unsigned long tom = 0;
unsigned long physical;
if (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex)) {
@@ -132,8 +132,8 @@ I810AllocateGARTMemory(ScrnInfoPtr pScrn)
* Keep it 512K aligned for the sake of tiled regions.
*/
- tom += 0x7ffff;
- tom &= ~0x7ffff;
+ tom += 0x7ffffUL;
+ tom &= ~0x7ffffUL;
if ((key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 1, NULL)) != -1) {
pI810->DcacheOffset = tom;
commit 33f7d5e4283d5c63eb1af287fece6af0f8e51feb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 26 13:10:21 2015 +0000
sna: Expand mask to match uintptr_t
Let's make sure we mask all the uintptr_t bits.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index c9c651e..4f1f5e0 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -6417,8 +6417,8 @@ struct kgem_bo *kgem_create_map(struct kgem *kgem,
first_page = (uintptr_t)ptr;
last_page = first_page + size + PAGE_SIZE - 1;
- first_page &= ~(PAGE_SIZE-1);
- last_page &= ~(PAGE_SIZE-1);
+ first_page &= ~(uintptr_t)(PAGE_SIZE-1);
+ last_page &= ~(uintptr_t)(PAGE_SIZE-1);
assert(last_page > first_page);
handle = gem_userptr(kgem->fd,
More information about the xorg-commit
mailing list