dp_ctrl.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _DP_CTRL_H_
  6. #define _DP_CTRL_H_
  7. #include "dp_aux.h"
  8. #include "dp_panel.h"
  9. #include "dp_link.h"
  10. #include "dp_parser.h"
  11. #include "dp_power.h"
  12. #include "dp_catalog.h"
  13. #include "dp_debug.h"
  14. struct dp_ctrl {
  15. int (*init)(struct dp_ctrl *dp_ctrl, bool flip, bool reset);
  16. void (*deinit)(struct dp_ctrl *dp_ctrl);
  17. int (*on)(struct dp_ctrl *dp_ctrl, bool mst_mode, bool fec_en,
  18. bool dsc_en, bool shallow);
  19. void (*off)(struct dp_ctrl *dp_ctrl);
  20. void (*abort)(struct dp_ctrl *dp_ctrl, bool abort);
  21. void (*isr)(struct dp_ctrl *dp_ctrl);
  22. bool (*handle_sink_request)(struct dp_ctrl *dp_ctrl);
  23. void (*process_phy_test_request)(struct dp_ctrl *dp_ctrl);
  24. int (*link_maintenance)(struct dp_ctrl *dp_ctrl);
  25. int (*stream_on)(struct dp_ctrl *dp_ctrl, struct dp_panel *panel);
  26. void (*stream_off)(struct dp_ctrl *dp_ctrl, struct dp_panel *panel);
  27. void (*stream_pre_off)(struct dp_ctrl *dp_ctrl, struct dp_panel *panel);
  28. void (*set_mst_channel_info)(struct dp_ctrl *dp_ctrl,
  29. enum dp_stream_id strm,
  30. u32 ch_start_slot, u32 ch_tot_slots);
  31. void (*set_sim_mode)(struct dp_ctrl *dp_ctrl, bool en);
  32. };
  33. struct dp_ctrl_in {
  34. struct device *dev;
  35. struct dp_panel *panel;
  36. struct dp_aux *aux;
  37. struct dp_link *link;
  38. struct dp_parser *parser;
  39. struct dp_power *power;
  40. struct dp_catalog_ctrl *catalog;
  41. struct dp_pll *pll;
  42. };
  43. struct dp_ctrl *dp_ctrl_get(struct dp_ctrl_in *in);
  44. void dp_ctrl_put(struct dp_ctrl *dp_ctrl);
  45. #endif /* _DP_CTRL_H_ */