Loading Documentation/devicetree/bindings/media/video/msm-vfe.txt +9 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ Required properties for child node: Only needed for child node. - "vfe" - Required. - "vfe_vbif" - Optional for "vfe32". Required for "vfe40". - "vfe_fuse" - Optional. - interrupts : should contain the vfe interrupt. - interrupt-names : should specify relevant names to each interrupts property defined. Loading Loading @@ -52,9 +53,10 @@ Example: vfe0: qcom,vfe0@fda10000 { cell-index = <0>; compatible = "qcom,vfe44"; reg = <0xfda10000 0x1000>; <0xfda40000 0x200>; reg-names = "vfe", "vfe_vbif"; reg = <0xfda10000 0x1000>, <0xfda40000 0x200>, <0xa4174 0x8>; reg-names = "vfe", "vfe_vbif", "vfe_fuse"; interrupts = <0 57 0>; interrupt-names = "vfe"; vdd-supply = <&gdsc_vfe>; Loading Loading @@ -105,9 +107,10 @@ vfe0: qcom,vfe0@fda10000 { vfe1: qcom,vfe1@fda14000 { cell-index = <1>; compatible = "qcom,vfe44"; reg = <0xfda14000 0x1000>; <0xfda40000 0x200>; reg-names = "vfe", "vfe_vbif"; reg = <0xfda14000 0x1000>, <0xfda40000 0x200>, <0xa4174 0x8>; reg-names = "vfe", "vfe_vbif", "vfe_fuse"; interrupts = <0 58 0>; interrupt-names = "vfe"; vdd-supply = <&gdsc_vfe>; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp.h +1 −0 Original line number Diff line number Diff line Loading @@ -762,6 +762,7 @@ struct vfe_device { uint32_t is_split; uint32_t dual_vfe_enable; unsigned long page_fault_addr; uint32_t vfe_hw_limit; /* Debug variables */ int dump_reg; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp47.c +15 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 @@ -2597,6 +2597,8 @@ int msm_vfe47_enable_regulators(struct vfe_device *vfe_dev, int enable) int msm_vfe47_get_platform_data(struct vfe_device *vfe_dev) { int rc = 0; void __iomem *vfe_fuse_base; uint32_t vfe_fuse_base_size; vfe_dev->vfe_base = msm_camera_get_reg_base(vfe_dev->pdev, "vfe", 0); if (!vfe_dev->vfe_base) Loading @@ -2621,7 +2623,18 @@ int msm_vfe47_get_platform_data(struct vfe_device *vfe_dev) rc = -ENOMEM; goto get_res_fail; } vfe_dev->vfe_hw_limit = 0; vfe_fuse_base = msm_camera_get_reg_base(vfe_dev->pdev, "vfe_fuse", 0); vfe_fuse_base_size = msm_camera_get_res_size(vfe_dev->pdev, "vfe_fuse"); if (vfe_fuse_base) { if (vfe_fuse_base_size) vfe_dev->vfe_hw_limit = (msm_camera_io_r(vfe_fuse_base) >> 7) & 0x3; msm_camera_put_reg_base(vfe_dev->pdev, vfe_fuse_base, "vfe_fuse", 0); } rc = vfe_dev->hw_info->vfe_ops.platform_ops.get_regulators(vfe_dev); if (rc) goto get_regulator_fail; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +14 −0 Original line number Diff line number Diff line Loading @@ -1359,6 +1359,20 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, vfe_dev->vfe_ub_policy = *cfg_data; break; } case GET_VFE_HW_LIMIT: { uint32_t *hw_limit = NULL; if (cmd_len < sizeof(uint32_t)) { pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", __func__, __LINE__, cmd_len, sizeof(uint32_t)); return -EINVAL; } hw_limit = (uint32_t *)cfg_data; *hw_limit = vfe_dev->vfe_hw_limit; break; } } return 0; } Loading include/uapi/media/msmb_isp.h +7 −3 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ #define ISP_STATS_STREAM_BIT 0x80000000 #define VFE_HW_LIMIT 1 struct msm_vfe_cfg_cmd_list; enum ISP_START_PIXEL_PATTERN { Loading Loading @@ -462,6 +464,7 @@ enum msm_vfe_reg_cfg_type { VFE_HW_UPDATE_UNLOCK, SET_WM_UB_SIZE, SET_UB_POLICY, GET_VFE_HW_LIMIT, }; struct msm_vfe_cfg_cmd2 { Loading Loading @@ -886,6 +889,7 @@ enum msm_isp_ioctl_cmd_code { MSM_ISP_FETCH_ENG_MULTI_PASS_START, MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, MSM_ISP_CFG_HW_STATE, MSM_ISP_AHB_CLK_CFG, }; #define VIDIOC_MSM_VFE_REG_CFG \ Loading Loading @@ -988,9 +992,6 @@ enum msm_isp_ioctl_cmd_code { _IOWR('V', MSM_ISP_UNMAP_BUF, \ struct msm_isp_unmap_buf_req) #define VIDIOC_MSM_ISP_AHB_CLK_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE+25, struct msm_isp_ahb_clk_cfg) #define VIDIOC_MSM_ISP_FETCH_ENG_MULTI_PASS_START \ _IOWR('V', MSM_ISP_FETCH_ENG_MULTI_PASS_START, \ struct msm_vfe_fetch_eng_multi_pass_start) Loading @@ -1002,4 +1003,7 @@ enum msm_isp_ioctl_cmd_code { #define VIDIOC_MSM_ISP_CFG_HW_STATE \ _IOWR('V', MSM_ISP_CFG_HW_STATE, \ struct msm_vfe_axi_stream_cfg_cmd) #define VIDIOC_MSM_ISP_AHB_CLK_CFG \ _IOWR('V', MSM_ISP_AHB_CLK_CFG, struct msm_isp_ahb_clk_cfg) #endif /* __MSMB_ISP__ */ Loading
Documentation/devicetree/bindings/media/video/msm-vfe.txt +9 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ Required properties for child node: Only needed for child node. - "vfe" - Required. - "vfe_vbif" - Optional for "vfe32". Required for "vfe40". - "vfe_fuse" - Optional. - interrupts : should contain the vfe interrupt. - interrupt-names : should specify relevant names to each interrupts property defined. Loading Loading @@ -52,9 +53,10 @@ Example: vfe0: qcom,vfe0@fda10000 { cell-index = <0>; compatible = "qcom,vfe44"; reg = <0xfda10000 0x1000>; <0xfda40000 0x200>; reg-names = "vfe", "vfe_vbif"; reg = <0xfda10000 0x1000>, <0xfda40000 0x200>, <0xa4174 0x8>; reg-names = "vfe", "vfe_vbif", "vfe_fuse"; interrupts = <0 57 0>; interrupt-names = "vfe"; vdd-supply = <&gdsc_vfe>; Loading Loading @@ -105,9 +107,10 @@ vfe0: qcom,vfe0@fda10000 { vfe1: qcom,vfe1@fda14000 { cell-index = <1>; compatible = "qcom,vfe44"; reg = <0xfda14000 0x1000>; <0xfda40000 0x200>; reg-names = "vfe", "vfe_vbif"; reg = <0xfda14000 0x1000>, <0xfda40000 0x200>, <0xa4174 0x8>; reg-names = "vfe", "vfe_vbif", "vfe_fuse"; interrupts = <0 58 0>; interrupt-names = "vfe"; vdd-supply = <&gdsc_vfe>; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp.h +1 −0 Original line number Diff line number Diff line Loading @@ -762,6 +762,7 @@ struct vfe_device { uint32_t is_split; uint32_t dual_vfe_enable; unsigned long page_fault_addr; uint32_t vfe_hw_limit; /* Debug variables */ int dump_reg; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp47.c +15 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 @@ -2597,6 +2597,8 @@ int msm_vfe47_enable_regulators(struct vfe_device *vfe_dev, int enable) int msm_vfe47_get_platform_data(struct vfe_device *vfe_dev) { int rc = 0; void __iomem *vfe_fuse_base; uint32_t vfe_fuse_base_size; vfe_dev->vfe_base = msm_camera_get_reg_base(vfe_dev->pdev, "vfe", 0); if (!vfe_dev->vfe_base) Loading @@ -2621,7 +2623,18 @@ int msm_vfe47_get_platform_data(struct vfe_device *vfe_dev) rc = -ENOMEM; goto get_res_fail; } vfe_dev->vfe_hw_limit = 0; vfe_fuse_base = msm_camera_get_reg_base(vfe_dev->pdev, "vfe_fuse", 0); vfe_fuse_base_size = msm_camera_get_res_size(vfe_dev->pdev, "vfe_fuse"); if (vfe_fuse_base) { if (vfe_fuse_base_size) vfe_dev->vfe_hw_limit = (msm_camera_io_r(vfe_fuse_base) >> 7) & 0x3; msm_camera_put_reg_base(vfe_dev->pdev, vfe_fuse_base, "vfe_fuse", 0); } rc = vfe_dev->hw_info->vfe_ops.platform_ops.get_regulators(vfe_dev); if (rc) goto get_regulator_fail; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +14 −0 Original line number Diff line number Diff line Loading @@ -1359,6 +1359,20 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev, vfe_dev->vfe_ub_policy = *cfg_data; break; } case GET_VFE_HW_LIMIT: { uint32_t *hw_limit = NULL; if (cmd_len < sizeof(uint32_t)) { pr_err("%s:%d failed: invalid cmd len %u exp %zu\n", __func__, __LINE__, cmd_len, sizeof(uint32_t)); return -EINVAL; } hw_limit = (uint32_t *)cfg_data; *hw_limit = vfe_dev->vfe_hw_limit; break; } } return 0; } Loading
include/uapi/media/msmb_isp.h +7 −3 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ #define ISP_STATS_STREAM_BIT 0x80000000 #define VFE_HW_LIMIT 1 struct msm_vfe_cfg_cmd_list; enum ISP_START_PIXEL_PATTERN { Loading Loading @@ -462,6 +464,7 @@ enum msm_vfe_reg_cfg_type { VFE_HW_UPDATE_UNLOCK, SET_WM_UB_SIZE, SET_UB_POLICY, GET_VFE_HW_LIMIT, }; struct msm_vfe_cfg_cmd2 { Loading Loading @@ -886,6 +889,7 @@ enum msm_isp_ioctl_cmd_code { MSM_ISP_FETCH_ENG_MULTI_PASS_START, MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, MSM_ISP_CFG_HW_STATE, MSM_ISP_AHB_CLK_CFG, }; #define VIDIOC_MSM_VFE_REG_CFG \ Loading Loading @@ -988,9 +992,6 @@ enum msm_isp_ioctl_cmd_code { _IOWR('V', MSM_ISP_UNMAP_BUF, \ struct msm_isp_unmap_buf_req) #define VIDIOC_MSM_ISP_AHB_CLK_CFG \ _IOWR('V', BASE_VIDIOC_PRIVATE+25, struct msm_isp_ahb_clk_cfg) #define VIDIOC_MSM_ISP_FETCH_ENG_MULTI_PASS_START \ _IOWR('V', MSM_ISP_FETCH_ENG_MULTI_PASS_START, \ struct msm_vfe_fetch_eng_multi_pass_start) Loading @@ -1002,4 +1003,7 @@ enum msm_isp_ioctl_cmd_code { #define VIDIOC_MSM_ISP_CFG_HW_STATE \ _IOWR('V', MSM_ISP_CFG_HW_STATE, \ struct msm_vfe_axi_stream_cfg_cmd) #define VIDIOC_MSM_ISP_AHB_CLK_CFG \ _IOWR('V', MSM_ISP_AHB_CLK_CFG, struct msm_isp_ahb_clk_cfg) #endif /* __MSMB_ISP__ */