cam_lrme.h 1.5 KB

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