dp_ctrl.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2012-2020, 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. struct dp_ctrl {
  14. int (*init)(struct dp_ctrl *dp_ctrl, bool flip, bool reset);
  15. void (*deinit)(struct dp_ctrl *dp_ctrl);
  16. int (*on)(struct dp_ctrl *dp_ctrl, bool mst_mode, bool fec_en,
  17. bool dsc_en, bool shallow);
  18. void (*off)(struct dp_ctrl *dp_ctrl);
  19. void (*abort)(struct dp_ctrl *dp_ctrl, bool abort);
  20. void (*isr)(struct dp_ctrl *dp_ctrl);
  21. bool (*handle_sink_request)(struct dp_ctrl *dp_ctrl);
  22. void (*process_phy_test_request)(struct dp_ctrl *dp_ctrl);
  23. int (*link_maintenance)(struct dp_ctrl *dp_ctrl);
  24. int (*stream_on)(struct dp_ctrl *dp_ctrl, struct dp_panel *panel);
  25. void (*stream_off)(struct dp_ctrl *dp_ctrl, struct dp_panel *panel);
  26. void (*stream_pre_off)(struct dp_ctrl *dp_ctrl, struct dp_panel *panel);
  27. void (*set_mst_channel_info)(struct dp_ctrl *dp_ctrl,
  28. enum dp_stream_id strm,
  29. u32 ch_start_slot, u32 ch_tot_slots);
  30. };
  31. struct dp_ctrl_in {
  32. struct device *dev;
  33. struct dp_panel *panel;
  34. struct dp_aux *aux;
  35. struct dp_link *link;
  36. struct dp_parser *parser;
  37. struct dp_power *power;
  38. struct dp_catalog_ctrl *catalog;
  39. };
  40. struct dp_ctrl *dp_ctrl_get(struct dp_ctrl_in *in);
  41. void dp_ctrl_put(struct dp_ctrl *dp_ctrl);
  42. #endif /* _DP_CTRL_H_ */