Loading drivers/media/platform/msm/npu/npu_common.h +2 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,8 @@ struct npu_device { struct llcc_slice_desc *sys_cache; uint32_t execute_v2_flag; bool cxlimit_registered; uint32_t hw_version; }; struct npu_kevent { Loading drivers/media/platform/msm/npu/npu_dev.c +24 −0 Original line number Diff line number Diff line Loading @@ -1705,6 +1705,9 @@ static int npu_get_property(struct npu_client *client, case MSM_NPU_PROP_ID_DRV_VERSION: prop.prop_param[0] = 0; break; case MSM_NPU_PROP_ID_HARDWARE_VERSION: prop.prop_param[0] = npu_dev->hw_version; break; default: ret = npu_host_get_fw_property(client->npu_dev, &prop); if (ret) { Loading Loading @@ -2104,6 +2107,23 @@ static void npu_mbox_deinit(struct npu_device *npu_dev) } } static int npu_hw_info_init(struct npu_device *npu_dev) { int rc = 0; rc = npu_enable_core_power(npu_dev); if (rc) { pr_err("Failed to enable power\n"); return rc; } npu_dev->hw_version = REGR(npu_dev, NPU_HW_VERSION); pr_debug("NPU_HW_VERSION 0x%x\n", npu_dev->hw_version); npu_disable_core_power(npu_dev); return rc; } /* ------------------------------------------------------------------------- * Probe/Remove * ------------------------------------------------------------------------- Loading Loading @@ -2202,6 +2222,10 @@ static int npu_probe(struct platform_device *pdev) if (rc) goto error_get_dev_num; rc = npu_hw_info_init(npu_dev); if (rc) goto error_get_dev_num; rc = npu_pwrctrl_init(npu_dev); if (rc) goto error_get_dev_num; Loading include/uapi/linux/msm_npu.h +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ #define MSM_NPU_PROP_ID_PERF_MODE (MSM_NPU_PROP_ID_START + 1) #define MSM_NPU_PROP_ID_PERF_MODE_MAX (MSM_NPU_PROP_ID_START + 2) #define MSM_NPU_PROP_ID_DRV_VERSION (MSM_NPU_PROP_ID_START + 3) #define MSM_NPU_PROP_ID_HARDWARE_VERSION (MSM_NPU_PROP_ID_START + 4) #define MSM_NPU_FW_PROP_ID_START 0x1000 #define MSM_NPU_PROP_ID_DCVS_MODE (MSM_NPU_FW_PROP_ID_START + 0) Loading Loading
drivers/media/platform/msm/npu/npu_common.h +2 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,8 @@ struct npu_device { struct llcc_slice_desc *sys_cache; uint32_t execute_v2_flag; bool cxlimit_registered; uint32_t hw_version; }; struct npu_kevent { Loading
drivers/media/platform/msm/npu/npu_dev.c +24 −0 Original line number Diff line number Diff line Loading @@ -1705,6 +1705,9 @@ static int npu_get_property(struct npu_client *client, case MSM_NPU_PROP_ID_DRV_VERSION: prop.prop_param[0] = 0; break; case MSM_NPU_PROP_ID_HARDWARE_VERSION: prop.prop_param[0] = npu_dev->hw_version; break; default: ret = npu_host_get_fw_property(client->npu_dev, &prop); if (ret) { Loading Loading @@ -2104,6 +2107,23 @@ static void npu_mbox_deinit(struct npu_device *npu_dev) } } static int npu_hw_info_init(struct npu_device *npu_dev) { int rc = 0; rc = npu_enable_core_power(npu_dev); if (rc) { pr_err("Failed to enable power\n"); return rc; } npu_dev->hw_version = REGR(npu_dev, NPU_HW_VERSION); pr_debug("NPU_HW_VERSION 0x%x\n", npu_dev->hw_version); npu_disable_core_power(npu_dev); return rc; } /* ------------------------------------------------------------------------- * Probe/Remove * ------------------------------------------------------------------------- Loading Loading @@ -2202,6 +2222,10 @@ static int npu_probe(struct platform_device *pdev) if (rc) goto error_get_dev_num; rc = npu_hw_info_init(npu_dev); if (rc) goto error_get_dev_num; rc = npu_pwrctrl_init(npu_dev); if (rc) goto error_get_dev_num; Loading
include/uapi/linux/msm_npu.h +1 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ #define MSM_NPU_PROP_ID_PERF_MODE (MSM_NPU_PROP_ID_START + 1) #define MSM_NPU_PROP_ID_PERF_MODE_MAX (MSM_NPU_PROP_ID_START + 2) #define MSM_NPU_PROP_ID_DRV_VERSION (MSM_NPU_PROP_ID_START + 3) #define MSM_NPU_PROP_ID_HARDWARE_VERSION (MSM_NPU_PROP_ID_START + 4) #define MSM_NPU_FW_PROP_ID_START 0x1000 #define MSM_NPU_PROP_ID_DCVS_MODE (MSM_NPU_FW_PROP_ID_START + 0) Loading