crcc37d.h 854 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: MIT */
  2. #ifndef __CRCC37D_H__
  3. #define __CRCC37D_H__
  4. #include <linux/types.h>
  5. #include "crc.h"
  6. #define CRCC37D_MAX_ENTRIES 2047
  7. #define CRCC37D_FLIP_THRESHOLD (CRCC37D_MAX_ENTRIES - 30)
  8. struct crcc37d_notifier {
  9. u32 status;
  10. /* reserved */
  11. u32:32;
  12. u32:32;
  13. u32:32;
  14. u32:32;
  15. u32:32;
  16. u32:32;
  17. u32:32;
  18. struct crcc37d_entry {
  19. u32 status[2];
  20. u32:32; /* reserved */
  21. u32 compositor_crc;
  22. u32 rg_crc;
  23. u32 output_crc[2];
  24. u32:32; /* reserved */
  25. } entries[CRCC37D_MAX_ENTRIES];
  26. } __packed;
  27. int crcc37d_set_ctx(struct nv50_head *head, struct nv50_crc_notifier_ctx *ctx);
  28. u32 crcc37d_get_entry(struct nv50_head *head, struct nv50_crc_notifier_ctx *ctx,
  29. enum nv50_crc_source source, int idx);
  30. bool crcc37d_ctx_finished(struct nv50_head *head, struct nv50_crc_notifier_ctx *ctx);
  31. #endif /* !__CRCC37D_H__ */