0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _STI_COMPOSITOR_H_
0010 #define _STI_COMPOSITOR_H_
0011
0012 #include <linux/clk.h>
0013 #include <linux/kernel.h>
0014
0015 #include "sti_mixer.h"
0016 #include "sti_plane.h"
0017
0018 #define WAIT_NEXT_VSYNC_MS 50
0019
0020 #define STI_MAX_MIXER 2
0021 #define STI_MAX_VID 1
0022
0023 enum sti_compositor_subdev_type {
0024 STI_MIXER_MAIN_SUBDEV,
0025 STI_MIXER_AUX_SUBDEV,
0026 STI_GPD_SUBDEV,
0027 STI_VID_SUBDEV,
0028 STI_CURSOR_SUBDEV,
0029 };
0030
0031 struct sti_compositor_subdev_descriptor {
0032 enum sti_compositor_subdev_type type;
0033 int id;
0034 unsigned int offset;
0035 };
0036
0037
0038
0039
0040
0041
0042
0043 #define MAX_SUBDEV 9
0044 struct sti_compositor_data {
0045 unsigned int nb_subdev;
0046 struct sti_compositor_subdev_descriptor subdev_desc[MAX_SUBDEV];
0047 };
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 struct sti_compositor {
0067 struct device *dev;
0068 void __iomem *regs;
0069 struct sti_compositor_data data;
0070 struct clk *clk_compo_main;
0071 struct clk *clk_compo_aux;
0072 struct clk *clk_pix_main;
0073 struct clk *clk_pix_aux;
0074 struct reset_control *rst_main;
0075 struct reset_control *rst_aux;
0076 struct sti_mixer *mixer[STI_MAX_MIXER];
0077 struct sti_vid *vid[STI_MAX_VID];
0078 struct sti_vtg *vtg[STI_MAX_MIXER];
0079 struct notifier_block vtg_vblank_nb[STI_MAX_MIXER];
0080 };
0081
0082 void sti_compositor_debugfs_init(struct sti_compositor *compo,
0083 struct drm_minor *minor);
0084
0085 #endif