shmob_drm_crtc.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #include <drm/drm_encoder.h>
  18. struct backlight_device;
  19. struct shmob_drm_device;
  20. struct shmob_drm_crtc {
  21. struct drm_crtc crtc;
  22. struct drm_pending_vblank_event *event;
  23. int dpms;
  24. const struct shmob_drm_format_info *format;
  25. void *cache;
  26. unsigned long dma[2];
  27. unsigned int line_size;
  28. bool started;
  29. };
  30. struct shmob_drm_encoder {
  31. struct drm_encoder encoder;
  32. int dpms;
  33. };
  34. struct shmob_drm_connector {
  35. struct drm_connector connector;
  36. struct drm_encoder *encoder;
  37. struct backlight_device *backlight;
  38. };
  39. int shmob_drm_crtc_create(struct shmob_drm_device *sdev);
  40. void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc);
  41. void shmob_drm_crtc_suspend(struct shmob_drm_crtc *scrtc);
  42. void shmob_drm_crtc_resume(struct shmob_drm_crtc *scrtc);
  43. int shmob_drm_encoder_create(struct shmob_drm_device *sdev);
  44. int shmob_drm_connector_create(struct shmob_drm_device *sdev,
  45. struct drm_encoder *encoder);
  46. #endif /* __SHMOB_DRM_CRTC_H__ */