• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/arm/nvidia/drm2/

Lines Matching refs:fb

48 	struct tegra_fb *fb;
52 fb = container_of(drm_fb, struct tegra_fb, drm_fb);
53 for (i = 0; i < fb->nplanes; i++) {
54 bo = fb->planes[i];
60 free(fb->planes, DRM_MEM_DRIVER);
67 struct tegra_fb *fb;
70 fb = container_of(drm_fb, struct tegra_fb, drm_fb);
71 rv = drm_gem_handle_create(file, &fb->planes[0]->gem_obj, handle);
77 fb_dirty(struct drm_framebuffer *fb, struct drm_file *file_priv,
94 struct tegra_fb *fb;
98 fb = malloc(sizeof(*fb), DRM_MEM_DRIVER, M_WAITOK | M_ZERO);
99 fb->planes = malloc(num_planes * sizeof(*fb->planes), DRM_MEM_DRIVER,
101 fb->nplanes = num_planes;
103 drm_helper_mode_fill_fb_struct(&fb->drm_fb, mode_cmd);
104 for (i = 0; i < fb->nplanes; i++)
105 fb->planes[i] = planes[i];
106 rv = drm_framebuffer_init(drm, &fb->drm_fb, &fb_funcs);
110 free(fb->planes, DRM_MEM_DRIVER);
113 *res_fb = fb;
123 struct tegra_fb *fb;
130 if (helper->fb != NULL)
137 fb = container_of(helper, struct tegra_fb, fb_helper);
165 rv = fb_alloc(drm_dev, &mode_cmd, &bo, 1, &fb);
171 helper->fb = &fb->drm_fb;
179 drm_fb_helper_fill_fix(info, fb->drm_fb.pitches[0], fb->drm_fb.depth);
180 drm_fb_helper_fill_var(info, helper, fb->drm_fb.width,
181 fb->drm_fb.height);
183 DRM_DEBUG_KMS("allocated %dx%d (s %dbits) fb size: %d, bo %p\n",
184 fb->drm_fb.width, fb->drm_fb.height, fb->drm_fb.depth,
205 struct tegra_fb *fb;
209 fb = drm->fb;
210 if (fb == NULL)
212 return (fb->fb_helper.fbdev);
216 tegra_fb_get_plane(struct tegra_fb *fb, int idx)
219 if (idx >= drm_format_num_planes(fb->drm_fb.pixel_format))
221 if (idx >= fb->nplanes)
223 return (fb->planes[idx]);
229 struct tegra_fb *fb;
235 fb = malloc(sizeof(*fb), DRM_MEM_DRIVER, M_WAITOK | M_ZERO);
236 drm->fb = fb;
238 fb->fb_helper.funcs = &fb_helper_funcs;
239 rv = drm_fb_helper_init(drm_dev, &fb->fb_helper,
247 rv = drm_fb_helper_single_add_all_connectors(&fb->fb_helper);
254 rv = drm_fb_helper_initial_config(&fb->fb_helper, 32);
261 /* drm_fb_helper_set_par(fb->fb_helper.fbdev); */
265 drm_fb_helper_fini(&fb->fb_helper);
277 struct tegra_fb *fb;
307 rv = fb_alloc(drm, cmd, planes, nplanes, &fb);
311 *fb_res = &fb->drm_fb;
324 struct tegra_fb *fb;
328 fb = drm->fb;
329 if (fb == NULL)
331 info = fb->fb_helper.fbdev;
332 drm_framebuffer_remove(&fb->drm_fb);
334 drm_fb_helper_fini(&fb->fb_helper);
335 drm_framebuffer_cleanup(&fb->drm_fb);
336 free(fb, DRM_MEM_DRIVER);
337 drm->fb = NULL;