1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 /* 3 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. 4 */ 5 6 #ifndef __UAPI_CAM_LRME_H__ 7 #define __UAPI_CAM_LRME_H__ 8 9 #include <media/cam_defs.h> 10 11 /* LRME Resource Types */ 12 13 enum CAM_LRME_IO_TYPE { 14 CAM_LRME_IO_TYPE_TAR, 15 CAM_LRME_IO_TYPE_REF, 16 CAM_LRME_IO_TYPE_RES, 17 CAM_LRME_IO_TYPE_DS2, 18 }; 19 20 #define CAM_LRME_INPUT_PORT_TYPE_TAR (1 << 0) 21 #define CAM_LRME_INPUT_PORT_TYPE_REF (1 << 1) 22 23 #define CAM_LRME_OUTPUT_PORT_TYPE_DS2 (1 << 0) 24 #define CAM_LRME_OUTPUT_PORT_TYPE_RES (1 << 1) 25 26 #define CAM_LRME_DEV_MAX 1 27 28 29 struct cam_lrme_hw_version { 30 uint32_t gen; 31 uint32_t rev; 32 uint32_t step; 33 }; 34 35 struct cam_lrme_dev_cap { 36 struct cam_lrme_hw_version clc_hw_version; 37 struct cam_lrme_hw_version bus_rd_hw_version; 38 struct cam_lrme_hw_version bus_wr_hw_version; 39 struct cam_lrme_hw_version top_hw_version; 40 struct cam_lrme_hw_version top_titan_version; 41 }; 42 43 /** 44 * struct cam_lrme_query_cap_cmd - LRME query device capability payload 45 * 46 * @dev_iommu_handle: LRME iommu handles for secure/non secure 47 * modes 48 * @cdm_iommu_handle: Iommu handles for secure/non secure modes 49 * @num_devices: number of hardware devices 50 * @dev_caps: Returned device capability array 51 */ 52 struct cam_lrme_query_cap_cmd { 53 struct cam_iommu_handle device_iommu; 54 struct cam_iommu_handle cdm_iommu; 55 uint32_t num_devices; 56 struct cam_lrme_dev_cap dev_caps[CAM_LRME_DEV_MAX]; 57 }; 58 59 struct cam_lrme_soc_info { 60 uint64_t clock_rate; 61 uint64_t bandwidth; 62 uint64_t reserved[4]; 63 }; 64 65 struct cam_lrme_acquire_args { 66 struct cam_lrme_soc_info lrme_soc_info; 67 }; 68 69 #endif /* __UAPI_CAM_LRME_H__ */ 70