diff options
author | Dave Airlie <airlied@redhat.com> | 2009-12-07 23:03:47 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-07 23:03:47 -0500 |
commit | 3ff99164f67aae78a2bd2313f65ad55bddb1ffea (patch) | |
tree | d6bba03616d1be6ab9e6d9e92641a6f4047e1e15 /include/drm/drmP.h | |
parent | 1bd049fa895f9c6743f38b52ce14775f5a31ea63 (diff) | |
parent | f2b115e69d46344ae7afcaad5823496d2a0d8650 (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.h | 16 |
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); | |||
1300 | extern void drm_handle_vblank(struct drm_device *dev, int crtc); | 1300 | extern void drm_handle_vblank(struct drm_device *dev, int crtc); |
1301 | extern int drm_vblank_get(struct drm_device *dev, int crtc); | 1301 | extern int drm_vblank_get(struct drm_device *dev, int crtc); |
1302 | extern void drm_vblank_put(struct drm_device *dev, int crtc); | 1302 | extern void drm_vblank_put(struct drm_device *dev, int crtc); |
1303 | extern void drm_vblank_off(struct drm_device *dev, int crtc); | ||
1303 | extern void drm_vblank_cleanup(struct drm_device *dev); | 1304 | extern void drm_vblank_cleanup(struct drm_device *dev); |
1304 | /* Modesetting support */ | 1305 | /* Modesetting support */ |
1305 | extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc); | 1306 | 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) | |||
1524 | 1525 | ||
1525 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | 1526 | static __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. */ | ||
1539 | static __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 | ||
1537 | static __inline void drm_free_large(void *ptr) | 1551 | static __inline void drm_free_large(void *ptr) |