Lines Matching full:fb

30 #include <linux/fb.h>
59 struct intel_framebuffer *fb; member
80 return ifbdev->fb->frontbuffer; in to_frontbuffer()
132 struct drm_gem_object *bo = drm_gem_fb_get_obj(&fbdev->fb->base, 0); in intel_fbdev_mmap()
151 drm_framebuffer_remove(&ifbdev->fb->base); in intel_fbdev_fb_destroy()
159 __diag_ignore_all("-Woverride-init", "Allow field initialization overrides for fb ops");
179 struct intel_framebuffer *fb = ifbdev->fb; in intelfb_create() local
199 ifbdev->fb = NULL; in intelfb_create()
201 if (fb && in intelfb_create()
202 (sizes->fb_width > fb->base.width || in intelfb_create()
203 sizes->fb_height > fb->base.height)) { in intelfb_create()
205 "BIOS fb too small (%dx%d), we require (%dx%d)," in intelfb_create()
207 fb->base.width, fb->base.height, in intelfb_create()
209 drm_framebuffer_put(&fb->base); in intelfb_create()
210 fb = NULL; in intelfb_create()
212 if (!fb || drm_WARN_ON(dev, !intel_fb_obj(&fb->base))) { in intelfb_create()
214 "no BIOS fb, allocating a new one\n"); in intelfb_create()
215 fb = intel_fbdev_fb_alloc(helper, sizes); in intelfb_create()
216 if (IS_ERR(fb)) in intelfb_create()
217 return PTR_ERR(fb); in intelfb_create()
219 drm_dbg_kms(&dev_priv->drm, "re-using BIOS fb\n"); in intelfb_create()
221 sizes->fb_width = fb->base.width; in intelfb_create()
222 sizes->fb_height = fb->base.height; in intelfb_create()
228 * This also validates that any existing fb inherited from the in intelfb_create()
231 vma = intel_fb_pin_to_ggtt(&fb->base, &view, in intelfb_create()
232 fb->min_alignment, 0, in intelfb_create()
246 ifbdev->helper.fb = &fb->base; in intelfb_create()
250 obj = intel_fb_obj(&fb->base); in intelfb_create()
267 drm_dbg_kms(&dev_priv->drm, "allocated %dx%d fb: 0x%08x\n", in intelfb_create()
268 fb->base.width, fb->base.height, in intelfb_create()
270 ifbdev->fb = fb; in intelfb_create()
290 if (helper->fb->funcs->dirty) in intelfb_dirty()
291 return helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, clip, 1); in intelfb_dirty()
305 * fb, and if so, we re-use it for the fbdev configuration.
307 * Note we only support a single fb shared across pipes for boot (mostly for
314 struct intel_framebuffer *fb = NULL; in intel_fbdev_init_bios() local
318 /* Find the largest fb */ in intel_fbdev_init_bios()
327 intel_fb_obj(plane_state->uapi.fb); in intel_fbdev_init_bios()
338 "[PLANE:%d:%s] no fb, skipping\n", in intel_fbdev_init_bios()
345 "found possible fb from [PLANE:%d:%s]\n", in intel_fbdev_init_bios()
347 fb = to_intel_framebuffer(plane_state->uapi.fb); in intel_fbdev_init_bios()
352 if (!fb) { in intel_fbdev_init_bios()
373 drm_dbg_kms(&i915->drm, "checking [PLANE:%d:%s] for BIOS fb\n", in intel_fbdev_init_bios()
377 * See if the plane fb we found above will fit on this in intel_fbdev_init_bios()
378 * pipe. Note we need to use the selected fb's pitch and bpp in intel_fbdev_init_bios()
382 cur_size = cur_size * fb->base.format->cpp[0]; in intel_fbdev_init_bios()
383 if (fb->base.pitches[0] < cur_size) { in intel_fbdev_init_bios()
385 "fb not wide enough for [PLANE:%d:%s] (%d vs %d)\n", in intel_fbdev_init_bios()
387 cur_size, fb->base.pitches[0]); in intel_fbdev_init_bios()
388 fb = NULL; in intel_fbdev_init_bios()
393 cur_size = intel_fb_align_height(&fb->base, 0, cur_size); in intel_fbdev_init_bios()
394 cur_size *= fb->base.pitches[0]; in intel_fbdev_init_bios()
400 fb->base.format->cpp[0] * 8, in intel_fbdev_init_bios()
405 "fb not big enough for [PLANE:%d:%s] (%d vs %d)\n", in intel_fbdev_init_bios()
408 fb = NULL; in intel_fbdev_init_bios()
413 "fb big enough [PLANE:%d:%s] (%d >= %d)\n", in intel_fbdev_init_bios()
418 if (!fb) { in intel_fbdev_init_bios()
420 "BIOS fb not suitable for all pipes, not using\n"); in intel_fbdev_init_bios()
424 ifbdev->preferred_bpp = fb->base.format->cpp[0] * 8; in intel_fbdev_init_bios()
425 ifbdev->fb = fb; in intel_fbdev_init_bios()
427 drm_framebuffer_get(&ifbdev->fb->base); in intel_fbdev_init_bios()
441 drm_WARN(dev, !plane_state->uapi.fb, in intel_fbdev_init_bios()
442 "re-used BIOS config but lost an fb on [PLANE:%d:%s]\n", in intel_fbdev_init_bios()
447 drm_dbg_kms(&i915->drm, "using BIOS fb for initial console\n"); in intel_fbdev_init_bios()
536 !i915_gem_object_is_shmem(intel_fb_obj(&ifbdev->fb->base))) in intel_fbdev_set_suspend()
696 if (!fbdev || !fbdev->helper.fb) in intel_fbdev_framebuffer()
699 return to_intel_framebuffer(fbdev->helper.fb); in intel_fbdev_framebuffer()