drm: rcar-du: Add plane allocation debugging
[deliverable/linux.git] / drivers / gpu / drm / rcar-du / rcar_du_group.h
CommitLineData
cb2025d2
LP
1/*
2 * rcar_du_group.c -- R-Car Display Unit Planes and CRTCs Group
3 *
36d50464 4 * Copyright (C) 2013-2014 Renesas Electronics Corporation
cb2025d2
LP
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
5ee5a81d
LP
17#include <linux/mutex.h>
18
cb2025d2
LP
19#include "rcar_du_plane.h"
20
21struct rcar_du_device;
22
23/*
24 * struct rcar_du_group - CRTCs and planes group
25 * @dev: the DU device
26 * @mmio_offset: registers offset in the device memory map
27 * @index: group index
28 * @use_count: number of users of the group (rcar_du_group_(get|put))
29 * @used_crtcs: number of CRTCs currently in use
5ee5a81d 30 * @lock: protects the DPTSR register
cb2025d2
LP
31 * @planes: planes handled by the group
32 */
33struct rcar_du_group {
34 struct rcar_du_device *dev;
35 unsigned int mmio_offset;
36 unsigned int index;
37
38 unsigned int use_count;
39 unsigned int used_crtcs;
40
5ee5a81d
LP
41 struct mutex lock;
42
99caede1 43 struct rcar_du_plane planes[RCAR_DU_NUM_KMS_PLANES];
cb2025d2
LP
44};
45
a5f0ef59
LP
46u32 rcar_du_group_read(struct rcar_du_group *rgrp, u32 reg);
47void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data);
48
cb2025d2
LP
49int rcar_du_group_get(struct rcar_du_group *rgrp);
50void rcar_du_group_put(struct rcar_du_group *rgrp);
51void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start);
52void rcar_du_group_restart(struct rcar_du_group *rgrp);
7cbc05cb 53int rcar_du_group_set_routing(struct rcar_du_group *rgrp);
cb2025d2
LP
54
55#endif /* __RCAR_DU_GROUP_H__ */
This page took 0.11574 seconds and 5 git commands to generate.