blob: 748331bbb8fe9bbb099811b85752c7acd072193a [file] [log] [blame]
Laurent Pinchartcb2025d2013-06-16 21:01:02 +02001/*
2 * rcar_du_group.c -- R-Car Display Unit Planes and CRTCs Group
3 *
4 * Copyright (C) 2013 Renesas Corporation
5 *
6 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#ifndef __RCAR_DU_GROUP_H__
15#define __RCAR_DU_GROUP_H__
16
17#include "rcar_du_plane.h"
18
19struct rcar_du_device;
20
21/*
22 * struct rcar_du_group - CRTCs and planes group
23 * @dev: the DU device
24 * @mmio_offset: registers offset in the device memory map
25 * @index: group index
26 * @use_count: number of users of the group (rcar_du_group_(get|put))
27 * @used_crtcs: number of CRTCs currently in use
28 * @planes: planes handled by the group
29 */
30struct rcar_du_group {
31 struct rcar_du_device *dev;
32 unsigned int mmio_offset;
33 unsigned int index;
34
35 unsigned int use_count;
36 unsigned int used_crtcs;
37
38 struct rcar_du_planes planes;
39};
40
41int rcar_du_group_get(struct rcar_du_group *rgrp);
42void rcar_du_group_put(struct rcar_du_group *rgrp);
43void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start);
44void rcar_du_group_restart(struct rcar_du_group *rgrp);
45
46
47#endif /* __RCAR_DU_GROUP_H__ */