dw_hdmi_qp.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd.
  4. * Copyright (c) 2024 Collabora Ltd.
  5. */
  6. #ifndef __DW_HDMI_QP__
  7. #define __DW_HDMI_QP__
  8. struct device;
  9. struct drm_encoder;
  10. struct dw_hdmi_qp;
  11. struct platform_device;
  12. struct dw_hdmi_qp_phy_ops {
  13. int (*init)(struct dw_hdmi_qp *hdmi, void *data);
  14. void (*disable)(struct dw_hdmi_qp *hdmi, void *data);
  15. enum drm_connector_status (*read_hpd)(struct dw_hdmi_qp *hdmi, void *data);
  16. void (*setup_hpd)(struct dw_hdmi_qp *hdmi, void *data);
  17. };
  18. struct dw_hdmi_qp_plat_data {
  19. const struct dw_hdmi_qp_phy_ops *phy_ops;
  20. void *phy_data;
  21. int main_irq;
  22. int cec_irq;
  23. unsigned long ref_clk_rate;
  24. /* Supported output formats: bitmask of @hdmi_colorspace */
  25. unsigned int supported_formats;
  26. /* Maximum bits per color channel: 8, 10 or 12 */
  27. unsigned int max_bpc;
  28. };
  29. struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
  30. struct drm_encoder *encoder,
  31. const struct dw_hdmi_qp_plat_data *plat_data);
  32. void dw_hdmi_qp_suspend(struct device *dev, struct dw_hdmi_qp *hdmi);
  33. void dw_hdmi_qp_resume(struct device *dev, struct dw_hdmi_qp *hdmi);
  34. #endif /* __DW_HDMI_QP__ */