Lines Matching refs:kms
50 dumb_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) in dumb_get_prop() argument
63 dumb_destroy(struct kms_driver *kms) in dumb_destroy() argument
65 free(kms); in dumb_destroy()
70 dumb_bo_create(struct kms_driver *kms, in dumb_bo_create() argument
102 ret = drmIoctl(kms->fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg); in dumb_bo_create()
106 bo->base.kms = kms; in dumb_bo_create()
146 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_MODE_MAP_DUMB, &arg); in dumb_bo_map()
150 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset); in dumb_bo_map()
185 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_MODE_DESTROY_DUMB, &arg); in dumb_bo_destroy()
196 struct kms_driver *kms; in dumb_create() local
204 kms = calloc(1, sizeof(*kms)); in dumb_create()
205 if (!kms) in dumb_create()
208 kms->fd = fd; in dumb_create()
210 kms->bo_create = dumb_bo_create; in dumb_create()
211 kms->bo_map = dumb_bo_map; in dumb_create()
212 kms->bo_unmap = dumb_bo_unmap; in dumb_create()
213 kms->bo_get_prop = dumb_bo_get_prop; in dumb_create()
214 kms->bo_destroy = dumb_bo_destroy; in dumb_create()
215 kms->get_prop = dumb_get_prop; in dumb_create()
216 kms->destroy = dumb_destroy; in dumb_create()
217 *out = kms; in dumb_create()