1 #ifndef __NV50_KMS_ATOM_H__
2 #define __NV50_KMS_ATOM_H__
3 #define nv50_atom(p) container_of((p), struct nv50_atom, state)
4 #include <drm/drm_atomic.h>
7 struct nouveau_encoder;
10 struct drm_atomic_state state;
12 struct list_head outp;
17 #define nv50_head_atom(p) container_of((p), struct nv50_head_atom, state)
19 struct nv50_head_atom {
20 struct drm_crtc_state state;
35 struct nv50_head_mode {
64 void (*load)(struct drm_color_lut *, int size, void __iomem *);
125 struct nv50_crc_atom crc;
127 /* Currently only used for MST */
133 union nv50_head_atom_mask {
151 static inline struct nv50_head_atom *
152 nv50_head_atom_get(struct drm_atomic_state *state, struct drm_crtc *crtc)
154 struct drm_crtc_state *statec = drm_atomic_get_crtc_state(state, crtc);
156 return (void *)statec;
157 return nv50_head_atom(statec);
160 static inline struct drm_encoder *
161 nv50_head_atom_get_encoder(struct nv50_head_atom *atom)
163 struct drm_encoder *encoder;
165 /* We only ever have a single encoder */
166 drm_for_each_encoder_mask(encoder, atom->state.crtc->dev,
167 atom->state.encoder_mask)
173 #define nv50_wndw_atom(p) container_of((p), struct nv50_wndw_atom, state)
175 struct nv50_wndw_atom {
176 struct drm_plane_state state;
178 struct drm_property_blob *ilut;
204 void (*load)(struct drm_color_lut *, int size,
253 union nv50_wndw_atom_mask {