exynos_mixer.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. *
  3. * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  4. * Authors:
  5. * Seung-Woo Kim <sw0312.kim@samsung.com>
  6. * Inki Dae <inki.dae@samsung.com>
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a
  9. * copy of this software and associated documentation files (the "Software"),
  10. * to deal in the Software without restriction, including without limitation
  11. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  12. * and/or sell copies of the Software, and to permit persons to whom the
  13. * Software is furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice (including the next
  16. * paragraph) shall be included in all copies or substantial portions of the
  17. * Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  22. * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  23. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  24. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  25. * OTHER DEALINGS IN THE SOFTWARE.
  26. */
  27. #ifndef _EXYNOS_MIXER_H_
  28. #define _EXYNOS_MIXER_H_
  29. #define HDMI_OVERLAY_NUMBER 3
  30. struct hdmi_win_data {
  31. dma_addr_t dma_addr;
  32. void __iomem *vaddr;
  33. dma_addr_t chroma_dma_addr;
  34. void __iomem *chroma_vaddr;
  35. uint32_t pixel_format;
  36. unsigned int bpp;
  37. unsigned int crtc_x;
  38. unsigned int crtc_y;
  39. unsigned int crtc_width;
  40. unsigned int crtc_height;
  41. unsigned int fb_x;
  42. unsigned int fb_y;
  43. unsigned int fb_width;
  44. unsigned int fb_height;
  45. unsigned int mode_width;
  46. unsigned int mode_height;
  47. unsigned int scan_flags;
  48. };
  49. struct mixer_resources {
  50. struct device *dev;
  51. /** interrupt index */
  52. int irq;
  53. /** pointer to Mixer registers */
  54. void __iomem *mixer_regs;
  55. /** pointer to Video Processor registers */
  56. void __iomem *vp_regs;
  57. /** spinlock for protection of registers */
  58. spinlock_t reg_slock;
  59. /** other resources */
  60. struct clk *mixer;
  61. struct clk *vp;
  62. struct clk *sclk_mixer;
  63. struct clk *sclk_hdmi;
  64. struct clk *sclk_dac;
  65. };
  66. struct mixer_context {
  67. unsigned int default_win;
  68. struct fb_videomode *default_timing;
  69. unsigned int default_bpp;
  70. /** mixer interrupt */
  71. unsigned int irq;
  72. /** current crtc pipe for vblank */
  73. int pipe;
  74. /** interlace scan mode */
  75. bool interlace;
  76. /** vp enabled status */
  77. bool vp_enabled;
  78. /** mixer and vp resources */
  79. struct mixer_resources mixer_res;
  80. /** overlay window data */
  81. struct hdmi_win_data win_data[HDMI_OVERLAY_NUMBER];
  82. };
  83. #endif