Lines Matching refs:dev
54 static int fb_setSwapInterval(struct framebuffer_device_t* dev, in fb_setSwapInterval() argument
66 dev->common.module); in fb_setSwapInterval()
67 if (interval < dev->minSwapInterval || interval > dev->maxSwapInterval) in fb_setSwapInterval()
74 static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer) in fb_post() argument
77 reinterpret_cast<private_module_t*>(dev->common.module); in fb_post()
80 fb_context_t *ctx = reinterpret_cast<fb_context_t*>(dev); in fb_post()
93 static int fb_compositionComplete(struct framebuffer_device_t* dev) in fb_compositionComplete() argument
96 if(!dev) { in fb_compositionComplete()
104 int mapFrameBufferLocked(framebuffer_device_t *dev) in mapFrameBufferLocked() argument
107 reinterpret_cast<private_module_t*>(dev->common.module); in mapFrameBufferLocked()
108 fb_context_t *ctx = reinterpret_cast<fb_context_t*>(dev); in mapFrameBufferLocked()
362 static int mapFrameBuffer(framebuffer_device_t *dev) in mapFrameBuffer() argument
370 reinterpret_cast<private_module_t*>(dev->common.module); in mapFrameBuffer()
372 err = mapFrameBufferLocked(dev); in mapFrameBuffer()
380 static int fb_close(struct hw_device_t *dev) in fb_close() argument
382 fb_context_t* ctx = (fb_context_t*)dev; in fb_close()
407 fb_context_t *dev = (fb_context_t*)malloc(sizeof(*dev)); in fb_device_open() local
408 if(dev == NULL) { in fb_device_open()
412 memset(dev, 0, sizeof(*dev)); in fb_device_open()
415 dev->device.common.tag = HARDWARE_DEVICE_TAG; in fb_device_open()
416 dev->device.common.version = 0; in fb_device_open()
417 dev->device.common.module = const_cast<hw_module_t*>(module); in fb_device_open()
418 dev->device.common.close = fb_close; in fb_device_open()
419 dev->device.setSwapInterval = fb_setSwapInterval; in fb_device_open()
420 dev->device.post = fb_post; in fb_device_open()
421 dev->device.setUpdateRect = 0; in fb_device_open()
422 dev->device.compositionComplete = fb_compositionComplete; in fb_device_open()
424 status = mapFrameBuffer((framebuffer_device_t*)dev); in fb_device_open()
425 private_module_t* m = (private_module_t*)dev->device.common.module; in fb_device_open()
428 const_cast<uint32_t&>(dev->device.flags) = 0; in fb_device_open()
429 const_cast<uint32_t&>(dev->device.width) = m->info.xres; in fb_device_open()
430 const_cast<uint32_t&>(dev->device.height) = m->info.yres; in fb_device_open()
431 const_cast<int&>(dev->device.stride) = stride; in fb_device_open()
432 const_cast<int&>(dev->device.format) = m->fbFormat; in fb_device_open()
433 const_cast<float&>(dev->device.xdpi) = m->xdpi; in fb_device_open()
434 const_cast<float&>(dev->device.ydpi) = m->ydpi; in fb_device_open()
435 const_cast<float&>(dev->device.fps) = m->fps; in fb_device_open()
436 const_cast<int&>(dev->device.minSwapInterval) = in fb_device_open()
438 const_cast<int&>(dev->device.maxSwapInterval) = in fb_device_open()
440 const_cast<int&>(dev->device.numFramebuffers) = m->numBuffers; in fb_device_open()
441 dev->device.setUpdateRect = 0; in fb_device_open()
443 *device = &dev->device.common; in fb_device_open()