Merge "msm: npu: Allow user code to query if NPUDSP SID is mapped"
This commit is contained in:
commit
9e908fa703
3 changed files with 8 additions and 0 deletions
|
@ -287,6 +287,7 @@ struct npu_device {
|
|||
struct llcc_slice_desc *sys_cache;
|
||||
uint32_t execute_v2_flag;
|
||||
bool cxlimit_registered;
|
||||
bool npu_dsp_sid_mapped;
|
||||
|
||||
uint32_t hw_version;
|
||||
};
|
||||
|
|
|
@ -1643,6 +1643,8 @@ static int npu_get_property(struct npu_client *client,
|
|||
case MSM_NPU_PROP_ID_DRV_FEATURE:
|
||||
prop.prop_param[0] = MSM_NPU_FEATURE_MULTI_EXECUTE |
|
||||
MSM_NPU_FEATURE_ASYNC_EXECUTE;
|
||||
if (npu_dev->npu_dsp_sid_mapped)
|
||||
prop.prop_param[0] |= MSM_NPU_FEATURE_DSP_SID_MAPPED;
|
||||
break;
|
||||
default:
|
||||
ret = npu_host_get_fw_property(client->npu_dev, &prop);
|
||||
|
@ -2420,6 +2422,10 @@ static int npu_hw_info_init(struct npu_device *npu_dev)
|
|||
NPU_DBG("NPU_HW_VERSION 0x%x\n", npu_dev->hw_version);
|
||||
npu_disable_core_power(npu_dev);
|
||||
|
||||
npu_dev->npu_dsp_sid_mapped =
|
||||
of_property_read_bool(npu_dev->pdev->dev.of_node,
|
||||
"qcom,npu-dsp-sid-mapped");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
/* features supported by driver */
|
||||
#define MSM_NPU_FEATURE_MULTI_EXECUTE 0x1
|
||||
#define MSM_NPU_FEATURE_ASYNC_EXECUTE 0x2
|
||||
#define MSM_NPU_FEATURE_DSP_SID_MAPPED 0x8
|
||||
|
||||
#define PROP_PARAM_MAX_SIZE 8
|
||||
|
||||
|
|
Loading…
Reference in a new issue