Loading Documentation/devicetree/bindings/media/video/msm-vidc.txt +2 −1 Original line number Diff line number Diff line Loading @@ -8,8 +8,9 @@ Required properties: - "qcom,msm-vidc" - "qcom,sm6150-vidc" : Invokes driver specific data for SM6150. - "qcom,sm8150-vidc" : Invokes driver specific data for SM8150. - "qcom,sm6150-vidc" : Invokes driver specific data for SM6150. - "qcom,sdmmagpie-vidc" : Invokes driver specific data for sdmmagpie. - "qcom,sm6150-vidc" : Invokes driver specific data for SM6150. - "qcom,trinket-vidc" : Invokes driver specific data for trinket. - "qcom,sdm845-vidc" : Invokes driver specific data for SDM845. - "qcom,sdm670-vidc" : Invokes driver specific data for SDM670. Loading arch/arm64/boot/dts/qcom/trinket-vidc.dtsi 0 → 100644 +110 −0 Original line number Diff line number Diff line /* Copyright (c) 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/msm/msm-bus-ids.h> #include <dt-bindings/clock/qcom,videocc-sm6150.h> &soc { msm_vidc: qcom,vidc@5a00000 { compatible = "qcom,msm-vidc", "qcom,trinket-vidc"; status = "ok"; reg = <0x5a00000 0x200000>; interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; /* Supply */ venus-supply = <&venus_gdsc>; venus-core0-supply = <&vcodec0_gdsc>; /* Clocks */ clock-names = "core_clk", "iface_clk", "bus_clk", "core0_clk", "core0_bus_clk"; clocks = <&clock_videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, <&clock_videocc VIDEO_CC_VENUS_AHB_CLK>, <&clock_videocc VIDEO_CC_VENUS_CTL_AXI_CLK>, <&clock_videocc VIDEO_CC_VCODEC0_CORE_CLK>, <&clock_videocc VIDEO_CC_VCODEC0_AXI_CLK>; qcom,proxy-clock-names = "core_clk", "iface_clk", "bus_clk", "core0_clk", "core0_bus_clk"; qcom,clock-configs = <0x1 0x0 0x0 0x1 0x0>; qcom,allowed-clock-rates = <133330000 240000000 300000000 380000000 410000000>; /* Buses */ bus_cnoc { compatible = "qcom,msm-vidc,bus"; label = "cnoc"; qcom,bus-master = <MSM_BUS_MASTER_AMPSS_M0>; qcom,bus-slave = <MSM_BUS_SLAVE_VENUS_CFG>; qcom,bus-governor = "performance"; qcom,bus-range-kbps = <1000 1000>; }; venus_bus_ddr { compatible = "qcom,msm-vidc,bus"; label = "venus-ddr"; qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>; qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>; qcom,bus-governor = "vidc-ar50-ddr"; qcom,bus-range-kbps = <1000 2128000>; }; arm9_bus_ddr { compatible = "qcom,msm-vidc,bus"; label = "venus-arm9-ddr"; qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>; qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>; qcom,bus-governor = "performance"; qcom,bus-range-kbps = <1000 1000>; }; /* MMUs */ non_secure_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_ns"; iommus = <&apps_smmu 0x840 0x20>; buffer-types = <0xfff>; virtual-addr-pool = <0x70800000 0x6f800000>; }; secure_bitstream_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_bitstream"; iommus = <&apps_smmu 0x841 0x4>; buffer-types = <0x241>; virtual-addr-pool = <0x4b000000 0x25800000>; qcom,secure-context-bank; }; secure_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_pixel"; iommus = <&apps_smmu 0x843 0x0>; buffer-types = <0x106>; virtual-addr-pool = <0x25800000 0x25800000>; qcom,secure-context-bank; }; secure_non_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_non_pixel"; iommus = <&apps_smmu 0x844 0x20>; buffer-types = <0x480>; virtual-addr-pool = <0x1000000 0x24800000>; qcom,secure-context-bank; }; }; }; arch/arm64/boot/dts/qcom/trinket.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -1612,6 +1612,7 @@ #include "msm-arm-smmu-trinket.dtsi" #include "trinket-qupv3.dtsi" #include "trinket-coresight.dtsi" #include "trinket-vidc.dtsi" &pm6125_vadc { rf_pa0_therm { Loading drivers/media/platform/msm/vidc/msm_vidc_platform.c +92 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,19 @@ static struct msm_vidc_codec_data sm6150_codec_data[] = { CODEC_ENTRY(V4L2_PIX_FMT_VP9, MSM_VIDC_DECODER, 50, 200, 200), }; /* Update with trinket data */ static struct msm_vidc_codec_data trinket_codec_data[] = { CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_ENCODER, 125, 675, 320), CODEC_ENTRY(V4L2_PIX_FMT_HEVC, MSM_VIDC_ENCODER, 125, 675, 320), CODEC_ENTRY(V4L2_PIX_FMT_VP8, MSM_VIDC_ENCODER, 125, 675, 320), CODEC_ENTRY(V4L2_PIX_FMT_TME, MSM_VIDC_ENCODER, 0, 540, 540), CODEC_ENTRY(V4L2_PIX_FMT_MPEG2, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_HEVC, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_VP8, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_VP9, MSM_VIDC_DECODER, 50, 200, 200), }; /* Update with 855 data */ static struct msm_vidc_codec_data sm8150_codec_data[] = { CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_ENCODER, 10, 675, 320), Loading Loading @@ -201,6 +214,65 @@ static struct msm_vidc_common_data sm6150_common_data[] = { }, }; static struct msm_vidc_common_data trinket_common_data[] = { { .key = "qcom,never-unload-fw", .value = 1, }, { .key = "qcom,sw-power-collapse", .value = 1, }, { .key = "qcom,domain-attr-non-fatal-faults", .value = 1, }, { .key = "qcom,max-secure-instances", .value = 5, }, { .key = "qcom,max-hw-load", .value = 1944000, }, { .key = "qcom,max-hq-mbs-per-frame", .value = 8160, }, { .key = "qcom,max-hq-frames-per-sec", .value = 30, }, { .key = "qcom,max-b-frame-size", .value = 8160, }, { .key = "qcom,max-b-frames-per-sec", .value = 60, }, { .key = "qcom,power-collapse-delay", .value = 1500, }, { .key = "qcom,hw-resp-timeout", .value = 1000, }, { .key = "qcom,dcvs", .value = 1, }, { .key = "qcom,fw-cycles", .value = 733003, }, { .key = "qcom,fw-vpp-cycles", .value = 225975, }, }; static struct msm_vidc_common_data sm8150_common_data[] = { { .key = "qcom,never-unload-fw", Loading Loading @@ -641,6 +713,22 @@ static struct msm_vidc_platform_data sm6150_data = { .vpu_ver = VPU_VERSION_4, }; static struct msm_vidc_platform_data trinket_data = { .codec_data = trinket_codec_data, .codec_data_length = ARRAY_SIZE(trinket_codec_data), .common_data = trinket_common_data, .common_data_length = ARRAY_SIZE(trinket_common_data), .csc_data.vpe_csc_custom_bias_coeff = vpe_csc_custom_bias_coeff, .csc_data.vpe_csc_custom_matrix_coeff = vpe_csc_custom_matrix_coeff, .csc_data.vpe_csc_custom_limit_coeff = vpe_csc_custom_limit_coeff, .efuse_data = NULL, .efuse_data_length = 0, .sku_version = 0, .gcc_register_base = 0, .gcc_register_size = 0, .vpu_ver = VPU_VERSION_4, }; static struct msm_vidc_platform_data sm8150_data = { .codec_data = sm8150_codec_data, .codec_data_length = ARRAY_SIZE(sm8150_codec_data), Loading Loading @@ -710,6 +798,10 @@ static const struct of_device_id msm_vidc_dt_match[] = { .compatible = "qcom,sm6150-vidc", .data = &sm6150_data, }, { .compatible = "qcom,trinket-vidc", .data = &trinket_data, }, { .compatible = "qcom,sm8150-vidc", .data = &sm8150_data, Loading Loading
Documentation/devicetree/bindings/media/video/msm-vidc.txt +2 −1 Original line number Diff line number Diff line Loading @@ -8,8 +8,9 @@ Required properties: - "qcom,msm-vidc" - "qcom,sm6150-vidc" : Invokes driver specific data for SM6150. - "qcom,sm8150-vidc" : Invokes driver specific data for SM8150. - "qcom,sm6150-vidc" : Invokes driver specific data for SM6150. - "qcom,sdmmagpie-vidc" : Invokes driver specific data for sdmmagpie. - "qcom,sm6150-vidc" : Invokes driver specific data for SM6150. - "qcom,trinket-vidc" : Invokes driver specific data for trinket. - "qcom,sdm845-vidc" : Invokes driver specific data for SDM845. - "qcom,sdm670-vidc" : Invokes driver specific data for SDM670. Loading
arch/arm64/boot/dts/qcom/trinket-vidc.dtsi 0 → 100644 +110 −0 Original line number Diff line number Diff line /* Copyright (c) 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/msm/msm-bus-ids.h> #include <dt-bindings/clock/qcom,videocc-sm6150.h> &soc { msm_vidc: qcom,vidc@5a00000 { compatible = "qcom,msm-vidc", "qcom,trinket-vidc"; status = "ok"; reg = <0x5a00000 0x200000>; interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; /* Supply */ venus-supply = <&venus_gdsc>; venus-core0-supply = <&vcodec0_gdsc>; /* Clocks */ clock-names = "core_clk", "iface_clk", "bus_clk", "core0_clk", "core0_bus_clk"; clocks = <&clock_videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, <&clock_videocc VIDEO_CC_VENUS_AHB_CLK>, <&clock_videocc VIDEO_CC_VENUS_CTL_AXI_CLK>, <&clock_videocc VIDEO_CC_VCODEC0_CORE_CLK>, <&clock_videocc VIDEO_CC_VCODEC0_AXI_CLK>; qcom,proxy-clock-names = "core_clk", "iface_clk", "bus_clk", "core0_clk", "core0_bus_clk"; qcom,clock-configs = <0x1 0x0 0x0 0x1 0x0>; qcom,allowed-clock-rates = <133330000 240000000 300000000 380000000 410000000>; /* Buses */ bus_cnoc { compatible = "qcom,msm-vidc,bus"; label = "cnoc"; qcom,bus-master = <MSM_BUS_MASTER_AMPSS_M0>; qcom,bus-slave = <MSM_BUS_SLAVE_VENUS_CFG>; qcom,bus-governor = "performance"; qcom,bus-range-kbps = <1000 1000>; }; venus_bus_ddr { compatible = "qcom,msm-vidc,bus"; label = "venus-ddr"; qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>; qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>; qcom,bus-governor = "vidc-ar50-ddr"; qcom,bus-range-kbps = <1000 2128000>; }; arm9_bus_ddr { compatible = "qcom,msm-vidc,bus"; label = "venus-arm9-ddr"; qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>; qcom,bus-slave = <MSM_BUS_SLAVE_EBI_CH0>; qcom,bus-governor = "performance"; qcom,bus-range-kbps = <1000 1000>; }; /* MMUs */ non_secure_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_ns"; iommus = <&apps_smmu 0x840 0x20>; buffer-types = <0xfff>; virtual-addr-pool = <0x70800000 0x6f800000>; }; secure_bitstream_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_bitstream"; iommus = <&apps_smmu 0x841 0x4>; buffer-types = <0x241>; virtual-addr-pool = <0x4b000000 0x25800000>; qcom,secure-context-bank; }; secure_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_pixel"; iommus = <&apps_smmu 0x843 0x0>; buffer-types = <0x106>; virtual-addr-pool = <0x25800000 0x25800000>; qcom,secure-context-bank; }; secure_non_pixel_cb { compatible = "qcom,msm-vidc,context-bank"; label = "venus_sec_non_pixel"; iommus = <&apps_smmu 0x844 0x20>; buffer-types = <0x480>; virtual-addr-pool = <0x1000000 0x24800000>; qcom,secure-context-bank; }; }; };
arch/arm64/boot/dts/qcom/trinket.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -1612,6 +1612,7 @@ #include "msm-arm-smmu-trinket.dtsi" #include "trinket-qupv3.dtsi" #include "trinket-coresight.dtsi" #include "trinket-vidc.dtsi" &pm6125_vadc { rf_pa0_therm { Loading
drivers/media/platform/msm/vidc/msm_vidc_platform.c +92 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,19 @@ static struct msm_vidc_codec_data sm6150_codec_data[] = { CODEC_ENTRY(V4L2_PIX_FMT_VP9, MSM_VIDC_DECODER, 50, 200, 200), }; /* Update with trinket data */ static struct msm_vidc_codec_data trinket_codec_data[] = { CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_ENCODER, 125, 675, 320), CODEC_ENTRY(V4L2_PIX_FMT_HEVC, MSM_VIDC_ENCODER, 125, 675, 320), CODEC_ENTRY(V4L2_PIX_FMT_VP8, MSM_VIDC_ENCODER, 125, 675, 320), CODEC_ENTRY(V4L2_PIX_FMT_TME, MSM_VIDC_ENCODER, 0, 540, 540), CODEC_ENTRY(V4L2_PIX_FMT_MPEG2, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_HEVC, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_VP8, MSM_VIDC_DECODER, 50, 200, 200), CODEC_ENTRY(V4L2_PIX_FMT_VP9, MSM_VIDC_DECODER, 50, 200, 200), }; /* Update with 855 data */ static struct msm_vidc_codec_data sm8150_codec_data[] = { CODEC_ENTRY(V4L2_PIX_FMT_H264, MSM_VIDC_ENCODER, 10, 675, 320), Loading Loading @@ -201,6 +214,65 @@ static struct msm_vidc_common_data sm6150_common_data[] = { }, }; static struct msm_vidc_common_data trinket_common_data[] = { { .key = "qcom,never-unload-fw", .value = 1, }, { .key = "qcom,sw-power-collapse", .value = 1, }, { .key = "qcom,domain-attr-non-fatal-faults", .value = 1, }, { .key = "qcom,max-secure-instances", .value = 5, }, { .key = "qcom,max-hw-load", .value = 1944000, }, { .key = "qcom,max-hq-mbs-per-frame", .value = 8160, }, { .key = "qcom,max-hq-frames-per-sec", .value = 30, }, { .key = "qcom,max-b-frame-size", .value = 8160, }, { .key = "qcom,max-b-frames-per-sec", .value = 60, }, { .key = "qcom,power-collapse-delay", .value = 1500, }, { .key = "qcom,hw-resp-timeout", .value = 1000, }, { .key = "qcom,dcvs", .value = 1, }, { .key = "qcom,fw-cycles", .value = 733003, }, { .key = "qcom,fw-vpp-cycles", .value = 225975, }, }; static struct msm_vidc_common_data sm8150_common_data[] = { { .key = "qcom,never-unload-fw", Loading Loading @@ -641,6 +713,22 @@ static struct msm_vidc_platform_data sm6150_data = { .vpu_ver = VPU_VERSION_4, }; static struct msm_vidc_platform_data trinket_data = { .codec_data = trinket_codec_data, .codec_data_length = ARRAY_SIZE(trinket_codec_data), .common_data = trinket_common_data, .common_data_length = ARRAY_SIZE(trinket_common_data), .csc_data.vpe_csc_custom_bias_coeff = vpe_csc_custom_bias_coeff, .csc_data.vpe_csc_custom_matrix_coeff = vpe_csc_custom_matrix_coeff, .csc_data.vpe_csc_custom_limit_coeff = vpe_csc_custom_limit_coeff, .efuse_data = NULL, .efuse_data_length = 0, .sku_version = 0, .gcc_register_base = 0, .gcc_register_size = 0, .vpu_ver = VPU_VERSION_4, }; static struct msm_vidc_platform_data sm8150_data = { .codec_data = sm8150_codec_data, .codec_data_length = ARRAY_SIZE(sm8150_codec_data), Loading Loading @@ -710,6 +798,10 @@ static const struct of_device_id msm_vidc_dt_match[] = { .compatible = "qcom,sm6150-vidc", .data = &sm6150_data, }, { .compatible = "qcom,trinket-vidc", .data = &trinket_data, }, { .compatible = "qcom,sm8150-vidc", .data = &sm8150_data, Loading