meson_vclk.h 950 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2016 BayLibre, SAS
  4. * Author: Neil Armstrong <narmstrong@baylibre.com>
  5. */
  6. /* Video Clock */
  7. #ifndef __MESON_VCLK_H
  8. #define __MESON_VCLK_H
  9. #include <drm/drm_modes.h>
  10. struct meson_drm;
  11. enum {
  12. MESON_VCLK_TARGET_CVBS = 0,
  13. MESON_VCLK_TARGET_HDMI = 1,
  14. MESON_VCLK_TARGET_DMT = 2,
  15. };
  16. /* 27MHz is the CVBS Pixel Clock */
  17. #define MESON_VCLK_CVBS (27 * 1000 * 1000)
  18. enum drm_mode_status
  19. meson_vclk_dmt_supported_freq(struct meson_drm *priv, unsigned long long freq);
  20. enum drm_mode_status
  21. meson_vclk_vic_supported_freq(struct meson_drm *priv,
  22. unsigned long long phy_freq,
  23. unsigned long long vclk_freq);
  24. void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
  25. unsigned long long phy_freq, unsigned long long vclk_freq,
  26. unsigned long long venc_freq, unsigned long long dac_freq,
  27. bool hdmi_use_enci);
  28. #endif /* __MESON_VCLK_H */