Lines Matching refs:kms
46 dumb_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) in dumb_get_prop() argument
59 dumb_destroy(struct kms_driver *kms) in dumb_destroy() argument
61 free(kms); in dumb_destroy()
66 dumb_bo_create(struct kms_driver *kms, in dumb_bo_create() argument
98 ret = drmIoctl(kms->fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg); in dumb_bo_create()
102 bo->base.kms = kms; in dumb_bo_create()
142 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_MODE_MAP_DUMB, &arg); in dumb_bo_map()
146 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset); in dumb_bo_map()
181 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_MODE_DESTROY_DUMB, &arg); in dumb_bo_destroy()
192 struct kms_driver *kms; in dumb_create() local
200 kms = calloc(1, sizeof(*kms)); in dumb_create()
201 if (!kms) in dumb_create()
204 kms->fd = fd; in dumb_create()
206 kms->bo_create = dumb_bo_create; in dumb_create()
207 kms->bo_map = dumb_bo_map; in dumb_create()
208 kms->bo_unmap = dumb_bo_unmap; in dumb_create()
209 kms->bo_get_prop = dumb_bo_get_prop; in dumb_create()
210 kms->bo_destroy = dumb_bo_destroy; in dumb_create()
211 kms->get_prop = dumb_get_prop; in dumb_create()
212 kms->destroy = dumb_destroy; in dumb_create()
213 *out = kms; in dumb_create()