aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-12-07 23:03:47 -0500
committerDave Airlie <airlied@redhat.com>2009-12-07 23:03:47 -0500
commit3ff99164f67aae78a2bd2313f65ad55bddb1ffea (patch)
treed6bba03616d1be6ab9e6d9e92641a6f4047e1e15 /include/drm/drmP.h
parent1bd049fa895f9c6743f38b52ce14775f5a31ea63 (diff)
parentf2b115e69d46344ae7afcaad5823496d2a0d8650 (diff)
Merge remote branch 'anholt/drm-intel-next' into drm-linus
This merges the upstream Intel tree and fixes up numerous conflicts due to patches merged into Linus tree later in -rc cycle. Conflicts: drivers/char/agp/intel-agp.c drivers/gpu/drm/drm_dp_i2c_helper.c drivers/gpu/drm/i915/i915_irq.c drivers/gpu/drm/i915/i915_suspend.c
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index db56a6add5de..19ef8ebdc662 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1300,6 +1300,7 @@ extern u32 drm_vblank_count(struct drm_device *dev, int crtc);
1300extern void drm_handle_vblank(struct drm_device *dev, int crtc); 1300extern void drm_handle_vblank(struct drm_device *dev, int crtc);
1301extern int drm_vblank_get(struct drm_device *dev, int crtc); 1301extern int drm_vblank_get(struct drm_device *dev, int crtc);
1302extern void drm_vblank_put(struct drm_device *dev, int crtc); 1302extern void drm_vblank_put(struct drm_device *dev, int crtc);
1303extern void drm_vblank_off(struct drm_device *dev, int crtc);
1303extern void drm_vblank_cleanup(struct drm_device *dev); 1304extern void drm_vblank_cleanup(struct drm_device *dev);
1304/* Modesetting support */ 1305/* Modesetting support */
1305extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); 1306extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
@@ -1524,14 +1525,27 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map)
1524 1525
1525static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) 1526static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
1526{ 1527{
1528 if (size != 0 && nmemb > ULONG_MAX / size)
1529 return NULL;
1530
1527 if (size * nmemb <= PAGE_SIZE) 1531 if (size * nmemb <= PAGE_SIZE)
1528 return kcalloc(nmemb, size, GFP_KERNEL); 1532 return kcalloc(nmemb, size, GFP_KERNEL);
1529 1533
1534 return __vmalloc(size * nmemb,
1535 GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
1536}
1537
1538/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
1539static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
1540{
1530 if (size != 0 && nmemb > ULONG_MAX / size) 1541 if (size != 0 && nmemb > ULONG_MAX / size)
1531 return NULL; 1542 return NULL;
1532 1543
1544 if (size * nmemb <= PAGE_SIZE)
1545 return kmalloc(nmemb * size, GFP_KERNEL);
1546
1533 return __vmalloc(size * nmemb, 1547 return __vmalloc(size * nmemb,
1534 GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); 1548 GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
1535} 1549}
1536 1550
1537static __inline void drm_free_large(void *ptr) 1551static __inline void drm_free_large(void *ptr)