summaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-12-08 14:03:47 +1000
committerDave Airlie <airlied@redhat.com>2009-12-08 14:03:47 +1000
commit3ff99164f67aae78a2bd2313f65ad55bddb1ffea (patch)
treed6bba03616d1be6ab9e6d9e92641a6f4047e1e15 /include/drm/drmP.h
parent1bd049fa895f9c6743f38b52ce14775f5a31ea63 (diff)
parentf2b115e69d46344ae7afcaad5823496d2a0d8650 (diff)
downloadop-kernel-dev-3ff99164f67aae78a2bd2313f65ad55bddb1ffea.zip
op-kernel-dev-3ff99164f67aae78a2bd2313f65ad55bddb1ffea.tar.gz
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 db56a6a..19ef8eb 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);
extern void drm_handle_vblank(struct drm_device *dev, int crtc);
extern int drm_vblank_get(struct drm_device *dev, int crtc);
extern void drm_vblank_put(struct drm_device *dev, int crtc);
+extern void drm_vblank_off(struct drm_device *dev, int crtc);
extern void drm_vblank_cleanup(struct drm_device *dev);
/* Modesetting support */
extern 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)
static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
{
+ if (size != 0 && nmemb > ULONG_MAX / size)
+ return NULL;
+
if (size * nmemb <= PAGE_SIZE)
return kcalloc(nmemb, size, GFP_KERNEL);
+ return __vmalloc(size * nmemb,
+ GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
+}
+
+/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
+static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
+{
if (size != 0 && nmemb > ULONG_MAX / size)
return NULL;
+ if (size * nmemb <= PAGE_SIZE)
+ return kmalloc(nmemb * size, GFP_KERNEL);
+
return __vmalloc(size * nmemb,
- GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL);
+ GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
}
static __inline void drm_free_large(void *ptr)
OpenPOWER on IntegriCloud