diff options
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drmP.h | 24 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 3 | ||||
-rw-r--r-- | include/drm/drm_crtc_helper.h | 2 |
3 files changed, 29 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index c8c422151431..b84d8ae35e6f 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1519,6 +1519,30 @@ static __inline__ void *drm_calloc(size_t nmemb, size_t size, int area) | |||
1519 | { | 1519 | { |
1520 | return kcalloc(nmemb, size, GFP_KERNEL); | 1520 | return kcalloc(nmemb, size, GFP_KERNEL); |
1521 | } | 1521 | } |
1522 | |||
1523 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
1524 | { | ||
1525 | u8 *addr; | ||
1526 | |||
1527 | if (size <= PAGE_SIZE) | ||
1528 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
1529 | |||
1530 | addr = vmalloc(nmemb * size); | ||
1531 | if (!addr) | ||
1532 | return NULL; | ||
1533 | |||
1534 | memset(addr, 0, nmemb * size); | ||
1535 | |||
1536 | return addr; | ||
1537 | } | ||
1538 | |||
1539 | static __inline void drm_free_large(void *ptr) | ||
1540 | { | ||
1541 | if (!is_vmalloc_addr(ptr)) | ||
1542 | return kfree(ptr); | ||
1543 | |||
1544 | vfree(ptr); | ||
1545 | } | ||
1522 | #else | 1546 | #else |
1523 | extern void *drm_alloc(size_t size, int area); | 1547 | extern void *drm_alloc(size_t size, int area); |
1524 | extern void drm_free(void *pt, size_t size, int area); | 1548 | extern void drm_free(void *pt, size_t size, int area); |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 3c1924c010e8..7300fb866767 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -471,6 +471,9 @@ struct drm_connector { | |||
471 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; | 471 | u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; |
472 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; | 472 | uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; |
473 | 473 | ||
474 | /* requested DPMS state */ | ||
475 | int dpms; | ||
476 | |||
474 | void *helper_private; | 477 | void *helper_private; |
475 | 478 | ||
476 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; | 479 | uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index ec073d8288d9..6769ff6c1bc0 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
@@ -99,6 +99,8 @@ extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, | |||
99 | struct drm_framebuffer *old_fb); | 99 | struct drm_framebuffer *old_fb); |
100 | extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc); | 100 | extern bool drm_helper_crtc_in_use(struct drm_crtc *crtc); |
101 | 101 | ||
102 | extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode); | ||
103 | |||
102 | extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, | 104 | extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, |
103 | struct drm_mode_fb_cmd *mode_cmd); | 105 | struct drm_mode_fb_cmd *mode_cmd); |
104 | 106 | ||