0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _STI_MIXER_H_
0010 #define _STI_MIXER_H_
0011
0012 #include <drm/drm_crtc.h>
0013
0014 #include <drm/drm_debugfs.h>
0015 #include <drm/drm_file.h>
0016
0017 #include "sti_plane.h"
0018
0019 struct device;
0020
0021 #define to_sti_mixer(x) container_of(x, struct sti_mixer, drm_crtc)
0022
0023 enum sti_mixer_status {
0024 STI_MIXER_READY,
0025 STI_MIXER_DISABLING,
0026 STI_MIXER_DISABLED,
0027 };
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 struct sti_mixer {
0039 struct device *dev;
0040 void __iomem *regs;
0041 int id;
0042 struct drm_crtc drm_crtc;
0043 enum sti_mixer_status status;
0044 };
0045
0046 const char *sti_mixer_to_str(struct sti_mixer *mixer);
0047
0048 struct sti_mixer *sti_mixer_create(struct device *dev,
0049 struct drm_device *drm_dev,
0050 int id,
0051 void __iomem *baseaddr);
0052
0053 int sti_mixer_set_plane_status(struct sti_mixer *mixer,
0054 struct sti_plane *plane, bool status);
0055 int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane);
0056 int sti_mixer_active_video_area(struct sti_mixer *mixer,
0057 struct drm_display_mode *mode);
0058
0059 void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);
0060
0061 void sti_mixer_debugfs_init(struct sti_mixer *mixer, struct drm_minor *minor);
0062
0063
0064 #define GAM_MIXER_NB_DEPTH_LEVEL 6
0065
0066 #define STI_MIXER_MAIN 0
0067 #define STI_MIXER_AUX 1
0068
0069 #endif