summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKalyan Thota <kalyant@codeaurora.org>2017-01-14 12:21:29 +0530
committerKalyan Thota <kalyant@codeaurora.org>2017-02-07 10:51:12 +0530
commite8b77a585bea4073792b43a349c721c1e8ea77cc (patch)
tree063a2e5e8184b290ffdd274d08eb06ac54024248 /include/linux
parent741fc8ee90d3c1da6fd8b92c5d3e8857d145b4a2 (diff)
msm: mdss: share MDP smmu device mappings with other mdss clients
Rotator and MDP share same stream ID on sdm600 target, hence share the smmu device with rotator device to map/unmap its buffers. The change will also handle different secure usecase concurrencies like, mdp running in secure and rotator in non-secure and vice versa. Change-Id: I3ff118baed3984d63e9a9fe94289d99523c7b3e9 Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mdss_smmu_ext.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/linux/mdss_smmu_ext.h b/include/linux/mdss_smmu_ext.h
new file mode 100644
index 000000000000..414ab055595a
--- /dev/null
+++ b/include/linux/mdss_smmu_ext.h
@@ -0,0 +1,49 @@
+/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef MDSS_SMMU_EXT_H
+#define MDSS_SMMU_EXT_H
+
+/**
+ * struct msm_smmu:interface exposed to the clients which use smmu driver.
+ * @dev: smmu device for attach/dettach
+ * @domain: domain for the context bank.
+ * @is_secure: bool variable to check for secure domain.
+ * @iommu_ctrl: iommu ctrl function for enable/disable attach.
+ * @secure_session_ctrl: ctrl function for enable/disable session.
+ * @wait_for_transition:function to wait till secure transtion is complete.
+ */
+struct mdss_smmu_intf {
+ struct device *dev;
+ int domain;
+ bool is_secure;
+ int (*iommu_ctrl)(int);
+ int (*secure_session_ctrl)(int);
+ int (*wait_for_transition)(int state, int request);
+};
+
+typedef void (*msm_smmu_handler_t) (struct mdss_smmu_intf *smmu);
+
+/**
+ * mdss_smmu_request_mappings: function to request smmu mappings.
+ * Client driver can request smmu dev via this API.
+ * dev will be returned in the same call context
+ * if probe is not finished then dev will be
+ * returned once it is completed.
+ * @callback: callback function that is called to return smmu
+ * dev
+ */
+
+int mdss_smmu_request_mappings(msm_smmu_handler_t callback);
+
+#endif /* MDSS_SMMU_EXT_H */