Lines Matching refs:kms
48 intel_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) in intel_get_prop() argument
61 intel_destroy(struct kms_driver *kms) in intel_destroy() argument
63 free(kms); in intel_destroy()
68 intel_bo_create(struct kms_driver *kms, in intel_bo_create() argument
108 ret = drmCommandWriteRead(kms->fd, DRM_I915_GEM_CREATE, &arg, sizeof(arg)); in intel_bo_create()
112 bo->base.kms = kms; in intel_bo_create()
126 ret = drmCommandWriteRead(kms->fd, DRM_I915_GEM_SET_TILING, &tile, sizeof(tile)); in intel_bo_create()
168 ret = drmCommandWriteRead(bo->base.kms->fd, DRM_I915_GEM_MMAP_GTT, &arg, sizeof(arg)); in intel_bo_map()
172 map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset); in intel_bo_map()
207 ret = drmIoctl(bo->base.kms->fd, DRM_IOCTL_GEM_CLOSE, &arg); in intel_bo_destroy()
218 struct kms_driver *kms; in intel_create() local
220 kms = calloc(1, sizeof(*kms)); in intel_create()
221 if (!kms) in intel_create()
224 kms->fd = fd; in intel_create()
226 kms->bo_create = intel_bo_create; in intel_create()
227 kms->bo_map = intel_bo_map; in intel_create()
228 kms->bo_unmap = intel_bo_unmap; in intel_create()
229 kms->bo_get_prop = intel_bo_get_prop; in intel_create()
230 kms->bo_destroy = intel_bo_destroy; in intel_create()
231 kms->get_prop = intel_get_prop; in intel_create()
232 kms->destroy = intel_destroy; in intel_create()
233 *out = kms; in intel_create()