Lines Matching refs:pdev
59 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
94 pdev->fbdev->post(pdev->fbdev, fb_layer->handle);
114 struct ranchu_hwc_composer_device_1* pdev =
123 value[0] = pdev->vsync_period_ns;
135 struct ranchu_hwc_composer_device_1* pdev =
142 pthread_mutex_lock(&pdev->vsync_lock);
143 pdev->vsync_callback_enabled=enabled;
144 pthread_mutex_unlock(&pdev->vsync_lock);
182 static int32_t hwc_attribute(struct ranchu_hwc_composer_device_1* pdev,
186 return pdev->vsync_period_ns;
188 return pdev->fbdev->width;
190 return pdev->fbdev->height;
192 return pdev->fbdev->xdpi*1000;
194 return pdev->fbdev->ydpi*1000;
205 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
208 values[i] = hwc_attribute(pdev, attributes[i]);
219 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
220 pthread_kill(pdev->vsync_thread, SIGTERM);
221 pthread_join(pdev->vsync_thread, NULL);
227 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)data;
242 wait_time.tv_nsec = pdev->vsync_period_ns;
253 pthread_mutex_lock(&pdev->vsync_lock);
254 vsync_enabled = pdev->vsync_callback_enabled;
255 pthread_mutex_unlock(&pdev->vsync_lock);
267 pdev->procs->vsync(pdev->procs, 0, timestamp);
281 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
282 pdev->procs = procs;
294 ranchu_hwc_composer_device_1 *pdev = new ranchu_hwc_composer_device_1();
295 if (!pdev) {
300 pdev->base.common.tag = HARDWARE_DEVICE_TAG;
301 pdev->base.common.version = HWC_DEVICE_API_VERSION_1_1;
302 pdev->base.common.module = const_cast<hw_module_t *>(module);
303 pdev->base.common.close = hwc_close;
305 pdev->base.prepare = hwc_prepare;
306 pdev->base.set = hwc_set;
307 pdev->base.eventControl = hwc_event_control;
308 pdev->base.blank = hwc_blank;
309 pdev->base.query = hwc_query;
310 pdev->base.registerProcs = hwc_register_procs;
311 pdev->base.dump = hwc_dump;
312 pdev->base.getDisplayConfigs = hwc_get_display_configs;
313 pdev->base.getDisplayAttributes = hwc_get_display_attributes;
315 pdev->vsync_period_ns = 1000*1000*1000/60; // vsync is 60 hz
323 ret = framebuffer_open(hw_module, &pdev->fbdev);
328 pthread_mutex_init(&pdev->vsync_lock, NULL);
329 pdev->vsync_callback_enabled = false;
331 ret = pthread_create (&pdev->vsync_thread, NULL, hwc_vsync_thread, pdev);
336 *device = &pdev->base.common;