2 * Copyright (C) STMicroelectronics SA 2014
5 * for STMicroelectronics.
6 * License terms: GNU General Public License (GPL), version 2
14 #include "sti_plane.h"
16 #define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
18 enum sti_mixer_status {
25 * STI Mixer subdevice structure
28 * @regs: mixer registers
29 * @id: id of the mixer
30 * @drm_crtc: crtc object link to the mixer
31 * @pending_event: set if a flip event is pending on crtc
32 * @status: to know the status of the mixer
38 struct drm_crtc drm_crtc;
39 struct drm_pending_vblank_event *pending_event;
40 enum sti_mixer_status status;
43 const char *sti_mixer_to_str(struct sti_mixer *mixer);
45 struct sti_mixer *sti_mixer_create(struct device *dev, int id,
46 void __iomem *baseaddr);
48 int sti_mixer_set_plane_status(struct sti_mixer *mixer,
49 struct sti_plane *plane, bool status);
50 int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
51 int sti_mixer_active_video_area(struct sti_mixer *mixer,
52 struct drm_display_mode *mode);
54 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
56 /* depth in Cross-bar control = z order */
57 #define GAM_MIXER_NB_DEPTH_LEVEL 6
59 #define STI_MIXER_MAIN 0
60 #define STI_MIXER_AUX 1