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