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 | * | |
d81aecb5 ID |
6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | |
8 | * Free Software Foundation; either version 2 of the License, or (at your | |
9 | * option) any later version. | |
d8408326 SWK |
10 | */ |
11 | ||
12 | #ifndef _EXYNOS_DRM_HDMI_H_ | |
13 | #define _EXYNOS_DRM_HDMI_H_ | |
14 | ||
cf8fc4f1 JS |
15 | #define MIXER_WIN_NR 3 |
16 | #define MIXER_DEFAULT_WIN 0 | |
17 | ||
d8408326 SWK |
18 | /* |
19 | * exynos hdmi common context structure. | |
20 | * | |
21 | * @drm_dev: pointer to drm_device. | |
080be03d | 22 | * @pipe: pipe for mixer |
d8408326 SWK |
23 | * @ctx: pointer to the context of specific device driver. |
24 | * this context should be hdmi_context or mixer_context. | |
25 | */ | |
26 | struct exynos_drm_hdmi_context { | |
080be03d | 27 | int pipe; |
d8408326 SWK |
28 | void *ctx; |
29 | }; | |
30 | ||
578b6065 JS |
31 | struct exynos_hdmi_ops { |
32 | /* display */ | |
4551789f | 33 | int (*initialize)(void *ctx, struct drm_device *drm_dev); |
d8408326 | 34 | bool (*is_connected)(void *ctx); |
9c08e4ba RS |
35 | struct edid *(*get_edid)(void *ctx, |
36 | struct drm_connector *connector); | |
16844fb1 | 37 | int (*check_mode)(void *ctx, struct drm_display_mode *mode); |
54c40ded | 38 | void (*dpms)(void *ctx, int mode); |
d8408326 | 39 | |
578b6065 | 40 | /* manager */ |
16844fb1 | 41 | void (*mode_set)(void *ctx, struct drm_display_mode *mode); |
1de425b0 ID |
42 | void (*get_max_resol)(void *ctx, unsigned int *width, |
43 | unsigned int *height); | |
d8408326 | 44 | void (*commit)(void *ctx); |
d8408326 SWK |
45 | }; |
46 | ||
578b6065 JS |
47 | struct exynos_mixer_ops { |
48 | /* manager */ | |
4551789f | 49 | int (*initialize)(void *ctx, struct drm_device *drm_dev); |
1055b39f | 50 | int (*iommu_on)(void *ctx, bool enable); |
d8408326 SWK |
51 | int (*enable_vblank)(void *ctx, int pipe); |
52 | void (*disable_vblank)(void *ctx); | |
8137a2e2 | 53 | void (*wait_for_vblank)(void *ctx); |
cf8fc4f1 | 54 | void (*dpms)(void *ctx, int mode); |
578b6065 JS |
55 | |
56 | /* overlay */ | |
d8408326 SWK |
57 | void (*win_mode_set)(void *ctx, struct exynos_drm_overlay *overlay); |
58 | void (*win_commit)(void *ctx, int zpos); | |
59 | void (*win_disable)(void *ctx, int zpos); | |
438c0f85 RS |
60 | |
61 | /* display */ | |
16844fb1 | 62 | int (*check_mode)(void *ctx, struct drm_display_mode *mode); |
d8408326 SWK |
63 | }; |
64 | ||
768c3059 RS |
65 | void exynos_hdmi_drv_attach(struct exynos_drm_hdmi_context *ctx); |
66 | void exynos_mixer_drv_attach(struct exynos_drm_hdmi_context *ctx); | |
578b6065 JS |
67 | void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops); |
68 | void exynos_mixer_ops_register(struct exynos_mixer_ops *ops); | |
d8408326 | 69 | #endif |