msm-4.14/include/linux/mdss_smmu_ext.h
Raghavendra Ambadas 878e0b1575 fbdev: msm: Add snapshot of mdss driver
This a snapshot of mdp and dsi driver fixs from msm-4.4
as of 'commit 3dd5febeecd1 ("fbdev: msm: Call vsync_handler
only after ctl start"). These changes bring in all display
features and bug fixes for SDM660 and msm8998 from msm-4.4.
On top of this, additional changes were done to adapt the
display driver to iommu,sync framework changes in msm-4.14.

Change-Id: I6d4aabb5f2f156c701209352f3364999bb91fd60
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
2020-03-25 12:43:10 +05:30

59 lines
1.9 KiB
C

/* Copyright (c) 2017, 2020, 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.
* @reg_lock /reg_unlock: Lock to access shared registers.
*/
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);
void (*reg_lock)(void);
void (*reg_unlock)(void);
bool (*handoff_pending)(void);
};
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
*/
#ifdef CONFIG_FB_MSM_MDSS
int mdss_smmu_request_mappings(msm_smmu_handler_t callback);
#else
static inline int mdss_smmu_request_mappings(msm_smmu_handler_t callback)
{
return 0;
}
#endif
#endif /* MDSS_SMMU_EXT_H */