Lines Matching full:fb
36 static int msm_framebuffer_dirtyfb(struct drm_framebuffer *fb, in msm_framebuffer_dirtyfb() argument
41 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_dirtyfb()
43 /* If this fb is not used on any display requiring pixel data to be in msm_framebuffer_dirtyfb()
49 return drm_atomic_helper_dirtyfb(fb, file_priv, flags, color, in msm_framebuffer_dirtyfb()
60 void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) in msm_framebuffer_describe() argument
63 int i, n = fb->format->num_planes; in msm_framebuffer_describe()
65 seq_printf(m, "fb: %dx%d@%4.4s (%2d, ID:%d)\n", in msm_framebuffer_describe()
66 fb->width, fb->height, (char *)&fb->format->format, in msm_framebuffer_describe()
67 drm_framebuffer_read_refcount(fb), fb->base.id); in msm_framebuffer_describe()
71 i, fb->offsets[i], fb->pitches[i]); in msm_framebuffer_describe()
72 msm_gem_describe(fb->obj[i], m, &stats); in msm_framebuffer_describe()
77 /* prepare/pin all the fb's bo's for scanout.
79 int msm_framebuffer_prepare(struct drm_framebuffer *fb, bool needs_dirtyfb) in msm_framebuffer_prepare() argument
81 struct msm_drm_private *priv = fb->dev->dev_private; in msm_framebuffer_prepare()
83 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_prepare()
84 int ret, i, n = fb->format->num_planes; in msm_framebuffer_prepare()
93 msm_gem_vma_get(fb->obj[i]); in msm_framebuffer_prepare()
94 ret = msm_gem_get_and_pin_iova(fb->obj[i], vm, &msm_fb->iova[i]); in msm_framebuffer_prepare()
95 drm_dbg_state(fb->dev, "FB[%u]: iova[%d]: %08llx (%d)\n", in msm_framebuffer_prepare()
96 fb->base.id, i, msm_fb->iova[i], ret); in msm_framebuffer_prepare()
104 void msm_framebuffer_cleanup(struct drm_framebuffer *fb, bool needed_dirtyfb) in msm_framebuffer_cleanup() argument
106 struct msm_drm_private *priv = fb->dev->dev_private; in msm_framebuffer_cleanup()
108 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_cleanup()
109 int i, n = fb->format->num_planes; in msm_framebuffer_cleanup()
120 msm_gem_unpin_iova(fb->obj[i], vm); in msm_framebuffer_cleanup()
121 msm_gem_vma_put(fb->obj[i]); in msm_framebuffer_cleanup()
125 uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, int plane) in msm_framebuffer_iova() argument
127 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_iova()
128 return msm_fb->iova[plane] + fb->offsets[plane]; in msm_framebuffer_iova()
131 struct drm_gem_object *msm_framebuffer_bo(struct drm_framebuffer *fb, int plane) in msm_framebuffer_bo() argument
133 return drm_gem_fb_get_obj(fb, plane); in msm_framebuffer_bo()
136 const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb) in msm_framebuffer_format() argument
138 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_format()
147 struct drm_framebuffer *fb; in msm_framebuffer_create() local
158 fb = msm_framebuffer_init(dev, info, mode_cmd, bos); in msm_framebuffer_create()
159 if (IS_ERR(fb)) { in msm_framebuffer_create()
160 ret = PTR_ERR(fb); in msm_framebuffer_create()
164 return fb; in msm_framebuffer_create()
179 struct drm_framebuffer *fb; in msm_framebuffer_init() local
203 fb = &msm_fb->base; in msm_framebuffer_init()
207 if (n > ARRAY_SIZE(fb->obj)) { in msm_framebuffer_init()
229 drm_helper_mode_fill_fb_struct(dev, fb, info, mode_cmd); in msm_framebuffer_init()
231 ret = drm_framebuffer_init(dev, fb, &msm_framebuffer_funcs); in msm_framebuffer_init()
239 drm_dbg_state(dev, "create: FB ID: %d (%p)\n", fb->base.id, fb); in msm_framebuffer_init()
241 return fb; in msm_framebuffer_init()
259 struct drm_framebuffer *fb; in msm_alloc_stolen_fb() local
264 DBG("allocating %d bytes for fb %d", size, dev->primary->index); in msm_alloc_stolen_fb()
278 fb = msm_framebuffer_init(dev, in msm_alloc_stolen_fb()
282 if (IS_ERR(fb)) { in msm_alloc_stolen_fb()
283 DRM_DEV_ERROR(dev->dev, "failed to allocate fb\n"); in msm_alloc_stolen_fb()
284 /* note: if fb creation failed, we can't rely on fb destroy in msm_alloc_stolen_fb()
288 return ERR_CAST(fb); in msm_alloc_stolen_fb()
291 return fb; in msm_alloc_stolen_fb()