1
2
3
4
5
6
7 #ifndef _KOMEDA_FRAMEBUFFER_H_
8 #define _KOMEDA_FRAMEBUFFER_H_
9
10 #include <drm/drm_framebuffer.h>
11 #include "komeda_format_caps.h"
12
13
14
15
16 struct komeda_fb {
17
18 struct drm_framebuffer base;
19
20
21
22
23 const struct komeda_format_caps *format_caps;
24
25 bool is_va;
26
27 u32 aligned_w;
28
29 u32 aligned_h;
30
31 u32 afbc_size;
32
33 u32 offset_payload;
34 };
35
36 #define to_kfb(dfb) container_of(dfb, struct komeda_fb, base)
37
38 struct drm_framebuffer *
39 komeda_fb_create(struct drm_device *dev, struct drm_file *file,
40 const struct drm_mode_fb_cmd2 *mode_cmd);
41 int komeda_fb_check_src_coords(const struct komeda_fb *kfb,
42 u32 src_x, u32 src_y, u32 src_w, u32 src_h);
43 dma_addr_t
44 komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane);
45 bool komeda_fb_is_layer_supported(struct komeda_fb *kfb, u32 layer_type,
46 u32 rot);
47
48 #endif