sh_mobile_lcdcfb.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef SH_MOBILE_LCDCFB_H
  2. #define SH_MOBILE_LCDCFB_H
  3. #include <linux/completion.h>
  4. #include <linux/fb.h>
  5. #include <linux/mutex.h>
  6. #include <linux/wait.h>
  7. /* per-channel registers */
  8. enum { LDDCKPAT1R, LDDCKPAT2R, LDMT1R, LDMT2R, LDMT3R, LDDFR, LDSM1R,
  9. LDSM2R, LDSA1R, LDSA2R, LDMLSR, LDHCNR, LDHSYNR, LDVLNR, LDVSYNR, LDPMR,
  10. LDHAJR,
  11. NR_CH_REGS };
  12. #define PALETTE_NR 16
  13. struct sh_mobile_lcdc_priv;
  14. struct fb_info;
  15. struct backlight_device;
  16. /*
  17. * struct sh_mobile_lcdc_chan - LCDC display channel
  18. *
  19. * @base_addr_y: Frame buffer viewport base address (luma component)
  20. * @base_addr_c: Frame buffer viewport base address (chroma component)
  21. * @pitch: Frame buffer line pitch
  22. */
  23. struct sh_mobile_lcdc_chan {
  24. struct sh_mobile_lcdc_priv *lcdc;
  25. unsigned long *reg_offs;
  26. unsigned long ldmt1r_value;
  27. unsigned long enabled; /* ME and SE in LDCNT2R */
  28. struct sh_mobile_lcdc_chan_cfg cfg;
  29. u32 pseudo_palette[PALETTE_NR];
  30. unsigned long saved_ch_regs[NR_CH_REGS];
  31. struct fb_info *info;
  32. struct backlight_device *bl;
  33. dma_addr_t dma_handle;
  34. struct fb_deferred_io defio;
  35. struct scatterlist *sglist;
  36. unsigned long frame_end;
  37. unsigned long pan_offset;
  38. wait_queue_head_t frame_end_wait;
  39. struct completion vsync_completion;
  40. struct fb_var_screeninfo display_var;
  41. int use_count;
  42. int blank_status;
  43. struct mutex open_lock; /* protects the use counter */
  44. int meram_enabled;
  45. unsigned long base_addr_y;
  46. unsigned long base_addr_c;
  47. unsigned int pitch;
  48. };
  49. #endif