forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
....@@ -1,42 +1,52 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
34 * Author:Mark Yao <mark.yao@rock-chips.com>
4
- *
5
- * This software is licensed under the terms of the GNU General Public
6
- * License version 2, as published by the Free Software Foundation, and
7
- * may be copied, distributed, and modified under those terms.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #ifndef _ROCKCHIP_DRM_VOP_H
168 #define _ROCKCHIP_DRM_VOP_H
9
+
10
+#include <drm/drm_plane.h>
11
+#include <drm/drm_modes.h>
12
+
1713 #include "rockchip_drm_drv.h"
1814
1915 /*
2016 * major: IP major version, used for IP structure
2117 * minor: big feature change under same structure
18
+ * build: RTL current SVN number
2219 */
2320 #define VOP_VERSION(major, minor) ((major) << 8 | (minor))
2421 #define VOP_MAJOR(version) ((version) >> 8)
2522 #define VOP_MINOR(version) ((version) & 0xff)
2623
27
-#define VOP_VERSION_RK3528 VOP_VERSION(0x50, 0x17)
28
-#define VOP_VERSION_RK3568 VOP_VERSION(0x40, 0x15)
29
-#define VOP_VERSION_RK3588 VOP_VERSION(0x40, 0x17)
24
+#define VOP2_VERSION(major, minor, build) ((major) << 24 | (minor) << 16 | (build))
25
+#define VOP2_MAJOR(version) (((version) >> 24) & 0xff)
26
+#define VOP2_MINOR(version) (((version) >> 16) & 0xff)
27
+#define VOP2_BUILD(version) ((version) & 0xffff)
3028
29
+#define VOP_VERSION_RK3528 VOP2_VERSION(0x50, 0x17, 0x1263)
30
+#define VOP_VERSION_RK3562 VOP2_VERSION(0x50, 0x17, 0x4350)
31
+#define VOP_VERSION_RK3568 VOP2_VERSION(0x40, 0x15, 0x8023)
32
+#define VOP_VERSION_RK3588 VOP2_VERSION(0x40, 0x17, 0x6786)
33
+
34
+/* register one connector */
3135 #define ROCKCHIP_OUTPUT_DUAL_CHANNEL_LEFT_RIGHT_MODE BIT(0)
36
+/* register one connector */
3237 #define ROCKCHIP_OUTPUT_DUAL_CHANNEL_ODD_EVEN_MODE BIT(1)
3338 #define ROCKCHIP_OUTPUT_DATA_SWAP BIT(2)
39
+/* MIPI DSI DataStream(cmd) mode on rk3588 */
40
+#define ROCKCHIP_OUTPUT_MIPI_DS_MODE BIT(3)
41
+/* register two connector */
42
+#define ROCKCHIP_OUTPUT_DUAL_CONNECTOR_SPLIT_MODE BIT(4)
3443
3544 #define AFBDC_FMT_RGB565 0x0
3645 #define AFBDC_FMT_U8U8U8U8 0x5
3746 #define AFBDC_FMT_U8U8U8 0x4
38
-#define VOP_FEATURE_OUTPUT_10BIT BIT(0)
39
-#define VOP_FEATURE_AFBDC BIT(1)
47
+
48
+#define VOP_FEATURE_OUTPUT_RGB10 BIT(0)
49
+#define VOP_FEATURE_INTERNAL_RGB BIT(1)
4050 #define VOP_FEATURE_ALPHA_SCALE BIT(2)
4151 #define VOP_FEATURE_HDR10 BIT(3)
4252 #define VOP_FEATURE_NEXT_HDR BIT(4)
....@@ -47,12 +57,17 @@
4757 #define VOP_FEATURE_POST_ACM BIT(8)
4858 #define VOP_FEATURE_POST_CSC BIT(9)
4959
60
+#define VOP_FEATURE_OUTPUT_10BIT VOP_FEATURE_OUTPUT_RGB10
61
+
62
+
5063 #define WIN_FEATURE_HDR2SDR BIT(0)
5164 #define WIN_FEATURE_SDR2HDR BIT(1)
5265 #define WIN_FEATURE_PRE_OVERLAY BIT(2)
5366 #define WIN_FEATURE_AFBDC BIT(3)
5467 #define WIN_FEATURE_CLUSTER_MAIN BIT(4)
5568 #define WIN_FEATURE_CLUSTER_SUB BIT(5)
69
+/* Left win in splice mode */
70
+#define WIN_FEATURE_SPLICE_LEFT BIT(6)
5671 /* a mirror win can only get fb address
5772 * from source win:
5873 * Cluster1---->Cluster0
....@@ -66,6 +81,15 @@
6681
6782
6883 #define VOP2_SOC_VARIANT 4
84
+
85
+#define ROCKCHIP_DSC_PPS_SIZE_BYTE 88
86
+
87
+enum vop_vp_id {
88
+ ROCKCHIP_VOP_VP0 = 0,
89
+ ROCKCHIP_VOP_VP1,
90
+ ROCKCHIP_VOP_VP2,
91
+ ROCKCHIP_VOP_VP3,
92
+};
6993
7094 enum bcsh_out_mode {
7195 BCSH_OUT_MODE_BLACK,
....@@ -88,7 +112,7 @@
88112 /*
89113 * the delay number of a window in different mode.
90114 */
91
-enum win_dly_mode {
115
+enum vop2_win_dly_mode {
92116 VOP2_DLY_MODE_DEFAULT, /**< default mode */
93117 VOP2_DLY_MODE_HISO_S, /** HDR in SDR out mode, as a SDR window */
94118 VOP2_DLY_MODE_HIHO_H, /** HDR in HDR out mode, as a HDR window */
....@@ -101,6 +125,39 @@
101125 VOP3_ESMART_4K_2K_2K_MODE,
102126 VOP3_ESMART_2K_2K_2K_2K_MODE,
103127 };
128
+
129
+/*
130
+ * vop2 dsc id
131
+ */
132
+#define ROCKCHIP_VOP2_DSC_8K 0
133
+#define ROCKCHIP_VOP2_DSC_4K 1
134
+
135
+/*
136
+ * vop2 internal power domain id,
137
+ * should be all none zero, 0 will be
138
+ * treat as invalid;
139
+ */
140
+#define VOP2_PD_CLUSTER0 BIT(0)
141
+#define VOP2_PD_CLUSTER1 BIT(1)
142
+#define VOP2_PD_CLUSTER2 BIT(2)
143
+#define VOP2_PD_CLUSTER3 BIT(3)
144
+#define VOP2_PD_DSC_8K BIT(5)
145
+#define VOP2_PD_DSC_4K BIT(6)
146
+#define VOP2_PD_ESMART BIT(7)
147
+
148
+/*
149
+ * vop2 submem power gate,
150
+ * should be all none zero, 0 will be
151
+ * treat as invalid;
152
+ */
153
+#define VOP2_MEM_PG_VP0 BIT(0)
154
+#define VOP2_MEM_PG_VP1 BIT(1)
155
+#define VOP2_MEM_PG_VP2 BIT(2)
156
+#define VOP2_MEM_PG_VP3 BIT(3)
157
+#define VOP2_MEM_PG_DB0 BIT(4)
158
+#define VOP2_MEM_PG_DB1 BIT(5)
159
+#define VOP2_MEM_PG_DB2 BIT(6)
160
+#define VOP2_MEM_PG_WB BIT(7)
104161
105162 #define DSP_BG_SWAP 0x1
106163 #define DSP_RB_SWAP 0x2
....@@ -139,6 +196,13 @@
139196 VOP_FMT_YUV420SP = 4,
140197 VOP_FMT_YUV422SP,
141198 VOP_FMT_YUV444SP,
199
+};
200
+
201
+enum vop_dsc_interface_mode {
202
+ VOP_DSC_IF_DISABLE = 0,
203
+ VOP_DSC_IF_HDMI = 1,
204
+ VOP_DSC_IF_MIPI_DS_MODE = 2,
205
+ VOP_DSC_IF_MIPI_VIDEO_MODE = 3,
142206 };
143207
144208 struct vop_reg_data {
....@@ -191,6 +255,7 @@
191255 struct vop_reg post_scl_factor;
192256 struct vop_reg post_scl_ctrl;
193257 struct vop_reg dsp_interlace;
258
+ struct vop_reg dsp_interlace_pol;
194259 struct vop_reg global_regdone_en;
195260 struct vop_reg auto_gate_en;
196261 struct vop_reg post_lb_mode;
....@@ -236,6 +301,11 @@
236301 struct vop_reg sw_uv_offset_en;
237302 struct vop_reg dsp_out_yuv;
238303 struct vop_reg dsp_data_swap;
304
+ struct vop_reg dsp_bg_swap;
305
+ struct vop_reg dsp_rb_swap;
306
+ struct vop_reg dsp_rg_swap;
307
+ struct vop_reg dsp_delta_swap;
308
+ struct vop_reg dsp_dummy_swap;
239309 struct vop_reg yuv_clip;
240310 struct vop_reg dsp_ccir656_avg;
241311 struct vop_reg dsp_black;
....@@ -582,6 +652,7 @@
582652 struct vop_reg gate;
583653 struct vop_reg enable;
584654 struct vop_reg format;
655
+ struct vop_reg interlace_read;
585656 struct vop_reg fmt_10;
586657 struct vop_reg fmt_yuyv;
587658 struct vop_reg csc_mode;
....@@ -605,6 +676,17 @@
605676 struct vop_reg global_alpha_val;
606677 struct vop_reg color_key;
607678 struct vop_reg color_key_en;
679
+};
680
+
681
+struct vop_win_data {
682
+ uint32_t base;
683
+ enum drm_plane_type type;
684
+ const struct vop_win_phy *phy;
685
+ const struct vop_win_phy **area;
686
+ const uint64_t *format_modifiers;
687
+ const struct vop_csc *csc;
688
+ unsigned int area_size;
689
+ u64 feature;
608690 };
609691
610692 struct vop2_cluster_regs {
....@@ -701,7 +783,9 @@
701783 struct vop_reg pre_scan_htiming;
702784 struct vop_reg htotal_pw;
703785 struct vop_reg hact_st_end;
704
- struct vop_reg vtotal_pw;
786
+ struct vop_reg dsp_vtotal;
787
+ struct vop_reg sw_dsp_vtotal_imd;
788
+ struct vop_reg dsp_vs_end;
705789 struct vop_reg vact_st_end;
706790 struct vop_reg vact_st_end_f1;
707791 struct vop_reg vs_st_end_f1;
....@@ -719,8 +803,8 @@
719803
720804 struct vop_reg core_dclk_div;
721805 struct vop_reg p2i_en;
722
- struct vop_reg mipi_dual_en;
723
- struct vop_reg mipi_dual_channel_swap;
806
+ struct vop_reg dual_channel_en;
807
+ struct vop_reg dual_channel_swap;
724808 struct vop_reg dsp_lut_en;
725809
726810 struct vop_reg dclk_div2;
....@@ -783,11 +867,37 @@
783867 struct vop_reg cubic_lut_update_en;
784868 struct vop_reg cubic_lut_mst;
785869
870
+ /* cru */
871
+ struct vop_reg dclk_core_div;
872
+ struct vop_reg dclk_out_div;
873
+ struct vop_reg dclk_src_sel;
874
+
875
+ struct vop_reg splice_en;
876
+
786877 struct vop_reg edpi_wms_hold_en;
787878 struct vop_reg edpi_te_en;
788879 struct vop_reg edpi_wms_fs;
789880 struct vop_reg gamma_update_en;
790881 struct vop_reg lut_dma_rid;
882
+
883
+ /* MCU output */
884
+ struct vop_reg mcu_pix_total;
885
+ struct vop_reg mcu_cs_pst;
886
+ struct vop_reg mcu_cs_pend;
887
+ struct vop_reg mcu_rw_pst;
888
+ struct vop_reg mcu_rw_pend;
889
+ struct vop_reg mcu_clk_sel;
890
+ struct vop_reg mcu_hold_mode;
891
+ struct vop_reg mcu_frame_st;
892
+ struct vop_reg mcu_rs;
893
+ struct vop_reg mcu_bypass;
894
+ struct vop_reg mcu_type;
895
+ struct vop_reg mcu_rw_bypass_port;
896
+
897
+ /* for DCF */
898
+ struct vop_reg line_flag_or_en;
899
+ struct vop_reg dsp_hold_or_en;
900
+ struct vop_reg almost_full_or_en;
791901
792902 /* CSC */
793903 struct vop_reg acm_bypass_en;
....@@ -807,6 +917,58 @@
807917 struct vop_reg csc_offset0;
808918 struct vop_reg csc_offset1;
809919 struct vop_reg csc_offset2;
920
+
921
+ /* color bar */
922
+ struct vop_reg color_bar_en;
923
+ struct vop_reg color_bar_mode;
924
+};
925
+
926
+struct vop2_power_domain_regs {
927
+ struct vop_reg pd;
928
+ struct vop_reg status;
929
+ struct vop_reg bisr_en_status;
930
+ struct vop_reg pmu_status;
931
+};
932
+
933
+struct vop2_dsc_regs {
934
+ /* DSC SYS CTRL */
935
+ struct vop_reg dsc_port_sel;
936
+ struct vop_reg dsc_man_mode;
937
+ struct vop_reg dsc_interface_mode;
938
+ struct vop_reg dsc_pixel_num;
939
+ struct vop_reg dsc_pxl_clk_div;
940
+ struct vop_reg dsc_cds_clk_div;
941
+ struct vop_reg dsc_txp_clk_div;
942
+ struct vop_reg dsc_init_dly_mode;
943
+ struct vop_reg dsc_scan_en;
944
+ struct vop_reg dsc_halt_en;
945
+ struct vop_reg rst_deassert;
946
+ struct vop_reg dsc_flush;
947
+ struct vop_reg dsc_cfg_done;
948
+ struct vop_reg dsc_init_dly_num;
949
+ struct vop_reg scan_timing_para_imd_en;
950
+ struct vop_reg dsc_htotal_pw;
951
+ struct vop_reg dsc_hact_st_end;
952
+ struct vop_reg dsc_vtotal;
953
+ struct vop_reg dsc_vs_end;
954
+ struct vop_reg dsc_vact_st_end;
955
+ struct vop_reg dsc_error_status;
956
+
957
+ /* DSC encoder */
958
+ struct vop_reg dsc_pps0_3;
959
+ struct vop_reg dsc_en;
960
+ struct vop_reg dsc_rbit;
961
+ struct vop_reg dsc_rbyt;
962
+ struct vop_reg dsc_flal;
963
+ struct vop_reg dsc_mer;
964
+ struct vop_reg dsc_epb;
965
+ struct vop_reg dsc_epl;
966
+ struct vop_reg dsc_nslc;
967
+ struct vop_reg dsc_sbo;
968
+ struct vop_reg dsc_ifep;
969
+ struct vop_reg dsc_pps_upd;
970
+ struct vop_reg dsc_status;
971
+ struct vop_reg dsc_ecw;
810972 };
811973
812974 struct vop2_wb_regs {
....@@ -825,19 +987,39 @@
825987 struct vop_reg axi_uv_id;
826988 };
827989
828
-struct vop_win_data {
829
- uint32_t base;
830
- enum drm_plane_type type;
831
- const struct vop_win_phy *phy;
832
- const struct vop_win_phy **area;
833
- const struct vop_csc *csc;
834
- unsigned int area_size;
835
- u64 feature;
990
+struct vop2_power_domain_data {
991
+ uint8_t id;
992
+ uint8_t parent_id;
993
+ /*
994
+ * @module_id_mask: module id of which module this power domain is belongs to.
995
+ * PD_CLUSTER0,1,2,3 only belongs to CLUSTER0/1/2/3, PD_Esmart0 shared by Esmart1/2/3
996
+ */
997
+ uint32_t module_id_mask;
998
+
999
+ const struct vop2_power_domain_regs *regs;
1000
+};
1001
+
1002
+/*
1003
+ * connector interface(RGB/HDMI/eDP/DP/MIPI) data
1004
+ */
1005
+struct vop2_connector_if_data {
1006
+ u32 id;
1007
+ const char *clk_src_name;
1008
+ const char *clk_parent_name;
1009
+ const char *pixclk_name;
1010
+ const char *dclk_name;
1011
+ u32 post_proc_div_shift;
1012
+ u32 if_div_shift;
1013
+ u32 if_div_yuv420_shift;
1014
+ u32 bus_div_shift;
1015
+ u32 pixel_clk_div_shift;
8361016 };
8371017
8381018 struct vop2_win_data {
8391019 const char *name;
8401020 uint8_t phys_id;
1021
+ uint8_t splice_win_id;
1022
+ uint8_t pd_id;
8411023 uint8_t axi_id;
8421024 uint8_t axi_yrgb_id;
8431025 uint8_t axi_uv_id;
....@@ -875,6 +1057,24 @@
8751057 const uint8_t dly[VOP2_DLY_MODE_MAX];
8761058 };
8771059
1060
+struct dsc_error_info {
1061
+ u32 dsc_error_val;
1062
+ char dsc_error_info[50];
1063
+};
1064
+
1065
+struct vop2_dsc_data {
1066
+ uint8_t id;
1067
+ uint8_t pd_id;
1068
+ uint8_t max_slice_num;
1069
+ uint8_t max_linebuf_depth; /* used to generate the bitstream */
1070
+ uint8_t min_bits_per_pixel; /* bit num after encoder compress */
1071
+ const char *dsc_txp_clk_src_name;
1072
+ const char *dsc_txp_clk_name;
1073
+ const char *dsc_pxl_clk_name;
1074
+ const char *dsc_cds_clk_name;
1075
+ const struct vop2_dsc_regs *regs;
1076
+};
1077
+
8781078 struct vop2_wb_data {
8791079 uint32_t nformats;
8801080 const uint32_t *formats;
....@@ -897,11 +1097,13 @@
8971097
8981098 struct vop2_video_port_data {
8991099 char id;
1100
+ uint8_t splice_vp_id;
9001101 uint16_t lut_dma_rid;
9011102 uint32_t feature;
9021103 uint64_t soc_id[VOP2_SOC_VARIANT];
9031104 uint16_t gamma_lut_len;
9041105 uint16_t cubic_lut_len;
1106
+ unsigned long dclk_max;
9051107 struct vop_rect max_output;
9061108 const u8 pre_scan_max_dly[4];
9071109 const u8 hdrvivid_dly[10];
....@@ -952,6 +1154,14 @@
9521154 struct vop_reg grf_dclk_inv;
9531155 struct vop_reg grf_bt1120_clk_inv;
9541156 struct vop_reg grf_bt656_clk_inv;
1157
+ struct vop_reg grf_edp0_en;
1158
+ struct vop_reg grf_edp1_en;
1159
+ struct vop_reg grf_hdmi0_en;
1160
+ struct vop_reg grf_hdmi1_en;
1161
+ struct vop_reg grf_hdmi0_dsc_en;
1162
+ struct vop_reg grf_hdmi1_dsc_en;
1163
+ struct vop_reg grf_hdmi0_pin_pol;
1164
+ struct vop_reg grf_hdmi1_pin_pol;
9551165 };
9561166
9571167 struct vop_data {
....@@ -969,6 +1179,7 @@
9691179 struct vop_rect max_output;
9701180 u64 feature;
9711181 u64 soc_id;
1182
+ u8 vop_id;
9721183 };
9731184
9741185 struct vop2_ctrl {
....@@ -976,6 +1187,9 @@
9761187 struct vop_reg wb_cfg_done;
9771188 struct vop_reg auto_gating_en;
9781189 struct vop_reg aclk_pre_auto_gating_en;
1190
+ struct vop_reg dma_finish_mode;
1191
+ struct vop_reg axi_dma_finish_and_en;
1192
+ struct vop_reg wb_dma_finish_and_en;
9791193 struct vop_reg ovl_cfg_done_port;
9801194 struct vop_reg ovl_port_mux_cfg_done_imd;
9811195 struct vop_reg ovl_port_mux_cfg;
....@@ -1015,9 +1229,12 @@
10151229 struct vop_reg edp_pin_pol;
10161230 struct vop_reg mipi_dclk_pol;
10171231 struct vop_reg mipi_pin_pol;
1018
- struct vop_reg dp_dclk_pol;
1019
- struct vop_reg dp_pin_pol;
1232
+ struct vop_reg dp0_dclk_pol;
1233
+ struct vop_reg dp0_pin_pol;
1234
+ struct vop_reg dp1_dclk_pol;
1235
+ struct vop_reg dp1_pin_pol;
10201236
1237
+ /* This will be reference by win_phy_id */
10211238 struct vop_reg win_vp_id[16];
10221239 struct vop_reg win_dly[16];
10231240
....@@ -1038,10 +1255,25 @@
10381255 struct vop_reg lvds_dual_mode;
10391256 struct vop_reg lvds_dual_channel_swap;
10401257
1041
- struct vop_reg cluster0_src_color_ctrl;
1042
- struct vop_reg cluster0_dst_color_ctrl;
1043
- struct vop_reg cluster0_src_alpha_ctrl;
1044
- struct vop_reg cluster0_dst_alpha_ctrl;
1258
+ struct vop_reg dp_dual_en;
1259
+ struct vop_reg edp_dual_en;
1260
+ struct vop_reg hdmi_dual_en;
1261
+ struct vop_reg mipi_dual_en;
1262
+
1263
+ struct vop_reg hdmi0_dclk_div;
1264
+ struct vop_reg hdmi0_pixclk_div;
1265
+ struct vop_reg edp0_dclk_div;
1266
+ struct vop_reg edp0_pixclk_div;
1267
+
1268
+ struct vop_reg hdmi1_dclk_div;
1269
+ struct vop_reg hdmi1_pixclk_div;
1270
+ struct vop_reg edp1_dclk_div;
1271
+ struct vop_reg edp1_pixclk_div;
1272
+
1273
+ struct vop_reg mipi0_pixclk_div;
1274
+ struct vop_reg mipi1_pixclk_div;
1275
+ struct vop_reg mipi0_ds_mode;
1276
+ struct vop_reg mipi1_ds_mode;
10451277
10461278 struct vop_reg src_color_ctrl;
10471279 struct vop_reg dst_color_ctrl;
....@@ -1051,6 +1283,7 @@
10511283 struct vop_reg bt1120_yc_swap;
10521284 struct vop_reg bt656_yc_swap;
10531285 struct vop_reg gamma_port_sel;
1286
+ struct vop_reg pd_off_imd;
10541287
10551288 struct vop_reg otp_en;
10561289 struct vop_reg esmart_lb_mode;
....@@ -1065,6 +1298,12 @@
10651298 bool enable_state;
10661299 };
10671300
1301
+struct vop2_vp_plane_mask {
1302
+ u8 primary_plane_id;
1303
+ u8 attached_layers_nr;
1304
+ u8 attached_layers[ROCKCHIP_MAX_LAYER];
1305
+};
1306
+
10681307 /**
10691308 * VOP2 data structe
10701309 *
....@@ -1074,25 +1313,43 @@
10741313 struct vop2_data {
10751314 uint32_t version;
10761315 uint32_t feature;
1316
+ uint8_t nr_dscs;
1317
+ uint8_t nr_dsc_ecw;
1318
+ uint8_t nr_dsc_buffer_flow;
10771319 uint8_t nr_vps;
10781320 uint8_t nr_mixers;
10791321 uint8_t nr_layers;
10801322 uint8_t nr_axi_intr;
10811323 uint8_t nr_gammas;
1324
+ uint8_t nr_conns;
1325
+ uint8_t nr_pds;
1326
+ uint8_t nr_mem_pgs;
10821327 uint8_t esmart_lb_mode;
1328
+ bool delayed_pd;
10831329 const struct vop_intr *axi_intr;
10841330 const struct vop2_ctrl *ctrl;
1331
+ const struct vop2_dsc_data *dsc;
1332
+ const struct dsc_error_info *dsc_error_ecw;
1333
+ const struct dsc_error_info *dsc_error_buffer_flow;
10851334 const struct vop2_win_data *win;
10861335 const struct vop2_video_port_data *vp;
1336
+ const struct vop2_connector_if_data *conn;
10871337 const struct vop2_wb_data *wb;
10881338 const struct vop2_layer_data *layer;
1339
+ const struct vop2_power_domain_data *pd;
1340
+ const struct vop2_power_domain_data *mem_pg;
10891341 const struct vop_csc_table *csc_table;
10901342 const struct vop_hdr_table *hdr_table;
1091
- const struct vop_grf_ctrl *grf_ctrl;
1343
+ const struct vop_grf_ctrl *sys_grf;
1344
+ const struct vop_grf_ctrl *grf;
1345
+ const struct vop_grf_ctrl *vo0_grf;
1346
+ const struct vop_grf_ctrl *vo1_grf;
10921347 const struct vop_dump_regs *dump_regs;
10931348 uint32_t dump_regs_size;
10941349 struct vop_rect max_input;
10951350 struct vop_rect max_output;
1351
+ const struct vop2_vp_plane_mask *plane_mask;
1352
+ uint32_t plane_mask_base;
10961353
10971354 unsigned int win_size;
10981355 };
....@@ -1169,6 +1426,9 @@
11691426 #define ROCKCHIP_OUT_MODE_P565 2
11701427 #define ROCKCHIP_OUT_MODE_BT656 5
11711428 #define ROCKCHIP_OUT_MODE_S888 8
1429
+#define ROCKCHIP_OUT_MODE_S666 9
1430
+#define ROCKCHIP_OUT_MODE_YUV422 9
1431
+#define ROCKCHIP_OUT_MODE_S565 10
11721432 #define ROCKCHIP_OUT_MODE_S888_DUMMY 12
11731433 #define ROCKCHIP_OUT_MODE_YUV420 14
11741434 /* for use special outface */
....@@ -1285,6 +1545,7 @@
12851545 DCLK_INVERT = 3
12861546 };
12871547
1548
+
12881549 #define FRAC_16_16(mult, div) (((mult) << 16) / (div))
12891550 #define SCL_FT_DEFAULT_FIXPOINT_SHIFT 12
12901551 #define SCL_MAX_VSKIPLINES 4
....@@ -1369,7 +1630,6 @@
13691630 return y1 + (y2 - y1) * (x - x1) / (x2 - x1);
13701631 }
13711632
1372
-extern void vop2_standby(struct drm_crtc *crtc, bool standby);
13731633 extern const struct component_ops vop_component_ops;
13741634 extern const struct component_ops vop2_component_ops;
13751635 #endif /* _ROCKCHIP_DRM_VOP_H */