summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@ppcg5.localdomain>2006-11-06 11:44:36 +1100
committerDave Airlie <airlied@ppcg5.localdomain>2006-11-06 11:44:36 +1100
commitf7affda35bb0c47fbc973725e05847669e215d46 (patch)
treece53454fac6913017640d532eddf3e7770944b54 /linux-core
parent2dd3c039fdbe86db4043abcc69babf768edb3ab8 (diff)
drm: fixup page alignment on SAREA map on ppc64
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_fops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index b60ced34..60ea57a2 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -46,7 +46,7 @@ static int drm_setup(drm_device_t * dev)
drm_local_map_t *map;
int i;
int ret;
-
+ int sareapage;
if (dev->driver->firstopen) {
ret = dev->driver->firstopen(dev);
@@ -57,8 +57,8 @@ static int drm_setup(drm_device_t * dev)
dev->magicfree.next = NULL;
/* prebuild the SAREA */
-
- i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM, _DRM_CONTAINS_LOCK, &map);
+ sareapage = max(SAREA_MAX, PAGE_SIZE);
+ i = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK, &map);
if (i != 0)
return i;