mdp5_mixer.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2017 The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License version 2 as published by
  6. * the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but WITHOUT
  9. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11. * more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along with
  14. * this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef __MDP5_LM_H__
  17. #define __MDP5_LM_H__
  18. /* represents a hw Layer Mixer, one (or more) is dynamically assigned to a crtc */
  19. struct mdp5_hw_mixer {
  20. int idx;
  21. const char *name;
  22. int lm; /* the LM instance # */
  23. uint32_t caps;
  24. int pp;
  25. int dspp;
  26. uint32_t flush_mask; /* used to commit LM registers */
  27. };
  28. /* global atomic state of assignment between CRTCs and Layer Mixers: */
  29. struct mdp5_hw_mixer_state {
  30. struct drm_crtc *hwmixer_to_crtc[8];
  31. };
  32. struct mdp5_hw_mixer *mdp5_mixer_init(const struct mdp5_lm_instance *lm);
  33. void mdp5_mixer_destroy(struct mdp5_hw_mixer *lm);
  34. int mdp5_mixer_assign(struct drm_atomic_state *s, struct drm_crtc *crtc,
  35. uint32_t caps, struct mdp5_hw_mixer **mixer,
  36. struct mdp5_hw_mixer **r_mixer);
  37. void mdp5_mixer_release(struct drm_atomic_state *s,
  38. struct mdp5_hw_mixer *mixer);
  39. #endif /* __MDP5_LM_H__ */