]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/zte/zx_vou.h
Merge branch 'for-linus-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / drivers / gpu / drm / zte / zx_vou.h
1 /*
2  * Copyright 2016 Linaro Ltd.
3  * Copyright 2016 ZTE Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  */
10
11 #ifndef __ZX_VOU_H__
12 #define __ZX_VOU_H__
13
14 #define VOU_CRTC_MASK           0x3
15
16 /* VOU output interfaces */
17 enum vou_inf_id {
18         VOU_HDMI        = 0,
19         VOU_RGB_LCD     = 1,
20         VOU_TV_ENC      = 2,
21         VOU_MIPI_DSI    = 3,
22         VOU_LVDS        = 4,
23         VOU_VGA         = 5,
24 };
25
26 enum vou_inf_data_sel {
27         VOU_YUV444      = 0,
28         VOU_RGB_101010  = 1,
29         VOU_RGB_888     = 2,
30         VOU_RGB_666     = 3,
31 };
32
33 struct vou_inf {
34         enum vou_inf_id id;
35         enum vou_inf_data_sel data_sel;
36         u32 clocks_en_bits;
37         u32 clocks_sel_bits;
38 };
39
40 void vou_inf_enable(const struct vou_inf *inf, struct drm_crtc *crtc);
41 void vou_inf_disable(const struct vou_inf *inf, struct drm_crtc *crtc);
42
43 int zx_vou_enable_vblank(struct drm_device *drm, unsigned int pipe);
44 void zx_vou_disable_vblank(struct drm_device *drm, unsigned int pipe);
45
46 #endif /* __ZX_VOU_H__ */