2 * Copyright (C) 2016 BayLibre, SAS
3 * Author: Neil Armstrong <narmstrong@baylibre.com>
4 * Copyright (C) 2014 Endless Mobile
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.
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.
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/>.
20 /* Canvas LUT Memory */
22 #ifndef __MESON_CANVAS_H
23 #define __MESON_CANVAS_H
25 #define MESON_CANVAS_ID_OSD1 0x4e
26 #define MESON_CANVAS_ID_VD1_0 0x60
27 #define MESON_CANVAS_ID_VD1_1 0x61
28 #define MESON_CANVAS_ID_VD1_2 0x62
30 /* Canvas configuration. */
31 #define MESON_CANVAS_WRAP_NONE 0x00
32 #define MESON_CANVAS_WRAP_X 0x01
33 #define MESON_CANVAS_WRAP_Y 0x02
35 #define MESON_CANVAS_BLKMODE_LINEAR 0x00
36 #define MESON_CANVAS_BLKMODE_32x32 0x01
37 #define MESON_CANVAS_BLKMODE_64x64 0x02
39 #define MESON_CANVAS_ENDIAN_SWAP16 0x1
40 #define MESON_CANVAS_ENDIAN_SWAP32 0x3
41 #define MESON_CANVAS_ENDIAN_SWAP64 0x7
42 #define MESON_CANVAS_ENDIAN_SWAP128 0xf
44 void meson_canvas_setup(struct meson_drm
*priv
,
45 uint32_t canvas_index
, uint32_t addr
,
46 uint32_t stride
, uint32_t height
,
51 #endif /* __MESON_CANVAS_H */