• Home
  • Raw
  • Download

Lines Matching refs:fb

16 static inline struct tegra_fb *to_tegra_fb(struct drm_framebuffer *fb)  in to_tegra_fb()  argument
18 return container_of(fb, struct tegra_fb, base); in to_tegra_fb()
31 struct tegra_fb *fb = to_tegra_fb(framebuffer); in tegra_fb_get_plane() local
36 return fb->planes[index]; in tegra_fb_get_plane()
41 struct tegra_fb *fb = to_tegra_fb(framebuffer); in tegra_fb_is_bottom_up() local
43 if (fb->planes[0]->flags & TEGRA_BO_BOTTOM_UP) in tegra_fb_is_bottom_up()
52 struct tegra_fb *fb = to_tegra_fb(framebuffer); in tegra_fb_get_tiling() local
55 *tiling = fb->planes[0]->tiling; in tegra_fb_get_tiling()
62 struct tegra_fb *fb = to_tegra_fb(framebuffer); in tegra_fb_destroy() local
65 for (i = 0; i < fb->num_planes; i++) { in tegra_fb_destroy()
66 struct tegra_bo *bo = fb->planes[i]; in tegra_fb_destroy()
73 kfree(fb->planes); in tegra_fb_destroy()
74 kfree(fb); in tegra_fb_destroy()
80 struct tegra_fb *fb = to_tegra_fb(framebuffer); in tegra_fb_create_handle() local
82 return drm_gem_handle_create(file, &fb->planes[0]->gem, handle); in tegra_fb_create_handle()
95 struct tegra_fb *fb; in tegra_fb_alloc() local
99 fb = kzalloc(sizeof(*fb), GFP_KERNEL); in tegra_fb_alloc()
100 if (!fb) in tegra_fb_alloc()
103 fb->planes = kzalloc(num_planes * sizeof(*planes), GFP_KERNEL); in tegra_fb_alloc()
104 if (!fb->planes) { in tegra_fb_alloc()
105 kfree(fb); in tegra_fb_alloc()
109 fb->num_planes = num_planes; in tegra_fb_alloc()
111 drm_helper_mode_fill_fb_struct(&fb->base, mode_cmd); in tegra_fb_alloc()
113 for (i = 0; i < fb->num_planes; i++) in tegra_fb_alloc()
114 fb->planes[i] = planes[i]; in tegra_fb_alloc()
116 err = drm_framebuffer_init(drm, &fb->base, &tegra_fb_funcs); in tegra_fb_alloc()
120 kfree(fb->planes); in tegra_fb_alloc()
121 kfree(fb); in tegra_fb_alloc()
125 return fb; in tegra_fb_alloc()
135 struct tegra_fb *fb; in tegra_fb_create() local
165 fb = tegra_fb_alloc(drm, cmd, planes, i); in tegra_fb_create()
166 if (IS_ERR(fb)) { in tegra_fb_create()
167 err = PTR_ERR(fb); in tegra_fb_create()
171 return &fb->base; in tegra_fb_create()
201 struct drm_framebuffer *fb; in tegra_fbdev_probe() local
230 fbdev->fb = tegra_fb_alloc(drm, &cmd, &bo, 1); in tegra_fbdev_probe()
231 if (IS_ERR(fbdev->fb)) { in tegra_fbdev_probe()
233 err = PTR_ERR(fbdev->fb); in tegra_fbdev_probe()
237 fb = &fbdev->fb->base; in tegra_fbdev_probe()
238 helper->fb = fb; in tegra_fbdev_probe()
251 drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); in tegra_fbdev_probe()
252 drm_fb_helper_fill_var(info, helper, fb->width, fb->height); in tegra_fbdev_probe()
255 info->var.yoffset * fb->pitches[0]; in tegra_fbdev_probe()
266 drm_framebuffer_unregister_private(fb); in tegra_fbdev_probe()
267 tegra_fb_destroy(fb); in tegra_fbdev_probe()
342 if (fbdev->fb) { in tegra_fbdev_free()
343 drm_framebuffer_unregister_private(&fbdev->fb->base); in tegra_fbdev_free()
344 tegra_fb_destroy(&fbdev->fb->base); in tegra_fbdev_free()