Loading Documentation/devicetree/bindings/media/video/msm-vidc.txt +2 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ Optional properties: internal persist = 0x200 internal persist1 = 0x400 internal cmd queue = 0x800 - qcom,pm-qos-latency-us = The latency used to vote for QOS power manager. This value is typically max(latencies of every cluster at all power levels) + 1 [Second level nodes] Context Banks Loading drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +3 −0 Original line number Diff line number Diff line Loading @@ -745,6 +745,9 @@ int read_platform_resources_from_dt( res->never_unload_fw = of_property_read_bool(pdev->dev.of_node, "qcom,never-unload-fw"); of_property_read_u32(pdev->dev.of_node, "qcom,pm-qos-latency-us", &res->pm_qos_latency_us); return rc; err_setup_legacy_cb: Loading drivers/media/platform/msm/vidc/msm_vidc_resources.h +1 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ struct msm_vidc_platform_resources { const char *fw_name; const char *hfi_version; bool never_unload_fw; uint32_t pm_qos_latency_us; }; static inline bool is_iommu_present(struct msm_vidc_platform_resources *res) Loading drivers/media/platform/msm/vidc/venus_hfi.c +14 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/iommu.h> #include <linux/iopoll.h> #include <linux/of.h> #include <linux/pm_qos.h> #include <linux/regulator/consumer.h> #include <linux/slab.h> #include <linux/workqueue.h> Loading Loading @@ -2062,6 +2063,10 @@ static int venus_hfi_core_init(void *device) if (rc || __iface_cmdq_write(dev, &version_pkt)) dprintk(VIDC_WARN, "Failed to send image version pkt to f/w\n"); if (dev->res->pm_qos_latency_us) pm_qos_add_request(&dev->qos, PM_QOS_CPU_DMA_LATENCY, dev->res->pm_qos_latency_us); mutex_unlock(&dev->lock); return rc; err_core_init: Loading @@ -2083,8 +2088,11 @@ static int venus_hfi_core_release(void *dev) } mutex_lock(&device->lock); pm_qos_remove_request(&device->qos); __set_state(device, VENUS_STATE_DEINIT); __unload_fw(device); mutex_unlock(&device->lock); return rc; Loading Loading @@ -4118,6 +4126,9 @@ static inline int __suspend(struct venus_hfi_device *device) } dprintk(VIDC_DBG, "Entering power collapse\n"); pm_qos_remove_request(&device->qos); rc = __tzbsp_set_video_state(TZBSP_VIDEO_STATE_SUSPEND); if (rc) { dprintk(VIDC_WARN, "Failed to suspend video core %d\n", rc); Loading Loading @@ -4177,6 +4188,9 @@ static inline int __resume(struct venus_hfi_device *device) */ __set_threshold_registers(device); if (device->res->pm_qos_latency_us) pm_qos_add_request(&device->qos, PM_QOS_CPU_DMA_LATENCY, device->res->pm_qos_latency_us); dprintk(VIDC_INFO, "Resumed from power collapse\n"); return rc; err_reset_core: Loading drivers/media/platform/msm/vidc/venus_hfi.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <linux/clk.h> #include <linux/mutex.h> #include <linux/platform_device.h> #include <linux/pm_qos.h> #include <linux/spinlock.h> #include "vmem/vmem.h" #include "vidc_hfi_api.h" Loading Loading @@ -247,6 +248,7 @@ struct venus_hfi_device { struct hfi_packetization_ops *pkt_ops; enum hfi_packetization_type packetization_type; struct msm_vidc_cb_info *response_pkt; struct pm_qos_request qos; }; void venus_hfi_delete_device(void *device); Loading Loading
Documentation/devicetree/bindings/media/video/msm-vidc.txt +2 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ Optional properties: internal persist = 0x200 internal persist1 = 0x400 internal cmd queue = 0x800 - qcom,pm-qos-latency-us = The latency used to vote for QOS power manager. This value is typically max(latencies of every cluster at all power levels) + 1 [Second level nodes] Context Banks Loading
drivers/media/platform/msm/vidc/msm_vidc_res_parse.c +3 −0 Original line number Diff line number Diff line Loading @@ -745,6 +745,9 @@ int read_platform_resources_from_dt( res->never_unload_fw = of_property_read_bool(pdev->dev.of_node, "qcom,never-unload-fw"); of_property_read_u32(pdev->dev.of_node, "qcom,pm-qos-latency-us", &res->pm_qos_latency_us); return rc; err_setup_legacy_cb: Loading
drivers/media/platform/msm/vidc/msm_vidc_resources.h +1 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ struct msm_vidc_platform_resources { const char *fw_name; const char *hfi_version; bool never_unload_fw; uint32_t pm_qos_latency_us; }; static inline bool is_iommu_present(struct msm_vidc_platform_resources *res) Loading
drivers/media/platform/msm/vidc/venus_hfi.c +14 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ #include <linux/iommu.h> #include <linux/iopoll.h> #include <linux/of.h> #include <linux/pm_qos.h> #include <linux/regulator/consumer.h> #include <linux/slab.h> #include <linux/workqueue.h> Loading Loading @@ -2062,6 +2063,10 @@ static int venus_hfi_core_init(void *device) if (rc || __iface_cmdq_write(dev, &version_pkt)) dprintk(VIDC_WARN, "Failed to send image version pkt to f/w\n"); if (dev->res->pm_qos_latency_us) pm_qos_add_request(&dev->qos, PM_QOS_CPU_DMA_LATENCY, dev->res->pm_qos_latency_us); mutex_unlock(&dev->lock); return rc; err_core_init: Loading @@ -2083,8 +2088,11 @@ static int venus_hfi_core_release(void *dev) } mutex_lock(&device->lock); pm_qos_remove_request(&device->qos); __set_state(device, VENUS_STATE_DEINIT); __unload_fw(device); mutex_unlock(&device->lock); return rc; Loading Loading @@ -4118,6 +4126,9 @@ static inline int __suspend(struct venus_hfi_device *device) } dprintk(VIDC_DBG, "Entering power collapse\n"); pm_qos_remove_request(&device->qos); rc = __tzbsp_set_video_state(TZBSP_VIDEO_STATE_SUSPEND); if (rc) { dprintk(VIDC_WARN, "Failed to suspend video core %d\n", rc); Loading Loading @@ -4177,6 +4188,9 @@ static inline int __resume(struct venus_hfi_device *device) */ __set_threshold_registers(device); if (device->res->pm_qos_latency_us) pm_qos_add_request(&device->qos, PM_QOS_CPU_DMA_LATENCY, device->res->pm_qos_latency_us); dprintk(VIDC_INFO, "Resumed from power collapse\n"); return rc; err_reset_core: Loading
drivers/media/platform/msm/vidc/venus_hfi.h +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <linux/clk.h> #include <linux/mutex.h> #include <linux/platform_device.h> #include <linux/pm_qos.h> #include <linux/spinlock.h> #include "vmem/vmem.h" #include "vidc_hfi_api.h" Loading Loading @@ -247,6 +248,7 @@ struct venus_hfi_device { struct hfi_packetization_ops *pkt_ops; enum hfi_packetization_type packetization_type; struct msm_vidc_cb_info *response_pkt; struct pm_qos_request qos; }; void venus_hfi_delete_device(void *device); Loading