Lines Matching refs:kfb

18 	struct komeda_fb *kfb = to_kfb(fb);  in komeda_fb_destroy()  local
25 kfree(kfb); in komeda_fb_destroy()
40 komeda_fb_afbc_size_check(struct komeda_fb *kfb, struct drm_file *file, in komeda_fb_afbc_size_check() argument
43 struct drm_framebuffer *fb = &kfb->base; in komeda_fb_afbc_size_check()
79 kfb->aligned_w = ALIGN(fb->width, alignment_w); in komeda_fb_afbc_size_check()
80 kfb->aligned_h = ALIGN(fb->height, alignment_h); in komeda_fb_afbc_size_check()
87 n_blocks = (kfb->aligned_w * kfb->aligned_h) / AFBC_SUPERBLK_PIXELS; in komeda_fb_afbc_size_check()
88 kfb->offset_payload = ALIGN(n_blocks * AFBC_HEADER_SIZE, in komeda_fb_afbc_size_check()
92 kfb->afbc_size = kfb->offset_payload + n_blocks * in komeda_fb_afbc_size_check()
95 min_size = kfb->afbc_size + fb->offsets[0]; in komeda_fb_afbc_size_check()
111 komeda_fb_none_afbc_size_check(struct komeda_dev *mdev, struct komeda_fb *kfb, in komeda_fb_none_afbc_size_check() argument
115 struct drm_framebuffer *fb = &kfb->base; in komeda_fb_none_afbc_size_check()
121 if (komeda_fb_check_src_coords(kfb, 0, 0, fb->width, fb->height)) in komeda_fb_none_afbc_size_check()
139 min_size = komeda_fb_get_pixel_addr(kfb, 0, fb->height, i) in komeda_fb_none_afbc_size_check()
163 struct komeda_fb *kfb; in komeda_fb_create() local
166 kfb = kzalloc(sizeof(*kfb), GFP_KERNEL); in komeda_fb_create()
167 if (!kfb) in komeda_fb_create()
170 kfb->format_caps = komeda_get_format_caps(&mdev->fmt_tbl, in komeda_fb_create()
173 if (!kfb->format_caps) { in komeda_fb_create()
176 kfree(kfb); in komeda_fb_create()
180 drm_helper_mode_fill_fb_struct(dev, &kfb->base, mode_cmd); in komeda_fb_create()
182 if (kfb->base.modifier) in komeda_fb_create()
183 ret = komeda_fb_afbc_size_check(kfb, file, mode_cmd); in komeda_fb_create()
185 ret = komeda_fb_none_afbc_size_check(mdev, kfb, file, mode_cmd); in komeda_fb_create()
189 ret = drm_framebuffer_init(dev, &kfb->base, &komeda_fb_funcs); in komeda_fb_create()
196 kfb->is_va = mdev->iommu ? true : false; in komeda_fb_create()
198 return &kfb->base; in komeda_fb_create()
201 for (i = 0; i < kfb->base.format->num_planes; i++) in komeda_fb_create()
202 drm_gem_object_put(kfb->base.obj[i]); in komeda_fb_create()
204 kfree(kfb); in komeda_fb_create()
208 int komeda_fb_check_src_coords(const struct komeda_fb *kfb, in komeda_fb_check_src_coords() argument
211 const struct drm_framebuffer *fb = &kfb->base; in komeda_fb_check_src_coords()
239 komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane) in komeda_fb_get_pixel_addr() argument
241 struct drm_framebuffer *fb = &kfb->base; in komeda_fb_get_pixel_addr()
267 bool komeda_fb_is_layer_supported(struct komeda_fb *kfb, u32 layer_type, in komeda_fb_is_layer_supported() argument
270 struct drm_framebuffer *fb = &kfb->base; in komeda_fb_is_layer_supported()