disp: msm: use FB_NON_SEC_DIR_TRANS plane hint for TUI VM buffers

Add plane buffer flag to get the correct aspace during
TUI VM usecase. FB_NON_SEC_DIR_TRANS plane flag is set
by user-mode to indicate S2-only non-secure buffer in
TUI VM. Return the default drm device when SMMU is not
available during get_aspace_device to make the working
seamless with/without SMMU.

Change-Id: I158dc17ba51ff4b2f302d3e7017db8ab3cfe2b84
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2020-03-04 11:56:18 -08:00
committed by Gerrit - the friendly Code Review server
vanhempi bfec52ae7b
commit 68b75aac24
4 muutettua tiedostoa jossa 33 lisäystä ja 10 poistoa

Näytä tiedosto

@@ -2147,11 +2147,31 @@ _sde_kms_get_address_space(struct msm_kms *kms,
static struct device *_sde_kms_get_address_space_device(struct msm_kms *kms,
unsigned int domain)
{
struct msm_gem_address_space *aspace =
_sde_kms_get_address_space(kms, domain);
struct sde_kms *sde_kms;
struct device *dev;
struct msm_gem_address_space *aspace;
return (aspace && aspace->domain_attached) ?
msm_gem_get_aspace_device(aspace) : NULL;
if (!kms) {
SDE_ERROR("invalid kms\n");
return NULL;
}
sde_kms = to_sde_kms(kms);
if (!sde_kms || !sde_kms->dev || !sde_kms->dev->dev) {
SDE_ERROR("invalid params\n");
return NULL;
}
/* return default device, when IOMMU is not present */
if (!iommu_present(&platform_bus_type)) {
dev = sde_kms->dev->dev;
} else {
aspace = _sde_kms_get_address_space(kms, domain);
dev = (aspace && aspace->domain_attached) ?
msm_gem_get_aspace_device(aspace) : NULL;
}
return dev;
}
static void _sde_kms_post_open(struct msm_kms *kms, struct drm_file *file)