shmob_drm_crtc.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * shmob_drm_crtc.h -- SH Mobile DRM CRTCs
  3. *
  4. * Copyright (C) 2012 Renesas Electronics Corporation
  5. *
  6. * Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #ifndef __SHMOB_DRM_CRTC_H__
  14. #define __SHMOB_DRM_CRTC_H__
  15. #include <drm/drmP.h>
  16. #include <drm/drm_crtc.h>
  17. struct backlight_device;
  18. struct shmob_drm_device;
  19. struct shmob_drm_crtc {
  20. struct drm_crtc crtc;
  21. struct drm_pending_vblank_event *event;
  22. int dpms;
  23. const struct shmob_drm_format_info *format;
  24. void *cache;
  25. unsigned long dma[2];
  26. unsigned int line_size;
  27. bool started;
  28. };
  29. struct shmob_drm_encoder {
  30. struct drm_encoder encoder;
  31. int dpms;
  32. };
  33. struct shmob_drm_connector {
  34. struct drm_connector connector;
  35. struct drm_encoder *encoder;
  36. struct backlight_device *backlight;
  37. };
  38. int shmob_drm_crtc_create(struct shmob_drm_device *sdev);
  39. void shmob_drm_crtc_enable_vblank(struct shmob_drm_device *sdev, bool enable);
  40. void shmob_drm_crtc_cancel_page_flip(struct shmob_drm_crtc *scrtc,
  41. struct drm_file *file);
  42. void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc);
  43. void shmob_drm_crtc_suspend(struct shmob_drm_crtc *scrtc);
  44. void shmob_drm_crtc_resume(struct shmob_drm_crtc *scrtc);
  45. int shmob_drm_encoder_create(struct shmob_drm_device *sdev);
  46. int shmob_drm_connector_create(struct shmob_drm_device *sdev,
  47. struct drm_encoder *encoder);
  48. #endif /* __SHMOB_DRM_CRTC_H__ */