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  #include <linux/wait.h>
18  
19  #include <video/videomode.h>
20  
21  struct drm_pending_vblank_event;
22  struct shmob_drm_device;
23  struct shmob_drm_format_info;
24  
25  struct shmob_drm_crtc {
26  	struct drm_crtc base;
27  
28  	struct drm_pending_vblank_event *event;
29  	wait_queue_head_t flip_wait;
30  };
31  
32  /* Legacy connector */
33  struct shmob_drm_connector {
34  	struct drm_connector base;
35  	struct drm_encoder *encoder;
36  	const struct videomode *mode;
37  };
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  
42  int shmob_drm_encoder_create(struct shmob_drm_device *sdev);
43  int shmob_drm_connector_create(struct shmob_drm_device *sdev,
44  			       struct drm_encoder *encoder);
45  
46  #endif /* __SHMOB_DRM_CRTC_H__ */
47