xref: /openbmc/linux/drivers/gpu/drm/meson/meson_osd_afbcd.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1d1b5e41eSNeil Armstrong /* SPDX-License-Identifier: GPL-2.0+ */
2d1b5e41eSNeil Armstrong /*
3d1b5e41eSNeil Armstrong  * Copyright (C) 2019 BayLibre, SAS
4d1b5e41eSNeil Armstrong  * Author: Neil Armstrong <narmstrong@baylibre.com>
5d1b5e41eSNeil Armstrong  */
6d1b5e41eSNeil Armstrong 
7d1b5e41eSNeil Armstrong #ifndef __MESON_OSD_AFBCD_H
8d1b5e41eSNeil Armstrong #define __MESON_OSD_AFBCD_H
9d1b5e41eSNeil Armstrong 
10d1b5e41eSNeil Armstrong #include "meson_drv.h"
11d1b5e41eSNeil Armstrong 
12d1b5e41eSNeil Armstrong /* This is an internal address used to transfer pixel from AFBC to the VIU */
13d1b5e41eSNeil Armstrong #define MESON_G12A_AFBCD_OUT_ADDR	0x1000000
14d1b5e41eSNeil Armstrong 
15d1b5e41eSNeil Armstrong struct meson_afbcd_ops {
16d1b5e41eSNeil Armstrong 	int (*init)(struct meson_drm *priv);
17*04b8a5d9SMartin Blumenstingl 	void (*exit)(struct meson_drm *priv);
18d1b5e41eSNeil Armstrong 	int (*reset)(struct meson_drm *priv);
19d1b5e41eSNeil Armstrong 	int (*enable)(struct meson_drm *priv);
20d1b5e41eSNeil Armstrong 	int (*disable)(struct meson_drm *priv);
21d1b5e41eSNeil Armstrong 	int (*setup)(struct meson_drm *priv);
22d1b5e41eSNeil Armstrong 	int (*fmt_to_blk_mode)(u64 modifier, uint32_t format);
23d1b5e41eSNeil Armstrong 	bool (*supported_fmt)(u64 modifier, uint32_t format);
24d1b5e41eSNeil Armstrong };
25d1b5e41eSNeil Armstrong 
26d1b5e41eSNeil Armstrong extern struct meson_afbcd_ops meson_afbcd_gxm_ops;
27d1b5e41eSNeil Armstrong extern struct meson_afbcd_ops meson_afbcd_g12a_ops;
28d1b5e41eSNeil Armstrong 
29d1b5e41eSNeil Armstrong #endif /* __MESON_OSD_AFBCD_H */
30