1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) STMicroelectronics SA 2014
6 * for STMicroelectronics.
12 #include <drm/drm_crtc.h>
14 #include <drm/drm_debugfs.h>
15 #include <drm/drm_file.h>
17 #include "sti_plane.h"
21 #define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
23 enum sti_mixer_status {
30 * STI Mixer subdevice structure
33 * @regs: mixer registers
34 * @id: id of the mixer
35 * @drm_crtc: crtc object link to the mixer
36 * @status: to know the status of the mixer
42 struct drm_crtc drm_crtc;
43 enum sti_mixer_status status;
46 const char *sti_mixer_to_str(struct sti_mixer *mixer);
48 struct sti_mixer *sti_mixer_create(struct device *dev,
49 struct drm_device *drm_dev,
51 void __iomem *baseaddr);
53 int sti_mixer_set_plane_status(struct sti_mixer *mixer,
54 struct sti_plane *plane, bool status);
55 int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
56 int sti_mixer_active_video_area(struct sti_mixer *mixer,
57 struct drm_display_mode *mode);
59 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
61 void sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor);
63 /* depth in Cross-bar control = z order */
64 #define GAM_MIXER_NB_DEPTH_LEVEL 6
66 #define STI_MIXER_MAIN 0
67 #define STI_MIXER_AUX 1