From 64e9c79017cb4bdb2dc18920ba9dcea0f9cea1a8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 26 Jan 2015 13:10:21 +0000 Subject: [PATCH] legacy/i810: Expand mask to match unsigned long Signed-off-by: Chris Wilson --- src/legacy/i810/i810_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/legacy/i810/i810_memory.c b/src/legacy/i810/i810_memory.c index c3de2777..6f274836 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;