Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 093f9b18 authored by Narendra Muppalla's avatar Narendra Muppalla
Browse files

drm/msm/sde: add property to select dpu smmu mapping based on hw version



This change adds device tree property to select the display smmu mapping
range based on the HW revision. If property present, display will select
the full range 4GB, whereas if property not present, mapping will be
limited to the upper 2GB space only.

Change-Id: I3c8173e56a97ab16fcad47b9e706f69f8b45e2ce
Signed-off-by: default avatarNarendra Muppalla <NarendraM@codeaurora.org>
parent a949307d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -142,6 +142,8 @@ Optional properties:
				feature is available or not.
				feature is available or not.
- qcom,sde-has-idle-pc:		Boolean property to indicate if target has idle
- qcom,sde-has-idle-pc:		Boolean property to indicate if target has idle
				power collapse feature available or not.
				power collapse feature available or not.
- qcom,fullsize-va-map:		Boolean property to indicate smmu mapping range
				for mdp should be full range (4GB).
- qcom,sde-has-mixer-gc:	Boolean property to indicate if mixer has gamma correction
- qcom,sde-has-mixer-gc:	Boolean property to indicate if mixer has gamma correction
				feature available or not.
				feature available or not.
- qcom,sde-has-dest-scaler: 	Boolean property to indicate if destination scaler
- qcom,sde-has-dest-scaler: 	Boolean property to indicate if destination scaler
@@ -605,6 +607,7 @@ Example:
    qcom,sde-highest-bank-bit = <15>;
    qcom,sde-highest-bank-bit = <15>;
    qcom,sde-has-mixer-gc;
    qcom,sde-has-mixer-gc;
    qcom,sde-has-idle-pc;
    qcom,sde-has-idle-pc;
    qcom,fullsize-va-map;
    qcom,sde-has-dest-scaler;
    qcom,sde-has-dest-scaler;
    qcom,sde-max-dest-scaler-input-linewidth = <2048>;
    qcom,sde-max-dest-scaler-input-linewidth = <2048>;
    qcom,sde-max-dest-scaler-output-linewidth = <2560>;
    qcom,sde-max-dest-scaler-output-linewidth = <2560>;
+8 −0
Original line number Original line Diff line number Diff line
@@ -407,11 +407,19 @@ struct msm_mmu *msm_smmu_new(struct device *dev,
{
{
	struct msm_smmu *smmu;
	struct msm_smmu *smmu;
	struct device *client_dev;
	struct device *client_dev;
	bool smmu_full_map;


	smmu = kzalloc(sizeof(*smmu), GFP_KERNEL);
	smmu = kzalloc(sizeof(*smmu), GFP_KERNEL);
	if (!smmu)
	if (!smmu)
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);


	smmu_full_map = of_property_read_bool(dev->of_node,
					"qcom,fullsize-va-map");
	if (smmu_full_map) {
		msm_smmu_domains[domain].va_start = SZ_128K;
		msm_smmu_domains[domain].va_size = SZ_4G - SZ_128K;
	}

	client_dev = msm_smmu_device_create(dev, domain, smmu);
	client_dev = msm_smmu_device_create(dev, domain, smmu);
	if (IS_ERR(client_dev)) {
	if (IS_ERR(client_dev)) {
		kfree(smmu);
		kfree(smmu);