2 * Copyright (C) 2016 BayLibre, SAS
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #include <linux/platform_device.h>
23 #include <linux/regmap.h>
25 #include <linux/soc/amlogic/meson-canvas.h>
30 void __iomem *io_base;
35 struct meson_canvas *canvas;
41 struct drm_device *drm;
42 struct drm_crtc *crtc;
43 struct drm_plane *primary_plane;
44 struct drm_plane *overlay_plane;
51 uint32_t osd1_ctrl_stat;
52 uint32_t osd1_blk0_cfg[5];
56 uint32_t osd_sc_ctrl0;
57 uint32_t osd_sc_i_wh_m1;
58 uint32_t osd_sc_o_h_start_end;
59 uint32_t osd_sc_o_v_start_end;
60 uint32_t osd_sc_v_ini_phase;
61 uint32_t osd_sc_v_phase_step;
62 uint32_t osd_sc_h_ini_phase;
63 uint32_t osd_sc_h_phase_step;
64 uint32_t osd_sc_h_ctrl0;
65 uint32_t osd_sc_v_ctrl0;
69 unsigned int vd1_planes;
70 uint32_t vd1_if0_gen_reg;
71 uint32_t vd1_if0_luma_x0;
72 uint32_t vd1_if0_luma_y0;
73 uint32_t vd1_if0_chroma_x0;
74 uint32_t vd1_if0_chroma_y0;
75 uint32_t vd1_if0_repeat_loop;
76 uint32_t vd1_if0_luma0_rpt_pat;
77 uint32_t vd1_if0_chroma0_rpt_pat;
78 uint32_t vd1_range_map_y;
79 uint32_t vd1_range_map_cb;
80 uint32_t vd1_range_map_cr;
81 uint32_t viu_vd1_fmt_w;
82 uint32_t vd1_if0_canvas0;
83 uint32_t vd1_if0_gen_reg2;
84 uint32_t viu_vd1_fmt_ctrl;
94 uint32_t vpp_pic_in_height;
95 uint32_t vpp_postblend_vd1_h_start_end;
96 uint32_t vpp_postblend_vd1_v_start_end;
97 uint32_t vpp_hsc_region12_startp;
98 uint32_t vpp_hsc_region34_startp;
99 uint32_t vpp_hsc_region4_endp;
100 uint32_t vpp_hsc_start_phase_step;
101 uint32_t vpp_hsc_region1_phase_slope;
102 uint32_t vpp_hsc_region3_phase_slope;
103 uint32_t vpp_line_in_length;
104 uint32_t vpp_preblend_h_size;
105 uint32_t vpp_vsc_region12_startp;
106 uint32_t vpp_vsc_region34_startp;
107 uint32_t vpp_vsc_region4_endp;
108 uint32_t vpp_vsc_start_phase_step;
109 uint32_t vpp_vsc_ini_phase;
110 uint32_t vpp_vsc_phase_ctrl;
111 uint32_t vpp_hsc_phase_ctrl;
112 uint32_t vpp_blend_vd2_h_start_end;
113 uint32_t vpp_blend_vd2_v_start_end;
117 unsigned int current_mode;
124 static inline int meson_vpu_is_compatible(struct meson_drm *priv,
127 return of_device_is_compatible(priv->dev->of_node, compat);
130 #endif /* __MESON_DRV_H */