This source file includes following definitions.
- to_rcar_plane
- to_rcar_plane_state
- rcar_du_plane_setup
1
2
3
4
5
6
7
8
9
10 #ifndef __RCAR_DU_PLANE_H__
11 #define __RCAR_DU_PLANE_H__
12
13 #include <drm/drm_plane.h>
14
15 struct rcar_du_format_info;
16 struct rcar_du_group;
17
18
19
20
21
22
23
24 #define RCAR_DU_NUM_KMS_PLANES 9
25 #define RCAR_DU_NUM_HW_PLANES 8
26
27 enum rcar_du_plane_source {
28 RCAR_DU_PLANE_MEMORY,
29 RCAR_DU_PLANE_VSPD0,
30 RCAR_DU_PLANE_VSPD1,
31 };
32
33 struct rcar_du_plane {
34 struct drm_plane plane;
35 struct rcar_du_group *group;
36 };
37
38 static inline struct rcar_du_plane *to_rcar_plane(struct drm_plane *plane)
39 {
40 return container_of(plane, struct rcar_du_plane, plane);
41 }
42
43
44
45
46
47
48
49
50 struct rcar_du_plane_state {
51 struct drm_plane_state state;
52
53 const struct rcar_du_format_info *format;
54 int hwindex;
55 enum rcar_du_plane_source source;
56
57 unsigned int colorkey;
58 };
59
60 static inline struct rcar_du_plane_state *
61 to_rcar_plane_state(struct drm_plane_state *state)
62 {
63 return container_of(state, struct rcar_du_plane_state, state);
64 }
65
66 int rcar_du_atomic_check_planes(struct drm_device *dev,
67 struct drm_atomic_state *state);
68
69 int __rcar_du_plane_atomic_check(struct drm_plane *plane,
70 struct drm_plane_state *state,
71 const struct rcar_du_format_info **format);
72
73 int rcar_du_planes_init(struct rcar_du_group *rgrp);
74
75 void __rcar_du_plane_setup(struct rcar_du_group *rgrp,
76 const struct rcar_du_plane_state *state);
77
78 static inline void rcar_du_plane_setup(struct rcar_du_plane *plane)
79 {
80 struct rcar_du_plane_state *state =
81 to_rcar_plane_state(plane->plane.state);
82
83 return __rcar_du_plane_setup(plane->group, state);
84 }
85
86 #endif