1 /*
2  * Copyright (C) 2016 BayLibre, SAS
3  * Author: Neil Armstrong <narmstrong@baylibre.com>
4  * Copyright (C) 2014 Endless Mobile
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 /* Canvas LUT Memory */
21 
22 #ifndef __MESON_CANVAS_H
23 #define __MESON_CANVAS_H
24 
25 #define MESON_CANVAS_ID_OSD1	0x4e
26 
27 /* Canvas configuration. */
28 #define MESON_CANVAS_WRAP_NONE	0x00
29 #define	MESON_CANVAS_WRAP_X	0x01
30 #define	MESON_CANVAS_WRAP_Y	0x02
31 
32 #define	MESON_CANVAS_BLKMODE_LINEAR	0x00
33 #define	MESON_CANVAS_BLKMODE_32x32	0x01
34 #define	MESON_CANVAS_BLKMODE_64x64	0x02
35 
36 void meson_canvas_setup(struct meson_drm *priv,
37 			uint32_t canvas_index, uint32_t addr,
38 			uint32_t stride, uint32_t height,
39 			unsigned int wrap,
40 			unsigned int blkmode);
41 
42 #endif /* __MESON_CANVAS_H */
43