dp_mst_sim.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef _DP_MST_SIM_H_
  13. #define _DP_MST_SIM_H_
  14. #include "dp_aux_bridge.h"
  15. #include "dp_mst_sim_helper.h"
  16. #include <drm/drm_connector.h>
  17. #include <drm/drm_modes.h>
  18. enum dp_sim_mode_type {
  19. DP_SIM_MODE_EDID = 0x00000001,
  20. DP_SIM_MODE_DPCD_READ = 0x00000002,
  21. DP_SIM_MODE_DPCD_WRITE = 0x00000004,
  22. DP_SIM_MODE_LINK_TRAIN = 0x00000008,
  23. DP_SIM_MODE_MST = 0x00000010,
  24. DP_SIM_MODE_ALL = 0x0000001F,
  25. };
  26. int dp_sim_create_bridge(struct device *dev,
  27. struct dp_aux_bridge **bridge);
  28. int dp_sim_destroy_bridge(struct dp_aux_bridge *bridge);
  29. int dp_sim_set_sim_mode(struct dp_aux_bridge *bridge, u32 sim_mode);
  30. int dp_sim_update_port_num(struct dp_aux_bridge *bridge, u32 port_num);
  31. int dp_sim_update_port_status(struct dp_aux_bridge *bridge,
  32. int port, enum drm_connector_status status);
  33. int dp_sim_update_port_edid(struct dp_aux_bridge *bridge,
  34. int port, const u8 *edid, u32 size);
  35. int dp_sim_write_dpcd_reg(struct dp_aux_bridge *bridge,
  36. const u8 *dpcd, u32 size, u32 offset);
  37. int dp_sim_read_dpcd_reg(struct dp_aux_bridge *bridge,
  38. u8 *dpcd, u32 size, u32 offset);
  39. #endif /* _DP_MST_SIM_H_ */