Loading arch/arm64/configs/vendor/trinket-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -404,6 +404,7 @@ CONFIG_OV12830=y CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y CONFIG_MSMB_JPEG=y CONFIG_MSM_FD=y CONFIG_MSM_JPEGDMA=y CONFIG_MSM_VIDC_V4L2=y CONFIG_MSM_VIDC_GOVERNORS=y CONFIG_MSM_SDE_ROTATOR=y Loading arch/arm64/configs/vendor/trinket_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -419,6 +419,7 @@ CONFIG_OV12830=y CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y CONFIG_MSMB_JPEG=y CONFIG_MSM_FD=y CONFIG_MSM_JPEGDMA=y CONFIG_MSM_VIDC_V4L2=y CONFIG_MSM_VIDC_GOVERNORS=y CONFIG_MSM_SDE_ROTATOR=y Loading drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c +3 −3 Original line number Diff line number Diff line /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2019, 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 Loading Loading @@ -1049,13 +1049,13 @@ static int cam_smmu_map_buffer_and_add_to_list(int idx, int ion_fd, mapping_info->attach = attach; mapping_info->table = table; mapping_info->paddr = sg_dma_address(table->sgl); mapping_info->len = (size_t)sg_dma_len(table->sgl); mapping_info->len = (size_t)buf->size; mapping_info->dir = dma_dir; mapping_info->ref_count = 1; /* return paddr and len to client */ *paddr_ptr = sg_dma_address(table->sgl); *len_ptr = (size_t)sg_dma_len(table->sgl); *len_ptr = (size_t)buf->size; if (!*paddr_ptr || !*len_ptr) { pr_err("Error: Space Allocation failed!\n"); Loading drivers/media/platform/msm/camera_v2/common/cam_soc_api.c +47 −5 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2019, 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 Loading Loading @@ -360,7 +360,6 @@ int msm_camera_clk_enable(struct device *dev, if (enable) { for (i = 0; i < num_clk; i++) { CDBG("enable %s\n", clk_info[i].clk_name); if (clk_info[i].clk_rate > 0) { clk_rate = clk_round_rate(clk_ptr[i], clk_info[i].clk_rate); Loading Loading @@ -411,8 +410,6 @@ int msm_camera_clk_enable(struct device *dev, } else { for (i = num_clk - 1; i >= 0; i--) { if (clk_ptr[i] != NULL) { CDBG("%s disable %s\n", __func__, clk_info[i].clk_name); clk_disable_unprepare(clk_ptr[i]); } } Loading @@ -429,6 +426,24 @@ int msm_camera_clk_enable(struct device *dev, } EXPORT_SYMBOL(msm_camera_clk_enable); int msm_camera_cpp_clk_disable(struct device *dev, struct msm_cam_clk_info *clk_info, struct clk **clk_ptr, int num_clk, int enable) { int i; int rc = 1; for (i = num_clk - 1; i >= 0; i--) { if (clk_ptr[i] != NULL) { rc = strcmp(clk_info[i].clk_name, "cpp_src_clk"); if (rc == 0) continue; clk_disable_unprepare(clk_ptr[i]); } } return 0; } /* Set rate on a specific clock */ long msm_camera_clk_set_rate(struct device *dev, struct clk *clk, Loading Loading @@ -662,7 +677,6 @@ int msm_camera_regulator_enable(struct msm_cam_regulator *vdd_info, for (i = 0; i < cnt; i++) { if (tmp && !IS_ERR_OR_NULL(tmp->vdd)) { CDBG("name : %s, enable : %d\n", tmp->name, enable); if (enable) { rc = regulator_enable(tmp->vdd); if (rc < 0) { Loading Loading @@ -691,6 +705,34 @@ int msm_camera_regulator_enable(struct msm_cam_regulator *vdd_info, } EXPORT_SYMBOL(msm_camera_regulator_enable); /* disable/Disable regulators */ int msm_camera_regulator_disable(struct msm_cam_regulator *vdd_info, int cnt, int disable) { int i; int rc; struct msm_cam_regulator *tmp = vdd_info; if (!tmp) { pr_err("Invalid params"); return -EINVAL; } for (i = cnt; i > 0; i--) { if (disable) { rc = regulator_disable(tmp[i-1].vdd); if (rc < 0) { pr_debug("%s: %s failed %d\n", __func__, tmp[i-1].name, i); return rc; } } } return 0; } EXPORT_SYMBOL(msm_camera_regulator_disable); /* set regulator mode */ int msm_camera_regulator_set_mode(struct msm_cam_regulator *vdd_info, int cnt, bool mode) Loading drivers/media/platform/msm/camera_v2/common/cam_soc_api.h +14 −5 Original line number Diff line number Diff line /* Copyright (c) 2015-2016, 2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2016, 2018-2019, 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 Loading Loading @@ -172,6 +173,11 @@ int msm_camera_clk_enable(struct device *dev, struct clk **clk_ptr, int num_clk, int enable); int msm_camera_cpp_clk_disable(struct device *dev, struct msm_cam_clk_info *clk_info, struct clk **clk_ptr, int num_clk, int enable); /** * @brief : Set clock rate * Loading Loading @@ -247,6 +253,9 @@ int msm_camera_get_regulator_info(struct platform_device *pdev, int msm_camera_regulator_enable(struct msm_cam_regulator *vdd_info, int cnt, int enable); int msm_camera_regulator_disable(struct msm_cam_regulator *vdd_info, int cnt, int disable); /** * @brief : set the regultors mode * Loading Loading
arch/arm64/configs/vendor/trinket-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -404,6 +404,7 @@ CONFIG_OV12830=y CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y CONFIG_MSMB_JPEG=y CONFIG_MSM_FD=y CONFIG_MSM_JPEGDMA=y CONFIG_MSM_VIDC_V4L2=y CONFIG_MSM_VIDC_GOVERNORS=y CONFIG_MSM_SDE_ROTATOR=y Loading
arch/arm64/configs/vendor/trinket_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -419,6 +419,7 @@ CONFIG_OV12830=y CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y CONFIG_MSMB_JPEG=y CONFIG_MSM_FD=y CONFIG_MSM_JPEGDMA=y CONFIG_MSM_VIDC_V4L2=y CONFIG_MSM_VIDC_GOVERNORS=y CONFIG_MSM_SDE_ROTATOR=y Loading
drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c +3 −3 Original line number Diff line number Diff line /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2014-2019, 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 Loading Loading @@ -1049,13 +1049,13 @@ static int cam_smmu_map_buffer_and_add_to_list(int idx, int ion_fd, mapping_info->attach = attach; mapping_info->table = table; mapping_info->paddr = sg_dma_address(table->sgl); mapping_info->len = (size_t)sg_dma_len(table->sgl); mapping_info->len = (size_t)buf->size; mapping_info->dir = dma_dir; mapping_info->ref_count = 1; /* return paddr and len to client */ *paddr_ptr = sg_dma_address(table->sgl); *len_ptr = (size_t)sg_dma_len(table->sgl); *len_ptr = (size_t)buf->size; if (!*paddr_ptr || !*len_ptr) { pr_err("Error: Space Allocation failed!\n"); Loading
drivers/media/platform/msm/camera_v2/common/cam_soc_api.c +47 −5 Original line number Diff line number Diff line /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2019, 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 Loading Loading @@ -360,7 +360,6 @@ int msm_camera_clk_enable(struct device *dev, if (enable) { for (i = 0; i < num_clk; i++) { CDBG("enable %s\n", clk_info[i].clk_name); if (clk_info[i].clk_rate > 0) { clk_rate = clk_round_rate(clk_ptr[i], clk_info[i].clk_rate); Loading Loading @@ -411,8 +410,6 @@ int msm_camera_clk_enable(struct device *dev, } else { for (i = num_clk - 1; i >= 0; i--) { if (clk_ptr[i] != NULL) { CDBG("%s disable %s\n", __func__, clk_info[i].clk_name); clk_disable_unprepare(clk_ptr[i]); } } Loading @@ -429,6 +426,24 @@ int msm_camera_clk_enable(struct device *dev, } EXPORT_SYMBOL(msm_camera_clk_enable); int msm_camera_cpp_clk_disable(struct device *dev, struct msm_cam_clk_info *clk_info, struct clk **clk_ptr, int num_clk, int enable) { int i; int rc = 1; for (i = num_clk - 1; i >= 0; i--) { if (clk_ptr[i] != NULL) { rc = strcmp(clk_info[i].clk_name, "cpp_src_clk"); if (rc == 0) continue; clk_disable_unprepare(clk_ptr[i]); } } return 0; } /* Set rate on a specific clock */ long msm_camera_clk_set_rate(struct device *dev, struct clk *clk, Loading Loading @@ -662,7 +677,6 @@ int msm_camera_regulator_enable(struct msm_cam_regulator *vdd_info, for (i = 0; i < cnt; i++) { if (tmp && !IS_ERR_OR_NULL(tmp->vdd)) { CDBG("name : %s, enable : %d\n", tmp->name, enable); if (enable) { rc = regulator_enable(tmp->vdd); if (rc < 0) { Loading Loading @@ -691,6 +705,34 @@ int msm_camera_regulator_enable(struct msm_cam_regulator *vdd_info, } EXPORT_SYMBOL(msm_camera_regulator_enable); /* disable/Disable regulators */ int msm_camera_regulator_disable(struct msm_cam_regulator *vdd_info, int cnt, int disable) { int i; int rc; struct msm_cam_regulator *tmp = vdd_info; if (!tmp) { pr_err("Invalid params"); return -EINVAL; } for (i = cnt; i > 0; i--) { if (disable) { rc = regulator_disable(tmp[i-1].vdd); if (rc < 0) { pr_debug("%s: %s failed %d\n", __func__, tmp[i-1].name, i); return rc; } } } return 0; } EXPORT_SYMBOL(msm_camera_regulator_disable); /* set regulator mode */ int msm_camera_regulator_set_mode(struct msm_cam_regulator *vdd_info, int cnt, bool mode) Loading
drivers/media/platform/msm/camera_v2/common/cam_soc_api.h +14 −5 Original line number Diff line number Diff line /* Copyright (c) 2015-2016, 2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2016, 2018-2019, 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 Loading Loading @@ -172,6 +173,11 @@ int msm_camera_clk_enable(struct device *dev, struct clk **clk_ptr, int num_clk, int enable); int msm_camera_cpp_clk_disable(struct device *dev, struct msm_cam_clk_info *clk_info, struct clk **clk_ptr, int num_clk, int enable); /** * @brief : Set clock rate * Loading Loading @@ -247,6 +253,9 @@ int msm_camera_get_regulator_info(struct platform_device *pdev, int msm_camera_regulator_enable(struct msm_cam_regulator *vdd_info, int cnt, int enable); int msm_camera_regulator_disable(struct msm_cam_regulator *vdd_info, int cnt, int disable); /** * @brief : set the regultors mode * Loading