Files
android_kernel_samsung_sm86…/drivers/cam_utils/cam_compat.h
Karthik Jayakumar 4d74da7de3 msm: camera: smmu: Update header include for SMMU API's
Due to restructuring of memory API's new header files contain old
DMA_ATTR macro's.

CRs-Fixed: 2835738
Change-Id: If2b13866c41dcf7b19b47e40fc2d3801c2161816
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
2021-03-30 16:05:37 -07:00

63 lines
1.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
*/
#ifndef _CAM_COMPAT_H_
#define _CAM_COMPAT_H_
#include <linux/version.h>
#include <linux/platform_device.h>
#include <linux/component.h>
#include "cam_csiphy_dev.h"
#include "cam_cpastop_hw.h"
#include "cam_smmu_api.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0)
#define VFL_TYPE_VIDEO VFL_TYPE_GRABBER
#endif
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
#include <linux/msm_ion.h>
#include <linux/iommu.h>
#include <linux/ion.h>
#include <linux/qcom_scm.h>
#else
#include <linux/msm_ion.h>
#include <linux/ion_kernel.h>
#include <soc/qcom/scm.h>
#endif
#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
#include <linux/qcom-dma-mapping.h>
#endif
struct cam_fw_alloc_info {
struct device *fw_dev;
void *fw_kva;
uint64_t fw_hdl;
};
int cam_reserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
void cam_unreserve_icp_fw(struct cam_fw_alloc_info *icp_fw, size_t fw_length);
void cam_cpastop_scm_write(struct cam_cpas_hw_errata_wa *errata_wa);
int cam_ife_notify_safe_lut_scm(bool safe_trigger);
int camera_component_match_add_drivers(struct device *master_dev,
struct component_match **match_list);
int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev,
bool protect, int32_t offset);
void cam_free_clear(const void *);
void cam_check_iommu_faults(struct iommu_domain *domain,
struct cam_smmu_pf_info *pf_info);
#endif /* _CAM_COMPAT_H_ */