1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 #ifndef _STI_COMPOSITOR_H_
  10 #define _STI_COMPOSITOR_H_
  11 
  12 #include <linux/clk.h>
  13 #include <linux/kernel.h>
  14 
  15 #include "sti_mixer.h"
  16 #include "sti_plane.h"
  17 
  18 #define WAIT_NEXT_VSYNC_MS      50 
  19 
  20 #define STI_MAX_MIXER 2
  21 #define STI_MAX_VID   1
  22 
  23 enum sti_compositor_subdev_type {
  24         STI_MIXER_MAIN_SUBDEV,
  25         STI_MIXER_AUX_SUBDEV,
  26         STI_GPD_SUBDEV,
  27         STI_VID_SUBDEV,
  28         STI_CURSOR_SUBDEV,
  29 };
  30 
  31 struct sti_compositor_subdev_descriptor {
  32         enum sti_compositor_subdev_type type;
  33         int id;
  34         unsigned int offset;
  35 };
  36 
  37 
  38 
  39 
  40 
  41 
  42 
  43 #define MAX_SUBDEV 9
  44 struct sti_compositor_data {
  45         unsigned int nb_subdev;
  46         struct sti_compositor_subdev_descriptor subdev_desc[MAX_SUBDEV];
  47 };
  48 
  49 
  50 
  51 
  52 
  53 
  54 
  55 
  56 
  57 
  58 
  59 
  60 
  61 
  62 
  63 
  64 
  65 
  66 struct sti_compositor {
  67         struct device *dev;
  68         void __iomem *regs;
  69         struct sti_compositor_data data;
  70         struct clk *clk_compo_main;
  71         struct clk *clk_compo_aux;
  72         struct clk *clk_pix_main;
  73         struct clk *clk_pix_aux;
  74         struct reset_control *rst_main;
  75         struct reset_control *rst_aux;
  76         struct sti_mixer *mixer[STI_MAX_MIXER];
  77         struct sti_vid *vid[STI_MAX_VID];
  78         struct sti_vtg *vtg[STI_MAX_MIXER];
  79         struct notifier_block vtg_vblank_nb[STI_MAX_MIXER];
  80 };
  81 
  82 int sti_compositor_debugfs_init(struct sti_compositor *compo,
  83                                 struct drm_minor *minor);
  84 
  85 #endif