2013-06-17 03:01:02 +08:00
|
|
|
/*
|
|
|
|
* rcar_du_group.c -- R-Car Display Unit Planes and CRTCs Group
|
|
|
|
*
|
2014-02-07 01:13:52 +08:00
|
|
|
* Copyright (C) 2013-2014 Renesas Electronics Corporation
|
2013-06-17 03:01:02 +08:00
|
|
|
*
|
|
|
|
* Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RCAR_DU_GROUP_H__
|
|
|
|
#define __RCAR_DU_GROUP_H__
|
|
|
|
|
2015-02-26 00:27:19 +08:00
|
|
|
#include <linux/mutex.h>
|
|
|
|
|
2013-06-17 03:01:02 +08:00
|
|
|
#include "rcar_du_plane.h"
|
|
|
|
|
|
|
|
struct rcar_du_device;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* struct rcar_du_group - CRTCs and planes group
|
|
|
|
* @dev: the DU device
|
|
|
|
* @mmio_offset: registers offset in the device memory map
|
|
|
|
* @index: group index
|
|
|
|
* @use_count: number of users of the group (rcar_du_group_(get|put))
|
|
|
|
* @used_crtcs: number of CRTCs currently in use
|
2015-02-26 00:27:19 +08:00
|
|
|
* @lock: protects the DPTSR register
|
2013-06-17 03:01:02 +08:00
|
|
|
* @planes: planes handled by the group
|
|
|
|
*/
|
|
|
|
struct rcar_du_group {
|
|
|
|
struct rcar_du_device *dev;
|
|
|
|
unsigned int mmio_offset;
|
|
|
|
unsigned int index;
|
|
|
|
|
|
|
|
unsigned int use_count;
|
|
|
|
unsigned int used_crtcs;
|
|
|
|
|
2015-02-26 00:27:19 +08:00
|
|
|
struct mutex lock;
|
|
|
|
|
2015-04-29 05:05:56 +08:00
|
|
|
struct rcar_du_plane planes[RCAR_DU_NUM_KMS_PLANES];
|
2013-06-17 03:01:02 +08:00
|
|
|
};
|
|
|
|
|
2013-06-17 06:29:25 +08:00
|
|
|
u32 rcar_du_group_read(struct rcar_du_group *rgrp, u32 reg);
|
|
|
|
void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data);
|
|
|
|
|
2013-06-17 03:01:02 +08:00
|
|
|
int rcar_du_group_get(struct rcar_du_group *rgrp);
|
|
|
|
void rcar_du_group_put(struct rcar_du_group *rgrp);
|
|
|
|
void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start);
|
|
|
|
void rcar_du_group_restart(struct rcar_du_group *rgrp);
|
2013-06-17 09:20:08 +08:00
|
|
|
int rcar_du_group_set_routing(struct rcar_du_group *rgrp);
|
2013-06-17 03:01:02 +08:00
|
|
|
|
|
|
|
#endif /* __RCAR_DU_GROUP_H__ */
|