Commit | Line | Data |
---|---|---|
d8408326 SWK |
1 | /* exynos_drm_hdmi.h |
2 | * | |
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | |
4 | * Authoer: Inki Dae <inki.dae@samsung.com> | |
5 | * | |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | |
7 | * copy of this software and associated documentation files (the "Software"), | |
8 | * to deal in the Software without restriction, including without limitation | |
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
10 | * and/or sell copies of the Software, and to permit persons to whom the | |
11 | * Software is furnished to do so, subject to the following conditions: | |
12 | * | |
13 | * The above copyright notice and this permission notice (including the next | |
14 | * paragraph) shall be included in all copies or substantial portions of the | |
15 | * Software. | |
16 | * | |
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
20 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | |
21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | |
22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
23 | * OTHER DEALINGS IN THE SOFTWARE. | |
24 | */ | |
25 | ||
26 | #ifndef _EXYNOS_DRM_HDMI_H_ | |
27 | #define _EXYNOS_DRM_HDMI_H_ | |
28 | ||
29 | /* | |
30 | * exynos hdmi common context structure. | |
31 | * | |
32 | * @drm_dev: pointer to drm_device. | |
33 | * @ctx: pointer to the context of specific device driver. | |
34 | * this context should be hdmi_context or mixer_context. | |
35 | */ | |
36 | struct exynos_drm_hdmi_context { | |
37 | struct drm_device *drm_dev; | |
38 | void *ctx; | |
39 | }; | |
40 | ||
578b6065 JS |
41 | struct exynos_hdmi_ops { |
42 | /* display */ | |
d8408326 SWK |
43 | bool (*is_connected)(void *ctx); |
44 | int (*get_edid)(void *ctx, struct drm_connector *connector, | |
45 | u8 *edid, int len); | |
46 | int (*check_timing)(void *ctx, void *timing); | |
47 | int (*power_on)(void *ctx, int mode); | |
d8408326 | 48 | |
578b6065 | 49 | /* manager */ |
1de425b0 ID |
50 | void (*mode_fixup)(void *ctx, struct drm_connector *connector, |
51 | struct drm_display_mode *mode, | |
52 | struct drm_display_mode *adjusted_mode); | |
d8408326 | 53 | void (*mode_set)(void *ctx, void *mode); |
1de425b0 ID |
54 | void (*get_max_resol)(void *ctx, unsigned int *width, |
55 | unsigned int *height); | |
d8408326 SWK |
56 | void (*commit)(void *ctx); |
57 | void (*disable)(void *ctx); | |
58 | }; | |
59 | ||
578b6065 JS |
60 | struct exynos_mixer_ops { |
61 | /* manager */ | |
d8408326 SWK |
62 | int (*enable_vblank)(void *ctx, int pipe); |
63 | void (*disable_vblank)(void *ctx); | |
578b6065 JS |
64 | |
65 | /* overlay */ | |
d8408326 SWK |
66 | void (*win_mode_set)(void *ctx, struct exynos_drm_overlay *overlay); |
67 | void (*win_commit)(void *ctx, int zpos); | |
68 | void (*win_disable)(void *ctx, int zpos); | |
69 | }; | |
70 | ||
578b6065 JS |
71 | void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops); |
72 | void exynos_mixer_ops_register(struct exynos_mixer_ops *ops); | |
d8408326 | 73 | #endif |