Loading arch/arm64/boot/dts/qcom/kona-vidc.dtsi +32 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */ #include <dt-bindings/interrupt-controller/arm-gic.h> Loading Loading @@ -41,6 +41,37 @@ qcom,allowed-clock-rates = <240000000 338000000 366000000 444000000 553000000>; /* 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>; operating-points-v2 = <&venus_bus_cnoc_bw_table>; }; 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 = "msm-vidc-ddr"; qcom,bus-range-kbps = <1000 6533000>; operating-points-v2 = <&ddr_bw_opp_table>; }; venus_bus_llcc { compatible = "qcom,msm-vidc,bus"; label = "venus-llcc"; qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>; qcom,bus-slave = <MSM_BUS_SLAVE_LLCC>; qcom,bus-governor = "msm-vidc-llcc"; qcom,bus-range-kbps = <1000 6533000>; operating-points-v2 = <&llcc_bw_opp_table>; }; /* MMUs */ non_secure_cb { compatible = "qcom,msm-vidc,context-bank"; Loading arch/arm64/boot/dts/qcom/kona.dtsi +5 −0 Original line number Diff line number Diff line Loading @@ -824,6 +824,11 @@ }; }; venus_bus_cnoc_bw_table: bus-cnoc-bw-table { compatible = "operating-points-v2"; BW_OPP_ENTRY( 200, 4); }; llcc_bw_opp_table: llcc-bw-opp-table { compatible = "operating-points-v2"; BW_OPP_ENTRY( 150, 16); /* 2288 MB/s */ Loading drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +6 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. */ #include <asm/dma-iommu.h> Loading Loading @@ -432,6 +432,11 @@ static int msm_vidc_populate_bus(struct device *dev, if (!strcmp(bus->governor, PERF_GOV)) bus->is_prfm_gov_used = true; if (of_find_property(dev->of_node, "operating-points-v2", NULL)) bus->has_freq_table = true; else bus->has_freq_table = false; rc = of_property_read_u32_array(dev->of_node, "qcom,bus-range-kbps", range, ARRAY_SIZE(range)); if (rc) { Loading drivers/media/platform/msm/vidc/msm_vidc_resources.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. */ #ifndef __MSM_VIDC_RESOURCES_H__ Loading Loading @@ -100,6 +100,7 @@ struct bus_info { struct devfreq *devfreq; struct msm_bus_client_handle *client; bool is_prfm_gov_used; bool has_freq_table; }; struct bus_set { Loading drivers/media/platform/msm/vidc/venus_hfi.c +7 −0 Original line number Diff line number Diff line Loading @@ -3994,6 +3994,13 @@ static int __init_bus(struct venus_hfi_device *device) dev_name(bus->dev)); dev_set_drvdata(bus->dev, device); if (bus->has_freq_table) { rc = dev_pm_opp_of_add_table(bus->dev); if (rc) dprintk(VIDC_ERR, "Failed to add %s OPP table", bus->name); } bus->client = msm_bus_scale_register(bus->master, bus->slave, bus->name, false); if (IS_ERR_OR_NULL(bus->client)) { Loading Loading
arch/arm64/boot/dts/qcom/kona-vidc.dtsi +32 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */ #include <dt-bindings/interrupt-controller/arm-gic.h> Loading Loading @@ -41,6 +41,37 @@ qcom,allowed-clock-rates = <240000000 338000000 366000000 444000000 553000000>; /* 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>; operating-points-v2 = <&venus_bus_cnoc_bw_table>; }; 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 = "msm-vidc-ddr"; qcom,bus-range-kbps = <1000 6533000>; operating-points-v2 = <&ddr_bw_opp_table>; }; venus_bus_llcc { compatible = "qcom,msm-vidc,bus"; label = "venus-llcc"; qcom,bus-master = <MSM_BUS_MASTER_VIDEO_P0>; qcom,bus-slave = <MSM_BUS_SLAVE_LLCC>; qcom,bus-governor = "msm-vidc-llcc"; qcom,bus-range-kbps = <1000 6533000>; operating-points-v2 = <&llcc_bw_opp_table>; }; /* MMUs */ non_secure_cb { compatible = "qcom,msm-vidc,context-bank"; Loading
arch/arm64/boot/dts/qcom/kona.dtsi +5 −0 Original line number Diff line number Diff line Loading @@ -824,6 +824,11 @@ }; }; venus_bus_cnoc_bw_table: bus-cnoc-bw-table { compatible = "operating-points-v2"; BW_OPP_ENTRY( 200, 4); }; llcc_bw_opp_table: llcc-bw-opp-table { compatible = "operating-points-v2"; BW_OPP_ENTRY( 150, 16); /* 2288 MB/s */ Loading
drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +6 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. */ #include <asm/dma-iommu.h> Loading Loading @@ -432,6 +432,11 @@ static int msm_vidc_populate_bus(struct device *dev, if (!strcmp(bus->governor, PERF_GOV)) bus->is_prfm_gov_used = true; if (of_find_property(dev->of_node, "operating-points-v2", NULL)) bus->has_freq_table = true; else bus->has_freq_table = false; rc = of_property_read_u32_array(dev->of_node, "qcom,bus-range-kbps", range, ARRAY_SIZE(range)); if (rc) { Loading
drivers/media/platform/msm/vidc/msm_vidc_resources.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. */ #ifndef __MSM_VIDC_RESOURCES_H__ Loading Loading @@ -100,6 +100,7 @@ struct bus_info { struct devfreq *devfreq; struct msm_bus_client_handle *client; bool is_prfm_gov_used; bool has_freq_table; }; struct bus_set { Loading
drivers/media/platform/msm/vidc/venus_hfi.c +7 −0 Original line number Diff line number Diff line Loading @@ -3994,6 +3994,13 @@ static int __init_bus(struct venus_hfi_device *device) dev_name(bus->dev)); dev_set_drvdata(bus->dev, device); if (bus->has_freq_table) { rc = dev_pm_opp_of_add_table(bus->dev); if (rc) dprintk(VIDC_ERR, "Failed to add %s OPP table", bus->name); } bus->client = msm_bus_scale_register(bus->master, bus->slave, bus->name, false); if (IS_ERR_OR_NULL(bus->client)) { Loading