Lines Matching refs:fb
29 struct drm_framebuffer fb; member
35 struct drm_fb_cma *fb; member
43 static inline struct drm_fb_cma *to_fb_cma(struct drm_framebuffer *fb) in to_fb_cma() argument
45 return container_of(fb, struct drm_fb_cma, fb); in to_fb_cma()
48 static void drm_fb_cma_destroy(struct drm_framebuffer *fb) in drm_fb_cma_destroy() argument
50 struct drm_fb_cma *fb_cma = to_fb_cma(fb); in drm_fb_cma_destroy()
58 drm_framebuffer_cleanup(fb); in drm_fb_cma_destroy()
62 static int drm_fb_cma_create_handle(struct drm_framebuffer *fb, in drm_fb_cma_create_handle() argument
65 struct drm_fb_cma *fb_cma = to_fb_cma(fb); in drm_fb_cma_create_handle()
88 drm_helper_mode_fill_fb_struct(&fb_cma->fb, mode_cmd); in drm_fb_cma_alloc()
93 ret = drm_framebuffer_init(dev, &fb_cma->fb, &drm_fb_cma_funcs); in drm_fb_cma_alloc()
153 return &fb_cma->fb; in drm_fb_cma_create()
171 struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb, in drm_fb_cma_get_gem_obj() argument
174 struct drm_fb_cma *fb_cma = to_fb_cma(fb); in drm_fb_cma_get_gem_obj()
188 static void drm_fb_cma_describe(struct drm_framebuffer *fb, struct seq_file *m) in drm_fb_cma_describe() argument
190 struct drm_fb_cma *fb_cma = to_fb_cma(fb); in drm_fb_cma_describe()
191 int i, n = drm_format_num_planes(fb->pixel_format); in drm_fb_cma_describe()
193 seq_printf(m, "fb: %dx%d@%4.4s\n", fb->width, fb->height, in drm_fb_cma_describe()
194 (char *)&fb->pixel_format); in drm_fb_cma_describe()
198 i, fb->offsets[i], fb->pitches[i]); in drm_fb_cma_describe()
211 struct drm_framebuffer *fb; in drm_fb_cma_debugfs_show() local
214 drm_for_each_fb(fb, dev) in drm_fb_cma_debugfs_show()
215 drm_fb_cma_describe(fb, m); in drm_fb_cma_debugfs_show()
242 struct drm_framebuffer *fb; in drm_fbdev_cma_create() local
272 fbdev_cma->fb = drm_fb_cma_alloc(dev, &mode_cmd, &obj, 1); in drm_fbdev_cma_create()
273 if (IS_ERR(fbdev_cma->fb)) { in drm_fbdev_cma_create()
275 ret = PTR_ERR(fbdev_cma->fb); in drm_fbdev_cma_create()
279 fb = &fbdev_cma->fb->fb; in drm_fbdev_cma_create()
280 helper->fb = fb; in drm_fbdev_cma_create()
286 drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth); in drm_fbdev_cma_create()
290 offset += fbi->var.yoffset * fb->pitches[0]; in drm_fbdev_cma_create()
380 if (fbdev_cma->fb) { in drm_fbdev_cma_fini()
381 drm_framebuffer_unregister_private(&fbdev_cma->fb->fb); in drm_fbdev_cma_fini()
382 drm_fb_cma_destroy(&fbdev_cma->fb->fb); in drm_fbdev_cma_fini()