0001
0002
0003
0004
0005 #ifndef __SOC_MESON_CANVAS_H
0006 #define __SOC_MESON_CANVAS_H
0007
0008 #include <linux/kernel.h>
0009
0010 #define MESON_CANVAS_WRAP_NONE 0x00
0011 #define MESON_CANVAS_WRAP_X 0x01
0012 #define MESON_CANVAS_WRAP_Y 0x02
0013
0014 #define MESON_CANVAS_BLKMODE_LINEAR 0x00
0015 #define MESON_CANVAS_BLKMODE_32x32 0x01
0016 #define MESON_CANVAS_BLKMODE_64x64 0x02
0017
0018 #define MESON_CANVAS_ENDIAN_SWAP16 0x1
0019 #define MESON_CANVAS_ENDIAN_SWAP32 0x3
0020 #define MESON_CANVAS_ENDIAN_SWAP64 0x7
0021 #define MESON_CANVAS_ENDIAN_SWAP128 0xf
0022
0023 struct device;
0024 struct meson_canvas;
0025
0026
0027
0028
0029
0030
0031 struct meson_canvas *meson_canvas_get(struct device *dev);
0032
0033
0034
0035
0036
0037
0038
0039 int meson_canvas_alloc(struct meson_canvas *canvas, u8 *canvas_index);
0040
0041
0042
0043
0044
0045
0046
0047 int meson_canvas_free(struct meson_canvas *canvas, u8 canvas_index);
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 int meson_canvas_config(struct meson_canvas *canvas, u8 canvas_index,
0062 u32 addr, u32 stride, u32 height,
0063 unsigned int wrap, unsigned int blkmode,
0064 unsigned int endian);
0065
0066 #endif