#ifndef _SUN4I_BACKEND_H_
#define _SUN4I_BACKEND_H_
#include <linux/clk.h>
#include <linux/list.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include "sunxi_engine.h"
#define SUN4I_BACKEND_MODCTL_REG …
#define SUN4I_BACKEND_MODCTL_LINE_SEL …
#define SUN4I_BACKEND_MODCTL_ITLMOD_EN …
#define SUN4I_BACKEND_MODCTL_OUT_SEL …
#define SUN4I_BACKEND_MODCTL_OUT_LCD0 …
#define SUN4I_BACKEND_MODCTL_OUT_LCD1 …
#define SUN4I_BACKEND_MODCTL_OUT_FE0 …
#define SUN4I_BACKEND_MODCTL_OUT_FE1 …
#define SUN4I_BACKEND_MODCTL_HWC_EN …
#define SUN4I_BACKEND_MODCTL_LAY_EN(l) …
#define SUN4I_BACKEND_MODCTL_OCSC_EN …
#define SUN4I_BACKEND_MODCTL_DFLK_EN …
#define SUN4I_BACKEND_MODCTL_DLP_START_CTL …
#define SUN4I_BACKEND_MODCTL_START_CTL …
#define SUN4I_BACKEND_MODCTL_DEBE_EN …
#define SUN4I_BACKEND_BACKCOLOR_REG …
#define SUN4I_BACKEND_BACKCOLOR(r, g, b) …
#define SUN4I_BACKEND_DISSIZE_REG …
#define SUN4I_BACKEND_DISSIZE(w, h) …
#define SUN4I_BACKEND_LAYSIZE_REG(l) …
#define SUN4I_BACKEND_LAYSIZE(w, h) …
#define SUN4I_BACKEND_LAYCOOR_REG(l) …
#define SUN4I_BACKEND_LAYCOOR(x, y) …
#define SUN4I_BACKEND_LAYLINEWIDTH_REG(l) …
#define SUN4I_BACKEND_LAYFB_L32ADD_REG(l) …
#define SUN4I_BACKEND_LAYFB_H4ADD_REG …
#define SUN4I_BACKEND_LAYFB_H4ADD_MSK(l) …
#define SUN4I_BACKEND_LAYFB_H4ADD(l, val) …
#define SUN4I_BACKEND_REGBUFFCTL_REG …
#define SUN4I_BACKEND_REGBUFFCTL_AUTOLOAD_DIS …
#define SUN4I_BACKEND_REGBUFFCTL_LOADCTL …
#define SUN4I_BACKEND_CKMAX_REG …
#define SUN4I_BACKEND_CKMIN_REG …
#define SUN4I_BACKEND_CKCFG_REG …
#define SUN4I_BACKEND_ATTCTL_REG0(l) …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA_MASK …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA(x) …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_PIPESEL_MASK …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_PIPESEL(x) …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_PRISEL_MASK …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_PRISEL(x) …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_YUVEN …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_VDOEN …
#define SUN4I_BACKEND_ATTCTL_REG0_LAY_GLBALPHA_EN …
#define SUN4I_BACKEND_ATTCTL_REG1(l) …
#define SUN4I_BACKEND_ATTCTL_REG1_LAY_HSCAFCT …
#define SUN4I_BACKEND_ATTCTL_REG1_LAY_WSCAFCT …
#define SUN4I_BACKEND_ATTCTL_REG1_LAY_FBFMT …
#define SUN4I_BACKEND_LAY_FBFMT_1BPP …
#define SUN4I_BACKEND_LAY_FBFMT_2BPP …
#define SUN4I_BACKEND_LAY_FBFMT_4BPP …
#define SUN4I_BACKEND_LAY_FBFMT_8BPP …
#define SUN4I_BACKEND_LAY_FBFMT_RGB655 …
#define SUN4I_BACKEND_LAY_FBFMT_RGB565 …
#define SUN4I_BACKEND_LAY_FBFMT_RGB556 …
#define SUN4I_BACKEND_LAY_FBFMT_ARGB1555 …
#define SUN4I_BACKEND_LAY_FBFMT_RGBA5551 …
#define SUN4I_BACKEND_LAY_FBFMT_XRGB8888 …
#define SUN4I_BACKEND_LAY_FBFMT_ARGB8888 …
#define SUN4I_BACKEND_LAY_FBFMT_RGB888 …
#define SUN4I_BACKEND_LAY_FBFMT_ARGB4444 …
#define SUN4I_BACKEND_LAY_FBFMT_RGBA4444 …
#define SUN4I_BACKEND_DLCDPCTL_REG …
#define SUN4I_BACKEND_DLCDPFRMBUF_ADDRCTL_REG …
#define SUN4I_BACKEND_DLCDPCOOR_REG0 …
#define SUN4I_BACKEND_DLCDPCOOR_REG1 …
#define SUN4I_BACKEND_INT_EN_REG …
#define SUN4I_BACKEND_INT_FLAG_REG …
#define SUN4I_BACKEND_REG_LOAD_FINISHED …
#define SUN4I_BACKEND_HWCCTL_REG …
#define SUN4I_BACKEND_HWCFBCTL_REG …
#define SUN4I_BACKEND_WBCTL_REG …
#define SUN4I_BACKEND_WBADD_REG …
#define SUN4I_BACKEND_WBLINEWIDTH_REG …
#define SUN4I_BACKEND_SPREN_REG …
#define SUN4I_BACKEND_SPRFMTCTL_REG …
#define SUN4I_BACKEND_SPRALPHACTL_REG …
#define SUN4I_BACKEND_IYUVCTL_REG …
#define SUN4I_BACKEND_IYUVCTL_FBFMT_MASK …
#define SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV444 …
#define SUN4I_BACKEND_IYUVCTL_FBFMT_PACKED_YUV422 …
#define SUN4I_BACKEND_IYUVCTL_FBFMT_PLANAR_YUV444 …
#define SUN4I_BACKEND_IYUVCTL_FBFMT_PLANAR_YUV222 …
#define SUN4I_BACKEND_IYUVCTL_FBFMT_PLANAR_YUV111 …
#define SUN4I_BACKEND_IYUVCTL_FBPS_MASK …
#define SUN4I_BACKEND_IYUVCTL_FBPS_YVYU …
#define SUN4I_BACKEND_IYUVCTL_FBPS_VYUY …
#define SUN4I_BACKEND_IYUVCTL_FBPS_YUYV …
#define SUN4I_BACKEND_IYUVCTL_FBPS_UYVY …
#define SUN4I_BACKEND_IYUVCTL_FBPS_VUYA …
#define SUN4I_BACKEND_IYUVCTL_FBPS_AYUV …
#define SUN4I_BACKEND_IYUVCTL_EN …
#define SUN4I_BACKEND_IYUVADD_REG(c) …
#define SUN4I_BACKEND_IYUVLINEWIDTH_REG(c) …
#define SUN4I_BACKEND_YGCOEF_REG(c) …
#define SUN4I_BACKEND_YGCONS_REG …
#define SUN4I_BACKEND_URCOEF_REG(c) …
#define SUN4I_BACKEND_URCONS_REG …
#define SUN4I_BACKEND_VBCOEF_REG(c) …
#define SUN4I_BACKEND_VBCONS_REG …
#define SUN4I_BACKEND_KSCTL_REG …
#define SUN4I_BACKEND_KSBKCOLOR_REG …
#define SUN4I_BACKEND_KSFSTLINEWIDTH_REG …
#define SUN4I_BACKEND_KSVSCAFCT_REG …
#define SUN4I_BACKEND_KSHSCACOEF_REG(x) …
#define SUN4I_BACKEND_OCCTL_REG …
#define SUN4I_BACKEND_OCCTL_ENABLE …
#define SUN4I_BACKEND_OCRCOEF_REG(x) …
#define SUN4I_BACKEND_OCRCONS_REG …
#define SUN4I_BACKEND_OCGCOEF_REG(x) …
#define SUN4I_BACKEND_OCGCONS_REG …
#define SUN4I_BACKEND_OCBCOEF_REG(x) …
#define SUN4I_BACKEND_OCBCONS_REG …
#define SUN4I_BACKEND_SPRCOORCTL_REG(s) …
#define SUN4I_BACKEND_SPRATTCTL_REG(s) …
#define SUN4I_BACKEND_SPRADD_REG(s) …
#define SUN4I_BACKEND_SPRLINEWIDTH_REG(s) …
#define SUN4I_BACKEND_SPRPALTAB_OFF …
#define SUN4I_BACKEND_GAMMATAB_OFF …
#define SUN4I_BACKEND_HWCPATTERN_OFF …
#define SUN4I_BACKEND_HWCCOLORTAB_OFF …
#define SUN4I_BACKEND_PIPE_OFF(p) …
#define SUN4I_BACKEND_NUM_LAYERS …
#define SUN4I_BACKEND_NUM_FRONTEND_LAYERS …
#define SUN4I_BACKEND_NUM_YUV_PLANES …
struct sun4i_backend { … };
static inline struct sun4i_backend *
engine_to_sun4i_backend(struct sunxi_engine *engine)
{ … }
void sun4i_backend_layer_enable(struct sun4i_backend *backend,
int layer, bool enable);
bool sun4i_backend_format_is_supported(uint32_t fmt, uint64_t modifier);
int sun4i_backend_update_layer_coord(struct sun4i_backend *backend,
int layer, struct drm_plane *plane);
int sun4i_backend_update_layer_formats(struct sun4i_backend *backend,
int layer, struct drm_plane *plane);
int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
int layer, struct drm_plane *plane);
int sun4i_backend_update_layer_frontend(struct sun4i_backend *backend,
int layer, uint32_t in_fmt);
int sun4i_backend_update_layer_zpos(struct sun4i_backend *backend,
int layer, struct drm_plane *plane);
void sun4i_backend_cleanup_layer(struct sun4i_backend *backend,
int layer);
#endif