Lines Matching refs:pdev
61 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
96 pdev->fbdev->post(pdev->fbdev, fb_layer->handle);
116 struct ranchu_hwc_composer_device_1* pdev =
125 value[0] = pdev->vsync_period_ns;
137 struct ranchu_hwc_composer_device_1* pdev =
144 pthread_mutex_lock(&pdev->vsync_lock);
145 pdev->vsync_callback_enabled=enabled;
146 pthread_mutex_unlock(&pdev->vsync_lock);
184 static int32_t hwc_attribute(struct ranchu_hwc_composer_device_1* pdev,
188 return pdev->vsync_period_ns;
190 return pdev->fbdev->width;
192 return pdev->fbdev->height;
194 return pdev->fbdev->xdpi*1000;
196 return pdev->fbdev->ydpi*1000;
207 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
210 values[i] = hwc_attribute(pdev, attributes[i]);
224 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
225 pthread_kill(pdev->vsync_thread, SIGTERM);
226 pthread_join(pdev->vsync_thread, NULL);
232 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)data;
247 wait_time.tv_nsec = pdev->vsync_period_ns;
258 pthread_mutex_lock(&pdev->vsync_lock);
259 vsync_enabled = pdev->vsync_callback_enabled;
260 pthread_mutex_unlock(&pdev->vsync_lock);
272 pdev->procs->vsync(pdev->procs, 0, timestamp);
286 struct ranchu_hwc_composer_device_1* pdev = (struct ranchu_hwc_composer_device_1*)dev;
287 pdev->procs = procs;
299 ranchu_hwc_composer_device_1 *pdev = new ranchu_hwc_composer_device_1();
300 if (!pdev) {
305 pdev->base.common.tag = HARDWARE_DEVICE_TAG;
306 pdev->base.common.version = HWC_DEVICE_API_VERSION_1_1;
307 pdev->base.common.module = const_cast<hw_module_t *>(module);
308 pdev->base.common.close = hwc_close;
310 pdev->base.prepare = hwc_prepare;
311 pdev->base.set = hwc_set;
312 pdev->base.eventControl = hwc_event_control;
313 pdev->base.blank = hwc_blank;
314 pdev->base.query = hwc_query;
315 pdev->base.registerProcs = hwc_register_procs;
316 pdev->base.dump = hwc_dump;
317 pdev->base.getDisplayConfigs = hwc_get_display_configs;
318 pdev->base.getDisplayAttributes = hwc_get_display_attributes;
320 pdev->vsync_period_ns = 1000*1000*1000/60; // vsync is 60 hz
328 ret = framebuffer_open(hw_module, &pdev->fbdev);
333 pthread_mutex_init(&pdev->vsync_lock, NULL);
334 pdev->vsync_callback_enabled = false;
336 ret = pthread_create (&pdev->vsync_thread, NULL, hwc_vsync_thread, pdev);
341 *device = &pdev->base.common;