Lines Matching refs:kms
52 intel_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) in intel_get_prop() argument
65 intel_destroy(struct kms_driver *kms) in intel_destroy() argument
67 free(kms); in intel_destroy()
72 intel_bo_create(struct kms_driver *kms, in intel_bo_create() argument
112 ret = drmCommandWriteRead(kms->fd, DRM_I915_GEM_CREATE, &arg, sizeof(arg)); in intel_bo_create()
116 bo->base.kms = kms; in intel_bo_create()
130 ret = drmCommandWriteRead(kms->fd, DRM_I915_GEM_SET_TILING, &tile, sizeof(tile)); in intel_bo_create()
172 ret = drmCommandWriteRead(bo->base.kms->fd, DRM_I915_GEM_MMAP_GTT, &arg, sizeof(arg)); in intel_bo_map()
176 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset); in intel_bo_map()
211 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_GEM_CLOSE, &arg); in intel_bo_destroy()
222 struct kms_driver *kms; in intel_create() local
224 kms = calloc(1, sizeof(*kms)); in intel_create()
225 if (!kms) in intel_create()
228 kms->fd = fd; in intel_create()
230 kms->bo_create = intel_bo_create; in intel_create()
231 kms->bo_map = intel_bo_map; in intel_create()
232 kms->bo_unmap = intel_bo_unmap; in intel_create()
233 kms->bo_get_prop = intel_bo_get_prop; in intel_create()
234 kms->bo_destroy = intel_bo_destroy; in intel_create()
235 kms->get_prop = intel_get_prop; in intel_create()
236 kms->destroy = intel_destroy; in intel_create()
237 *out = kms; in intel_create()