extern "C" {
#endif
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
+
struct gralloc_drm_t;
struct gralloc_drm_bo_t;
bpp = 3;
break;
case HAL_PIXEL_FORMAT_RGB_565:
- case HAL_PIXEL_FORMAT_RGBA_5551:
- case HAL_PIXEL_FORMAT_RGBA_4444:
case HAL_PIXEL_FORMAT_YCbCr_422_I:
bpp = 2;
break;
break;
}
- *width = (*width + align_w - 1) & ~(align_w - 1);
- *height = (*height + align_h - 1) & ~(align_h - 1);
+ *width = ALIGN(*width, align_w);
+ *height = ALIGN(*height, align_h);
if (extra_height_div)
*height += *height / extra_height_div;
void gralloc_drm_bo_rm_fb(struct gralloc_drm_bo_t *bo);
int gralloc_drm_bo_post(struct gralloc_drm_bo_t *bo);
-int gralloc_drm_reserve_plane(struct gralloc_drm_t *drm, buffer_handle_t handle,
+int gralloc_drm_reserve_plane(struct gralloc_drm_t *drm,
+ buffer_handle_t handle, uint32_t id,
uint32_t dst_x, uint32_t dst_y, uint32_t dst_w, uint32_t dst_h,
uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h);
void gralloc_drm_disable_planes(struct gralloc_drm_t *mod);
+int gralloc_drm_set_plane_handle(struct gralloc_drm_t *drm,
+ uint32_t id, buffer_handle_t handle);
#ifdef __cplusplus
}