diff --git a/arch/arm/boot/dts/amlogic/meson-s7.dtsi b/arch/arm/boot/dts/amlogic/meson-s7.dtsi index 224c92d29..acad8c328 100644 --- a/arch/arm/boot/dts/amlogic/meson-s7.dtsi +++ b/arch/arm/boot/dts/amlogic/meson-s7.dtsi @@ -2045,9 +2045,9 @@ /*if you want to use vdin just modify status to "ok"*/ vdin0: vdin0 { - compatible = "amlogic, vdin-s4d"; + compatible = "amlogic, vdin-s7"; dev_name = "vdin0"; - status = "disabled"; + status = "okay"; reserve-iomap = "true"; flag_cma = <0>;/*1:share with codec_mm;2:cma alone*/ /*MByte, if 10bit disable: 64M(YUV422), @@ -2079,9 +2079,9 @@ /* vdin v4l2 end */ }; vdin1: vdin1 { - compatible = "amlogic, vdin-s4d"; + compatible = "amlogic, vdin-s7"; dev_name = "vdin1"; - status = "disabled"; + status = "okay"; reserve-iomap = "true"; flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/ interrupts = <0 212 1>; diff --git a/arch/arm/boot/dts/amlogic/s7_pxp.dts b/arch/arm/boot/dts/amlogic/s7_pxp.dts index 1e51e777a..69625edab 100644 --- a/arch/arm/boot/dts/amlogic/s7_pxp.dts +++ b/arch/arm/boot/dts/amlogic/s7_pxp.dts @@ -160,7 +160,7 @@ reusable; /* 420 mode:1280x720x2x4=8MB */ /* 444 mode:1280x720x3x4=12MB */ - size = <0x000000>; + size = <0x01400000>; alignment = <0x400000>; }; /* global autoconfigured region for contiguous allocations */ @@ -1563,7 +1563,7 @@ /*if you want to use vdin just modify status to "ok"*/ &vdin0 { - /*compatible = "amlogic, vdin-sc2";*/ + /*compatible = "amlogic, vdin-s7";*/ /*memory-region = <&vdin0_cma_reserved>;*/ /*status = "disabled";*/ /* up to 1920x1080 yuv422 8bit and 5 buffers @@ -1581,7 +1581,7 @@ }; &vdin1 { - /*compatible = "amlogic, vdin-sc2";*/ + /*compatible = "amlogic, vdin-s7";*/ memory-region = <&vdin1_cma_reserved>; frame_buff_num = <4>; /*status = "disabled";*/ diff --git a/drivers/drm/meson_vpu.c b/drivers/drm/meson_vpu.c index 080f7616c..f1c044950 100644 --- a/drivers/drm/meson_vpu.c +++ b/drivers/drm/meson_vpu.c @@ -346,6 +346,9 @@ static const struct meson_vpu_data vpu_g12b_data = { }; static const struct meson_vpu_data vpu_s7_data = { + .crtc_func = { + .reg_ops = common_reg_ops, + }, .pipe_ops = &g12a_vpu_pipeline_ops, .osd_ops = &t7_osd_ops, .afbc_ops = &s7_afbc_ops, diff --git a/drivers/media/vin/tvin/vdin/vdin_drv.c b/drivers/media/vin/tvin/vdin/vdin_drv.c index bf44ee937..20b56a23d 100644 --- a/drivers/media/vin/tvin/vdin/vdin_drv.c +++ b/drivers/media/vin/tvin/vdin/vdin_drv.c @@ -5871,6 +5871,15 @@ static const struct match_data_s vdin_dt_txhd2 = { .vdin0_line_buff_size = 0x780, .vdin1_line_buff_size = 0x780, .vdin0_max_w_h = VDIN_2K_SIZE, .vdin1_set_hdr = false, }; + +static const struct match_data_s vdin_dt_s7 = { + .name = "vdin-s7", + .hw_ver = VDIN_HW_TXHD2, + .vdin0_en = 0, .vdin1_en = 1, + .de_tunnel_tunnel = 0, /*0,1*/ .ipt444_to_422_12bit = 0, /*0,1*/ + .vdin0_line_buff_size = 0x780, .vdin1_line_buff_size = 0x780, + .vdin0_max_w_h = 0, .vdin1_set_hdr = true, +}; #endif static const struct of_device_id vdin_dt_match[] = { @@ -5955,6 +5964,10 @@ static const struct of_device_id vdin_dt_match[] = { .compatible = "amlogic, vdin-txhd2", .data = &vdin_dt_txhd2, }, + { + .compatible = "amlogic, vdin-s7", + .data = &vdin_dt_s7, + }, #endif /* DO NOT remove to avoid scan error of KASAN */ {} diff --git a/drivers/media/vin/tvin/vdin/vdin_drv.h b/drivers/media/vin/tvin/vdin/vdin_drv.h index 3e890ff68..f8e2c1396 100644 --- a/drivers/media/vin/tvin/vdin/vdin_drv.h +++ b/drivers/media/vin/tvin/vdin/vdin_drv.h @@ -173,7 +173,7 @@ enum vdin_hw_ver_e { VDIN_HW_SM1, VDIN_HW_TL1, /* - * tm2 vdin0/vdin1 all support up to 40k + * tm2 vdin0/vdin1 all support up to 4k */ VDIN_HW_TM2, VDIN_HW_TM2_B, @@ -202,6 +202,7 @@ enum vdin_hw_ver_e { VDIN_HW_T5M, VDIN_HW_T3X, VDIN_HW_TXHD2, + VDIN_HW_S7, }; /* 20230607: game mode optimize and add debug */