Lines Matching refs:fb_helper
19 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_open() local
22 if (user && !try_module_get(fb_helper->dev->driver->fops->owner)) in drm_fbdev_dma_fb_open()
30 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_release() local
33 module_put(fb_helper->dev->driver->fops->owner); in drm_fbdev_dma_fb_release()
40 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_destroy() local
42 if (!fb_helper->dev) in drm_fbdev_dma_fb_destroy()
45 drm_fb_helper_fini(fb_helper); in drm_fbdev_dma_fb_destroy()
47 drm_client_buffer_vunmap(fb_helper->buffer); in drm_fbdev_dma_fb_destroy()
48 drm_client_framebuffer_delete(fb_helper->buffer); in drm_fbdev_dma_fb_destroy()
49 drm_client_release(&fb_helper->client); in drm_fbdev_dma_fb_destroy()
50 drm_fb_helper_unprepare(fb_helper); in drm_fbdev_dma_fb_destroy()
51 kfree(fb_helper); in drm_fbdev_dma_fb_destroy()
56 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_mmap() local
58 return drm_gem_prime_mmap(fb_helper->buffer->gem, vma); in drm_fbdev_dma_fb_mmap()
76 static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, in drm_fbdev_dma_helper_fb_probe() argument
79 struct drm_client_dev *client = &fb_helper->client; in drm_fbdev_dma_helper_fb_probe()
80 struct drm_device *dev = fb_helper->dev; in drm_fbdev_dma_helper_fb_probe()
114 fb_helper->buffer = buffer; in drm_fbdev_dma_helper_fb_probe()
115 fb_helper->fb = buffer->fb; in drm_fbdev_dma_helper_fb_probe()
117 info = drm_fb_helper_alloc_info(fb_helper); in drm_fbdev_dma_helper_fb_probe()
123 drm_fb_helper_fill_info(info, fb_helper, sizes); in drm_fbdev_dma_helper_fb_probe()
142 fb_helper->fb = NULL; in drm_fbdev_dma_helper_fb_probe()
143 fb_helper->buffer = NULL; in drm_fbdev_dma_helper_fb_probe()
160 struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); in drm_fbdev_dma_client_unregister() local
162 if (fb_helper->info) { in drm_fbdev_dma_client_unregister()
163 drm_fb_helper_unregister_info(fb_helper); in drm_fbdev_dma_client_unregister()
165 drm_client_release(&fb_helper->client); in drm_fbdev_dma_client_unregister()
166 drm_fb_helper_unprepare(fb_helper); in drm_fbdev_dma_client_unregister()
167 kfree(fb_helper); in drm_fbdev_dma_client_unregister()
180 struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); in drm_fbdev_dma_client_hotplug() local
184 if (dev->fb_helper) in drm_fbdev_dma_client_hotplug()
185 return drm_fb_helper_hotplug_event(dev->fb_helper); in drm_fbdev_dma_client_hotplug()
187 ret = drm_fb_helper_init(dev, fb_helper); in drm_fbdev_dma_client_hotplug()
194 ret = drm_fb_helper_initial_config(fb_helper); in drm_fbdev_dma_client_hotplug()
201 drm_fb_helper_fini(fb_helper); in drm_fbdev_dma_client_hotplug()
236 struct drm_fb_helper *fb_helper; in drm_fbdev_dma_setup() local
240 drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n"); in drm_fbdev_dma_setup()
242 fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL); in drm_fbdev_dma_setup()
243 if (!fb_helper) in drm_fbdev_dma_setup()
245 drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_dma_helper_funcs); in drm_fbdev_dma_setup()
247 ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_dma_client_funcs); in drm_fbdev_dma_setup()
253 drm_client_register(&fb_helper->client); in drm_fbdev_dma_setup()
258 drm_fb_helper_unprepare(fb_helper); in drm_fbdev_dma_setup()
259 kfree(fb_helper); in drm_fbdev_dma_setup()