@@ -53,6 +53,26 @@ static const uint32_t formats_win_full[] = {
53
53
DRM_FORMAT_NV42 ,
54
54
};
55
55
56
+ static const uint32_t formats_win_full_10 [] = {
57
+ DRM_FORMAT_XRGB8888 ,
58
+ DRM_FORMAT_ARGB8888 ,
59
+ DRM_FORMAT_XBGR8888 ,
60
+ DRM_FORMAT_ABGR8888 ,
61
+ DRM_FORMAT_RGB888 ,
62
+ DRM_FORMAT_BGR888 ,
63
+ DRM_FORMAT_RGB565 ,
64
+ DRM_FORMAT_BGR565 ,
65
+ DRM_FORMAT_NV12 ,
66
+ DRM_FORMAT_NV21 ,
67
+ DRM_FORMAT_NV16 ,
68
+ DRM_FORMAT_NV61 ,
69
+ DRM_FORMAT_NV24 ,
70
+ DRM_FORMAT_NV42 ,
71
+ DRM_FORMAT_NV15 ,
72
+ DRM_FORMAT_NV20 ,
73
+ DRM_FORMAT_NV30 ,
74
+ };
75
+
56
76
static const uint64_t format_modifiers_win_full [] = {
57
77
DRM_FORMAT_MOD_LINEAR ,
58
78
DRM_FORMAT_MOD_INVALID ,
@@ -627,11 +647,12 @@ static const struct vop_scl_regs rk3288_win_full_scl = {
627
647
628
648
static const struct vop_win_phy rk3288_win01_data = {
629
649
.scl = & rk3288_win_full_scl ,
630
- .data_formats = formats_win_full ,
631
- .nformats = ARRAY_SIZE (formats_win_full ),
650
+ .data_formats = formats_win_full_10 ,
651
+ .nformats = ARRAY_SIZE (formats_win_full_10 ),
632
652
.format_modifiers = format_modifiers_win_full ,
633
653
.enable = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 0 ),
634
654
.format = VOP_REG (RK3288_WIN0_CTRL0 , 0x7 , 1 ),
655
+ .fmt_10 = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 4 ),
635
656
.rb_swap = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 12 ),
636
657
.uv_swap = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 15 ),
637
658
.act_info = VOP_REG (RK3288_WIN0_ACT_INFO , 0x1fff1fff , 0 ),
@@ -936,13 +957,38 @@ static const struct vop_win_yuv2yuv_data rk3399_vop_big_win_yuv2yuv_data[] = {
936
957
937
958
};
938
959
939
- static const struct vop_win_phy rk3399_win01_data = {
960
+ static const struct vop_win_phy rk3399_win0_data = {
940
961
.scl = & rk3288_win_full_scl ,
941
- .data_formats = formats_win_full ,
942
- .nformats = ARRAY_SIZE (formats_win_full ),
962
+ .data_formats = formats_win_full_10 ,
963
+ .nformats = ARRAY_SIZE (formats_win_full_10 ),
943
964
.format_modifiers = format_modifiers_win_full_afbc ,
944
965
.enable = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 0 ),
945
966
.format = VOP_REG (RK3288_WIN0_CTRL0 , 0x7 , 1 ),
967
+ .fmt_10 = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 4 ),
968
+ .rb_swap = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 12 ),
969
+ .uv_swap = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 15 ),
970
+ .x_mir_en = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 21 ),
971
+ .y_mir_en = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 22 ),
972
+ .act_info = VOP_REG (RK3288_WIN0_ACT_INFO , 0x1fff1fff , 0 ),
973
+ .dsp_info = VOP_REG (RK3288_WIN0_DSP_INFO , 0x0fff0fff , 0 ),
974
+ .dsp_st = VOP_REG (RK3288_WIN0_DSP_ST , 0x1fff1fff , 0 ),
975
+ .yrgb_mst = VOP_REG (RK3288_WIN0_YRGB_MST , 0xffffffff , 0 ),
976
+ .uv_mst = VOP_REG (RK3288_WIN0_CBR_MST , 0xffffffff , 0 ),
977
+ .yrgb_vir = VOP_REG (RK3288_WIN0_VIR , 0x3fff , 0 ),
978
+ .uv_vir = VOP_REG (RK3288_WIN0_VIR , 0x3fff , 16 ),
979
+ .src_alpha_ctl = VOP_REG (RK3288_WIN0_SRC_ALPHA_CTRL , 0xff , 0 ),
980
+ .dst_alpha_ctl = VOP_REG (RK3288_WIN0_DST_ALPHA_CTRL , 0xff , 0 ),
981
+ .channel = VOP_REG (RK3288_WIN0_CTRL2 , 0xff , 0 ),
982
+ };
983
+
984
+ static const struct vop_win_phy rk3399_win1_data = {
985
+ .scl = & rk3288_win_full_scl ,
986
+ .data_formats = formats_win_full_10 ,
987
+ .nformats = ARRAY_SIZE (formats_win_full_10 ),
988
+ .format_modifiers = format_modifiers_win_full ,
989
+ .enable = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 0 ),
990
+ .format = VOP_REG (RK3288_WIN0_CTRL0 , 0x7 , 1 ),
991
+ .fmt_10 = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 4 ),
946
992
.rb_swap = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 12 ),
947
993
.uv_swap = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 15 ),
948
994
.x_mir_en = VOP_REG (RK3288_WIN0_CTRL0 , 0x1 , 21 ),
@@ -965,9 +1011,9 @@ static const struct vop_win_phy rk3399_win01_data = {
965
1011
* AFBC on the primary plane.
966
1012
*/
967
1013
static const struct vop_win_data rk3399_vop_win_data [] = {
968
- { .base = 0x00 , .phy = & rk3399_win01_data ,
1014
+ { .base = 0x00 , .phy = & rk3399_win0_data ,
969
1015
.type = DRM_PLANE_TYPE_PRIMARY },
970
- { .base = 0x40 , .phy = & rk3368_win01_data ,
1016
+ { .base = 0x40 , .phy = & rk3399_win1_data ,
971
1017
.type = DRM_PLANE_TYPE_OVERLAY },
972
1018
{ .base = 0x00 , .phy = & rk3368_win23_data ,
973
1019
.type = DRM_PLANE_TYPE_OVERLAY },
@@ -1099,11 +1145,11 @@ static const struct vop_intr rk3328_vop_intr = {
1099
1145
};
1100
1146
1101
1147
static const struct vop_win_data rk3328_vop_win_data [] = {
1102
- { .base = 0xd0 , .phy = & rk3368_win01_data ,
1148
+ { .base = 0xd0 , .phy = & rk3399_win1_data ,
1103
1149
.type = DRM_PLANE_TYPE_PRIMARY },
1104
- { .base = 0x1d0 , .phy = & rk3368_win01_data ,
1150
+ { .base = 0x1d0 , .phy = & rk3399_win1_data ,
1105
1151
.type = DRM_PLANE_TYPE_OVERLAY },
1106
- { .base = 0x2d0 , .phy = & rk3368_win01_data ,
1152
+ { .base = 0x2d0 , .phy = & rk3399_win1_data ,
1107
1153
.type = DRM_PLANE_TYPE_CURSOR },
1108
1154
};
1109
1155
0 commit comments