amcm.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Color Management
  3. *
  4. * Author: Lin Xu <lin.xu@amlogic.com>
  5. * Bobby Yang <bo.yang@amlogic.com>
  6. *
  7. * Copyright (C) 2010 Amlogic Inc.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #ifndef __AM_CM_H
  14. #define __AM_CM_H
  15. #include "linux/amports/vframe.h"
  16. #include "linux/amports/cm.h"
  17. typedef struct cm_regs_s {
  18. unsigned int val : 32;
  19. unsigned int reg : 14;
  20. unsigned int port : 2; // port port_addr port_data remark
  21. // 0 NA NA direct access
  22. // 1 VPP_CHROMA_ADDR_PORT VPP_CHROMA_DATA_PORT CM port registers
  23. // 2 NA NA reserved
  24. // 3 NA NA reserved
  25. unsigned int bit : 5;
  26. unsigned int wid : 5;
  27. unsigned int mode : 1; // 0:read, 1:write
  28. unsigned int rsv : 5;
  29. } cm_regs_t;
  30. // ***************************************************************************
  31. // *** IOCTL-oriented functions *********************************************
  32. // ***************************************************************************
  33. void cm_set_region(struct cm_region_s *p);
  34. void cm_set_top(struct cm_top_s *p);
  35. void cm_set_demo(struct cm_demo_s *p);
  36. void cm_set_regs(struct cm_regs_s *p);
  37. #endif