Lines Matching full:fb
34 void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) in msm_framebuffer_describe() argument
36 int i, n = fb->format->num_planes; in msm_framebuffer_describe()
38 seq_printf(m, "fb: %dx%d@%4.4s (%2d, ID:%d)\n", in msm_framebuffer_describe()
39 fb->width, fb->height, (char *)&fb->format->format, in msm_framebuffer_describe()
40 drm_framebuffer_read_refcount(fb), fb->base.id); in msm_framebuffer_describe()
44 i, fb->offsets[i], fb->pitches[i]); in msm_framebuffer_describe()
45 msm_gem_describe(fb->obj[i], m); in msm_framebuffer_describe()
50 /* prepare/pin all the fb's bo's for scanout. Note that it is not valid
51 * to prepare an fb more multiple different initiator 'id's. But that
53 * this, the gpu doesn't care about fb's.
55 int msm_framebuffer_prepare(struct drm_framebuffer *fb, in msm_framebuffer_prepare() argument
58 int ret, i, n = fb->format->num_planes; in msm_framebuffer_prepare()
62 ret = msm_gem_get_and_pin_iova(fb->obj[i], aspace, &iova); in msm_framebuffer_prepare()
63 DBG("FB[%u]: iova[%d]: %08llx (%d)", fb->base.id, i, iova, ret); in msm_framebuffer_prepare()
71 void msm_framebuffer_cleanup(struct drm_framebuffer *fb, in msm_framebuffer_cleanup() argument
74 int i, n = fb->format->num_planes; in msm_framebuffer_cleanup()
77 msm_gem_unpin_iova(fb->obj[i], aspace); in msm_framebuffer_cleanup()
80 uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, in msm_framebuffer_iova() argument
83 if (!fb->obj[plane]) in msm_framebuffer_iova()
85 return msm_gem_iova(fb->obj[plane], aspace) + fb->offsets[plane]; in msm_framebuffer_iova()
88 struct drm_gem_object *msm_framebuffer_bo(struct drm_framebuffer *fb, int plane) in msm_framebuffer_bo() argument
90 return drm_gem_fb_get_obj(fb, plane); in msm_framebuffer_bo()
93 const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb) in msm_framebuffer_format() argument
95 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_format()
105 struct drm_framebuffer *fb; in msm_framebuffer_create() local
116 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create()
117 if (IS_ERR(fb)) { in msm_framebuffer_create()
118 ret = PTR_ERR(fb); in msm_framebuffer_create()
122 return fb; in msm_framebuffer_create()
138 struct drm_framebuffer *fb; in msm_framebuffer_init() local
162 fb = &msm_fb->base; in msm_framebuffer_init()
166 if (n > ARRAY_SIZE(fb->obj)) { in msm_framebuffer_init()
188 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in msm_framebuffer_init()
190 ret = drm_framebuffer_init(dev, fb, &msm_framebuffer_funcs); in msm_framebuffer_init()
196 DBG("create: FB ID: %d (%p)", fb->base.id, fb); in msm_framebuffer_init()
198 return fb; in msm_framebuffer_init()
216 struct drm_framebuffer *fb; in msm_alloc_stolen_fb() local
221 DBG("allocating %d bytes for fb %d", size, dev->primary->index); in msm_alloc_stolen_fb()
235 fb = msm_framebuffer_init(dev, &mode_cmd, &bo); in msm_alloc_stolen_fb()
236 if (IS_ERR(fb)) { in msm_alloc_stolen_fb()
237 DRM_DEV_ERROR(dev->dev, "failed to allocate fb\n"); in msm_alloc_stolen_fb()
238 /* note: if fb creation failed, we can't rely on fb destroy in msm_alloc_stolen_fb()
242 return ERR_CAST(fb); in msm_alloc_stolen_fb()
245 return fb; in msm_alloc_stolen_fb()