exynos_drm_crtc.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* exynos_drm_crtc.h
  2. *
  3. * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  4. * Authors:
  5. * Inki Dae <inki.dae@samsung.com>
  6. * Joonyoung Shim <jy0922.shim@samsung.com>
  7. * Seung-Woo Kim <sw0312.kim@samsung.com>
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a
  10. * copy of this software and associated documentation files (the "Software"),
  11. * to deal in the Software without restriction, including without limitation
  12. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  13. * and/or sell copies of the Software, and to permit persons to whom the
  14. * Software is furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice (including the next
  17. * paragraph) shall be included in all copies or substantial portions of the
  18. * Software.
  19. *
  20. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  21. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  22. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  23. * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  24. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  25. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  26. * OTHER DEALINGS IN THE SOFTWARE.
  27. */
  28. #ifndef _EXYNOS_DRM_CRTC_H_
  29. #define _EXYNOS_DRM_CRTC_H_
  30. struct exynos_drm_overlay *get_exynos_drm_overlay(struct drm_device *dev,
  31. struct drm_crtc *crtc);
  32. int exynos_drm_crtc_create(struct drm_device *dev, unsigned int nr);
  33. int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int crtc);
  34. void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int crtc);
  35. /*
  36. * Exynos specific crtc postion structure.
  37. *
  38. * @fb_x: offset x on a framebuffer to be displyed
  39. * - the unit is screen coordinates.
  40. * @fb_y: offset y on a framebuffer to be displayed
  41. * - the unit is screen coordinates.
  42. * @crtc_x: offset x on hardware screen.
  43. * @crtc_y: offset y on hardware screen.
  44. * @crtc_w: width of hardware screen.
  45. * @crtc_h: height of hardware screen.
  46. */
  47. struct exynos_drm_crtc_pos {
  48. unsigned int fb_x;
  49. unsigned int fb_y;
  50. unsigned int crtc_x;
  51. unsigned int crtc_y;
  52. unsigned int crtc_w;
  53. unsigned int crtc_h;
  54. };
  55. int exynos_drm_overlay_update(struct exynos_drm_overlay *overlay,
  56. struct drm_framebuffer *fb,
  57. struct drm_display_mode *mode,
  58. struct exynos_drm_crtc_pos *pos);
  59. #endif