cam_lrme.h 1.6 KB

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