Lines Matching full:fb

35 static int msm_framebuffer_dirtyfb(struct drm_framebuffer *fb,  in msm_framebuffer_dirtyfb()  argument
40 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_dirtyfb()
42 /* If this fb is not used on any display requiring pixel data to be in msm_framebuffer_dirtyfb()
48 return drm_atomic_helper_dirtyfb(fb, file_priv, flags, color, in msm_framebuffer_dirtyfb()
59 void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) in msm_framebuffer_describe() argument
62 int i, n = fb->format->num_planes; in msm_framebuffer_describe()
64 seq_printf(m, "fb: %dx%d@%4.4s (%2d, ID:%d)\n", in msm_framebuffer_describe()
65 fb->width, fb->height, (char *)&fb->format->format, in msm_framebuffer_describe()
66 drm_framebuffer_read_refcount(fb), fb->base.id); in msm_framebuffer_describe()
70 i, fb->offsets[i], fb->pitches[i]); in msm_framebuffer_describe()
71 msm_gem_describe(fb->obj[i], m, &stats); in msm_framebuffer_describe()
76 /* prepare/pin all the fb's bo's for scanout.
78 int msm_framebuffer_prepare(struct drm_framebuffer *fb, in msm_framebuffer_prepare() argument
82 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_prepare()
83 int ret, i, n = fb->format->num_planes; in msm_framebuffer_prepare()
91 ret = msm_gem_get_and_pin_iova(fb->obj[i], aspace, &msm_fb->iova[i]); in msm_framebuffer_prepare()
92 drm_dbg_state(fb->dev, "FB[%u]: iova[%d]: %08llx (%d)\n", in msm_framebuffer_prepare()
93 fb->base.id, i, msm_fb->iova[i], ret); in msm_framebuffer_prepare()
101 void msm_framebuffer_cleanup(struct drm_framebuffer *fb, in msm_framebuffer_cleanup() argument
105 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_cleanup()
106 int i, n = fb->format->num_planes; in msm_framebuffer_cleanup()
112 msm_gem_unpin_iova(fb->obj[i], aspace); in msm_framebuffer_cleanup()
118 uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, in msm_framebuffer_iova() argument
121 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_iova()
122 return msm_fb->iova[plane] + fb->offsets[plane]; in msm_framebuffer_iova()
125 struct drm_gem_object *msm_framebuffer_bo(struct drm_framebuffer *fb, int plane) in msm_framebuffer_bo() argument
127 return drm_gem_fb_get_obj(fb, plane); in msm_framebuffer_bo()
130 const struct msm_format *msm_framebuffer_format(struct drm_framebuffer *fb) in msm_framebuffer_format() argument
132 struct msm_framebuffer *msm_fb = to_msm_framebuffer(fb); in msm_framebuffer_format()
142 struct drm_framebuffer *fb; in msm_framebuffer_create() local
153 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create()
154 if (IS_ERR(fb)) { in msm_framebuffer_create()
155 ret = PTR_ERR(fb); in msm_framebuffer_create()
159 return fb; in msm_framebuffer_create()
175 struct drm_framebuffer *fb; in msm_framebuffer_init() local
199 fb = &msm_fb->base; in msm_framebuffer_init()
203 if (n > ARRAY_SIZE(fb->obj)) { in msm_framebuffer_init()
225 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in msm_framebuffer_init()
227 ret = drm_framebuffer_init(dev, fb, &msm_framebuffer_funcs); in msm_framebuffer_init()
235 drm_dbg_state(dev, "create: FB ID: %d (%p)\n", fb->base.id, fb); in msm_framebuffer_init()
237 return fb; in msm_framebuffer_init()
255 struct drm_framebuffer *fb; in msm_alloc_stolen_fb() local
260 DBG("allocating %d bytes for fb %d", size, dev->primary->index); in msm_alloc_stolen_fb()
274 fb = msm_framebuffer_init(dev, &mode_cmd, &bo); in msm_alloc_stolen_fb()
275 if (IS_ERR(fb)) { in msm_alloc_stolen_fb()
276 DRM_DEV_ERROR(dev->dev, "failed to allocate fb\n"); in msm_alloc_stolen_fb()
277 /* note: if fb creation failed, we can't rely on fb destroy in msm_alloc_stolen_fb()
281 return ERR_CAST(fb); in msm_alloc_stolen_fb()
284 return fb; in msm_alloc_stolen_fb()