drm: fixup page alignment on SAREA map on ppc64
parent
2dd3c039fd
commit
f7affda35b
|
@ -46,7 +46,7 @@ static int drm_setup(drm_device_t * dev)
|
||||||
drm_local_map_t *map;
|
drm_local_map_t *map;
|
||||||
int i;
|
int i;
|
||||||
int ret;
|
int ret;
|
||||||
|
int sareapage;
|
||||||
|
|
||||||
if (dev->driver->firstopen) {
|
if (dev->driver->firstopen) {
|
||||||
ret = dev->driver->firstopen(dev);
|
ret = dev->driver->firstopen(dev);
|
||||||
|
@ -57,8 +57,8 @@ static int drm_setup(drm_device_t * dev)
|
||||||
dev->magicfree.next = NULL;
|
dev->magicfree.next = NULL;
|
||||||
|
|
||||||
/* prebuild the SAREA */
|
/* prebuild the SAREA */
|
||||||
|
sareapage = max(SAREA_MAX, PAGE_SIZE);
|
||||||
i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM, _DRM_CONTAINS_LOCK, &map);
|
i = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK, &map);
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#define SAREA_MAX 0x10000 /* 64kB */
|
#define SAREA_MAX 0x10000 /* 64kB */
|
||||||
#else
|
#else
|
||||||
/* Intel 830M driver needs at least 8k SAREA */
|
/* Intel 830M driver needs at least 8k SAREA */
|
||||||
#define SAREA_MAX 0x2000
|
#define SAREA_MAX 0x2000UL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Maximum number of drawables in the SAREA */
|
/** Maximum number of drawables in the SAREA */
|
||||||
|
|
Loading…
Reference in New Issue