blob: dbac9686ea69be03f1ef70ecb2396ee38fa41217 [file] [log] [blame]
Laurent Pinchart629bb6d2013-07-10 18:03:46 -03001/*
2 * vsp1_bru.h -- R-Car VSP1 Blend ROP Unit
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#ifndef __VSP1_BRU_H__
14#define __VSP1_BRU_H__
15
16#include <media/media-entity.h>
Laurent Pincharta16e2792014-05-27 22:46:30 -030017#include <media/v4l2-ctrls.h>
Laurent Pinchart629bb6d2013-07-10 18:03:46 -030018#include <media/v4l2-subdev.h>
19
20#include "vsp1_entity.h"
21
22struct vsp1_device;
Laurent Pinchart6418b4d2014-05-27 20:35:36 -030023struct vsp1_rwpf;
Laurent Pinchart629bb6d2013-07-10 18:03:46 -030024
25#define BRU_PAD_SINK(n) (n)
Laurent Pinchart629bb6d2013-07-10 18:03:46 -030026
27struct vsp1_bru {
28 struct vsp1_entity entity;
29
Laurent Pincharta16e2792014-05-27 22:46:30 -030030 struct v4l2_ctrl_handler ctrls;
31
Laurent Pinchart6418b4d2014-05-27 20:35:36 -030032 struct {
33 struct vsp1_rwpf *rpf;
34 struct v4l2_rect compose;
Laurent Pincharta96c5fa2015-08-03 09:46:26 -030035 } inputs[VSP1_MAX_RPF];
Laurent Pinchart629bb6d2013-07-10 18:03:46 -030036};
37
38static inline struct vsp1_bru *to_bru(struct v4l2_subdev *subdev)
39{
40 return container_of(subdev, struct vsp1_bru, entity.subdev);
41}
42
43struct vsp1_bru *vsp1_bru_create(struct vsp1_device *vsp1);
44
45#endif /* __VSP1_BRU_H__ */