disp: msm: assign aspace to gem object for mmap buffer

During gem fault, if aspace value is found to be NULL
pages map request will be failed. This change assigns
nonsecure aspace to gem object before mapping the pages
in such cases.

Change-Id: Ia838fd8a446e21771742ec9d51e30fe08c989e6e
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
This commit is contained in:
Yashwanth 2021-07-28 17:11:15 +05:30
commit d7d8a487ca

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
* Copyright (C) 2013 Red Hat
* Author: Rob Clark <robdclark@gmail.com>
*
@ -275,6 +275,8 @@ vm_fault_t msm_gem_fault(struct vm_fault *vmf)
return VM_FAULT_SIGBUS;
}
msm_obj->aspace = msm_gem_smmu_address_space_get(obj->dev,
MSM_SMMU_DOMAIN_UNSECURE);
/* make sure we have pages attached now */
pages = get_pages(obj);
if (IS_ERR(pages)) {