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