Lines Matching full:fb
41 void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) in msm_framebuffer_describe() argument
43 int i, n = fb->format->num_planes; in msm_framebuffer_describe()
45 seq_printf(m, "fb: %dx%d@%4.4s (%2d, ID:%d)\n", in msm_framebuffer_describe()
46 fb->width, fb->height, (char *)&fb->format->format, in msm_framebuffer_describe()
47 drm_framebuffer_read_refcount(fb), fb->base.id); in msm_framebuffer_describe()
51 i, fb->offsets[i], fb->pitches[i]); in msm_framebuffer_describe()
52 msm_gem_describe(fb->obj[i], m); in msm_framebuffer_describe()
57 /* prepare/pin all the fb's bo's for scanout. Note that it is not valid
58 * to prepare an fb more multiple different initiator 'id's. But that
60 * this, the gpu doesn't care about fb's.
62 int msm_framebuffer_prepare(struct drm_framebuffer *fb, in msm_framebuffer_prepare() argument
65 int ret, i, n = fb->format->num_planes; in msm_framebuffer_prepare()
69 ret = msm_gem_get_iova(fb->obj[i], aspace, &iova); in msm_framebuffer_prepare()
70 DBG("FB[%u]: iova[%d]: %08llx (%d)", fb->base.id, i, iova, ret); in msm_framebuffer_prepare()
78 void msm_framebuffer_cleanup(struct drm_framebuffer *fb, in msm_framebuffer_cleanup() argument
81 int i, n = fb->format->num_planes; in msm_framebuffer_cleanup()
84 msm_gem_put_iova(fb->obj[i], aspace); in msm_framebuffer_cleanup()
87 uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, in msm_framebuffer_iova() argument
90 if (!fb->obj[plane]) in msm_framebuffer_iova()
92 return msm_gem_iova(fb->obj[plane], aspace) + fb->offsets[plane]; in msm_framebuffer_iova()
95 struct drm_gem_object *msm_framebuffer_bo(struct drm_framebuffer *fb, int plane) in msm_framebuffer_bo() argument
97 return drm_gem_fb_get_obj(fb, plane); in msm_framebuffer_bo()
100 const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb) in msm_framebuffer_format() argument
102 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_format()
110 struct drm_framebuffer *fb; in msm_framebuffer_create() local
121 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create()
122 if (IS_ERR(fb)) { in msm_framebuffer_create()
123 ret = PTR_ERR(fb); in msm_framebuffer_create()
127 return fb; in msm_framebuffer_create()
141 struct drm_framebuffer *fb; in msm_framebuffer_init() local
169 fb = &msm_fb->base; in msm_framebuffer_init()
173 if (n > ARRAY_SIZE(fb->obj)) { in msm_framebuffer_init()
195 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in msm_framebuffer_init()
197 ret = drm_framebuffer_init(dev, fb, &msm_framebuffer_funcs); in msm_framebuffer_init()
203 DBG("create: FB ID: %d (%p)", fb->base.id, fb); in msm_framebuffer_init()
205 return fb; in msm_framebuffer_init()
223 struct drm_framebuffer *fb; in msm_alloc_stolen_fb() local
228 DBG("allocating %d bytes for fb %d", size, dev->primary->index); in msm_alloc_stolen_fb()
240 fb = msm_framebuffer_init(dev, &mode_cmd, &bo); in msm_alloc_stolen_fb()
241 if (IS_ERR(fb)) { in msm_alloc_stolen_fb()
242 dev_err(dev->dev, "failed to allocate fb\n"); in msm_alloc_stolen_fb()
243 /* note: if fb creation failed, we can't rely on fb destroy in msm_alloc_stolen_fb()
247 return ERR_CAST(fb); in msm_alloc_stolen_fb()
250 return fb; in msm_alloc_stolen_fb()