Lines Matching full:gbm
21 PUBLIC int gbm_device_get_fd(struct gbm_device *gbm) in gbm_device_get_fd() argument
24 return drv_get_fd(gbm->drv); in gbm_device_get_fd()
27 PUBLIC const char *gbm_device_get_backend_name(struct gbm_device *gbm) in gbm_device_get_backend_name() argument
29 return drv_get_name(gbm->drv); in gbm_device_get_backend_name()
32 PUBLIC int gbm_device_is_format_supported(struct gbm_device *gbm, uint32_t format, uint32_t usage) in gbm_device_is_format_supported() argument
41 return (drv_get_combination(gbm->drv, format, use_flags) != NULL); in gbm_device_is_format_supported()
44 PUBLIC int gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm, uint32_t format, in gbm_device_get_format_modifier_plane_count() argument
52 struct gbm_device *gbm; in gbm_create_device() local
54 gbm = (struct gbm_device *)malloc(sizeof(*gbm)); in gbm_create_device()
56 if (!gbm) in gbm_create_device()
59 gbm->drv = drv_create(fd); in gbm_create_device()
60 if (!gbm->drv) { in gbm_create_device()
61 free(gbm); in gbm_create_device()
65 return gbm; in gbm_create_device()
68 PUBLIC void gbm_device_destroy(struct gbm_device *gbm) in gbm_device_destroy() argument
70 drv_destroy(gbm->drv); in gbm_device_destroy()
71 free(gbm); in gbm_device_destroy()
74 PUBLIC struct gbm_surface *gbm_surface_create(struct gbm_device *gbm, uint32_t width, in gbm_surface_create() argument
85 PUBLIC struct gbm_surface *gbm_surface_create_with_modifiers(struct gbm_device *gbm, uint32_t width, in gbm_surface_create_with_modifiers() argument
90 return gbm_surface_create_with_modifiers2(gbm, width, height, format, modifiers, count, 0); in gbm_surface_create_with_modifiers()
94 gbm_surface_create_with_modifiers2(struct gbm_device *gbm, uint32_t width, uint32_t height, in gbm_surface_create_with_modifiers2() argument
104 return gbm_surface_create(gbm, width, height, format, flags); in gbm_surface_create_with_modifiers2()
126 static struct gbm_bo *gbm_bo_new(struct gbm_device *gbm, uint32_t format) in gbm_bo_new() argument
134 bo->gbm = gbm; in gbm_bo_new()
140 PUBLIC struct gbm_bo *gbm_bo_create(struct gbm_device *gbm, uint32_t width, uint32_t height, in gbm_bo_create() argument
145 if (!gbm_device_is_format_supported(gbm, format, usage)) in gbm_bo_create()
148 bo = gbm_bo_new(gbm, format); in gbm_bo_create()
161 bo->bo = drv_bo_create(gbm->drv, width, height, format, gbm_convert_usage(usage)); in gbm_bo_create()
171 PUBLIC struct gbm_bo *gbm_bo_create_with_modifiers(struct gbm_device *gbm, uint32_t width, in gbm_bo_create_with_modifiers() argument
175 return gbm_bo_create_with_modifiers2(gbm, width, height, format, modifiers, count, 0); in gbm_bo_create_with_modifiers()
178 PUBLIC struct gbm_bo *gbm_bo_create_with_modifiers2(struct gbm_device *gbm, uint32_t width, in gbm_bo_create_with_modifiers2() argument
188 bo = gbm_bo_new(gbm, format); in gbm_bo_create_with_modifiers2()
193 bo->bo = drv_bo_create_with_modifiers(gbm->drv, width, height, format, modifiers, count); in gbm_bo_create_with_modifiers2()
215 PUBLIC struct gbm_bo *gbm_bo_import(struct gbm_device *gbm, uint32_t type, void *buffer, in gbm_bo_import() argument
242 num_planes = drv_num_planes_from_modifier(gbm->drv, drv_data.format, in gbm_bo_import()
268 if (!gbm_device_is_format_supported(gbm, gbm_format, usage)) in gbm_bo_import()
271 bo = gbm_bo_new(gbm, gbm_format); in gbm_bo_import()
276 bo->bo = drv_bo_import(gbm->drv, &drv_data); in gbm_bo_import()
337 return bo->gbm; in gbm_bo_get_device()
389 * has a GBM format, but never return them to the user.
420 * The following functions are not deprecated, but not in the Mesa the gbm
422 * disjoint YUV images, while Mesa GBM does not.