disp: msm: sde: avoid VMID_TVM check during buf import in trusted-vm
Both trusted-vm and secure-camera preview buffers uses the same VMID_TVM. In primary-vm, the check is used to determine the camera preview usecase and attach it to the correct device. This is not necessary for trusted-vm as it can default to nested trusted-vm context bank. Avoid the check while its in trusted-vm. Change-Id: I4391a4a1da9dca5d1f4b1719733b8d4edc1900a8 Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:
@@ -157,19 +157,22 @@ struct drm_gem_object *msm_gem_prime_import(struct drm_device *dev,
|
||||
}
|
||||
|
||||
#if (KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE)
|
||||
ret = mem_buf_dma_buf_copy_vmperm(dma_buf, &vmid_list, &perms_list, &nelems);
|
||||
if (ret) {
|
||||
DRM_ERROR("get vmid list failure, ret:%d", ret);
|
||||
goto fail_put;
|
||||
/* avoid VMID checks in trusted-vm */
|
||||
if (!kms->funcs->in_trusted_vm || !kms->funcs->in_trusted_vm(kms)) {
|
||||
ret = mem_buf_dma_buf_copy_vmperm(dma_buf, &vmid_list, &perms_list, &nelems);
|
||||
if (ret) {
|
||||
DRM_ERROR("get vmid list failure, ret:%d", ret);
|
||||
goto fail_put;
|
||||
}
|
||||
|
||||
for (i = 0; i < nelems; i++)
|
||||
if (vmid_list[i] == VMID_TVM)
|
||||
is_nested_sec_vmid = true;
|
||||
|
||||
/* mem_buf_dma_buf_copy_vmperm uses kmemdup, do kfree to free up the memory */
|
||||
kfree(vmid_list);
|
||||
kfree(perms_list);
|
||||
}
|
||||
|
||||
for (i = 0; i < nelems; i++)
|
||||
if (vmid_list[i] == VMID_TVM)
|
||||
is_nested_sec_vmid = true;
|
||||
|
||||
/* mem_buf_dma_buf_copy_vmperm uses kmemdup, do kfree to free up the memory */
|
||||
kfree(vmid_list);
|
||||
kfree(perms_list);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Verwijs in nieuw issue
Block a user