1
2
3
4
5
6
7
8
9
10 #ifndef __RCAR_DU_GROUP_H__
11 #define __RCAR_DU_GROUP_H__
12
13 #include <linux/mutex.h>
14
15 #include "rcar_du_plane.h"
16
17 struct rcar_du_device;
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 struct rcar_du_group {
35 struct rcar_du_device *dev;
36 unsigned int mmio_offset;
37 unsigned int index;
38
39 unsigned int channels_mask;
40 unsigned int num_crtcs;
41 unsigned int use_count;
42 unsigned int used_crtcs;
43
44 struct mutex lock;
45 unsigned int dptsr_planes;
46
47 unsigned int num_planes;
48 struct rcar_du_plane planes[RCAR_DU_NUM_KMS_PLANES];
49 bool need_restart;
50 };
51
52 u32 rcar_du_group_read(struct rcar_du_group *rgrp, u32 reg);
53 void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data);
54
55 int rcar_du_group_get(struct rcar_du_group *rgrp);
56 void rcar_du_group_put(struct rcar_du_group *rgrp);
57 void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start);
58 void rcar_du_group_restart(struct rcar_du_group *rgrp);
59 int rcar_du_group_set_routing(struct rcar_du_group *rgrp);
60
61 int rcar_du_set_dpad0_vsp1_routing(struct rcar_du_device *rcdu);
62
63 #endif