1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * shmob_drm_crtc.h -- SH Mobile DRM CRTCs 4 * 5 * Copyright (C) 2012 Renesas Electronics Corporation 6 * 7 * Laurent Pinchart (laurent.pinchart@ideasonboard.com) 8 */ 9 10 #ifndef __SHMOB_DRM_CRTC_H__ 11 #define __SHMOB_DRM_CRTC_H__ 12 13 #include <drm/drm_crtc.h> 14 #include <drm/drm_connector.h> 15 #include <drm/drm_encoder.h> 16 17 struct drm_pending_vblank_event; 18 struct shmob_drm_device; 19 struct shmob_drm_format_info; 20 21 struct shmob_drm_crtc { 22 struct drm_crtc crtc; 23 24 struct drm_pending_vblank_event *event; 25 int dpms; 26 27 const struct shmob_drm_format_info *format; 28 unsigned long dma[2]; 29 unsigned int line_size; 30 bool started; 31 }; 32 33 struct shmob_drm_connector { 34 struct drm_connector connector; 35 struct drm_encoder *encoder; 36 }; 37 38 int shmob_drm_crtc_create(struct shmob_drm_device *sdev); 39 void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc); 40 void shmob_drm_crtc_suspend(struct shmob_drm_crtc *scrtc); 41 void shmob_drm_crtc_resume(struct shmob_drm_crtc *scrtc); 42 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 47 #endif /* __SHMOB_DRM_CRTC_H__ */ 48