Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / msm / disp / mdp5 / mdp5_mixer.h
blob43c9ba43ce18530a3432c2f3cb7c0316f5ad7349
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2017 The Linux Foundation. All rights reserved.
4 */
6 #ifndef __MDP5_LM_H__
7 #define __MDP5_LM_H__
9 /* represents a hw Layer Mixer, one (or more) is dynamically assigned to a crtc */
10 struct mdp5_hw_mixer {
11 int idx;
13 const char *name;
15 int lm; /* the LM instance # */
16 uint32_t caps;
17 int pp;
18 int dspp;
20 uint32_t flush_mask; /* used to commit LM registers */
23 /* global atomic state of assignment between CRTCs and Layer Mixers: */
24 struct mdp5_hw_mixer_state {
25 struct drm_crtc *hwmixer_to_crtc[8];
28 struct mdp5_hw_mixer *mdp5_mixer_init(const struct mdp5_lm_instance *lm);
29 void mdp5_mixer_destroy(struct mdp5_hw_mixer *lm);
30 int mdp5_mixer_assign(struct drm_atomic_state *s, struct drm_crtc *crtc,
31 uint32_t caps, struct mdp5_hw_mixer **mixer,
32 struct mdp5_hw_mixer **r_mixer);
33 void mdp5_mixer_release(struct drm_atomic_state *s,
34 struct mdp5_hw_mixer *mixer);
36 #endif /* __MDP5_LM_H__ */