784a7e9a766c4a178e2f73e628e63adce5f6c364
[deliverable/linux.git] / drivers / gpu / drm / exynos / exynos_drm_hdmi.h
1 /* exynos_drm_hdmi.h
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Authoer: Inki Dae <inki.dae@samsung.com>
5 *
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.
10 */
11
12 #ifndef _EXYNOS_DRM_HDMI_H_
13 #define _EXYNOS_DRM_HDMI_H_
14
15 #define MIXER_WIN_NR 3
16 #define MIXER_DEFAULT_WIN 0
17
18 /*
19 * exynos hdmi common context structure.
20 *
21 * @drm_dev: pointer to drm_device.
22 * @ctx: pointer to the context of specific device driver.
23 * this context should be hdmi_context or mixer_context.
24 */
25 struct exynos_drm_hdmi_context {
26 struct drm_device *drm_dev;
27 void *ctx;
28 };
29
30 struct exynos_hdmi_ops {
31 /* display */
32 bool (*is_connected)(void *ctx);
33 int (*get_edid)(void *ctx, struct drm_connector *connector,
34 u8 *edid, int len);
35 int (*check_timing)(void *ctx, void *timing);
36 int (*power_on)(void *ctx, int mode);
37
38 /* manager */
39 void (*mode_fixup)(void *ctx, struct drm_connector *connector,
40 const struct drm_display_mode *mode,
41 struct drm_display_mode *adjusted_mode);
42 void (*mode_set)(void *ctx, void *mode);
43 void (*get_max_resol)(void *ctx, unsigned int *width,
44 unsigned int *height);
45 void (*commit)(void *ctx);
46 void (*dpms)(void *ctx, int mode);
47 };
48
49 struct exynos_mixer_ops {
50 /* manager */
51 int (*iommu_on)(void *ctx, bool enable);
52 int (*enable_vblank)(void *ctx, int pipe);
53 void (*disable_vblank)(void *ctx);
54 void (*wait_for_vblank)(void *ctx);
55 void (*dpms)(void *ctx, int mode);
56
57 /* overlay */
58 void (*win_mode_set)(void *ctx, struct exynos_drm_overlay *overlay);
59 void (*win_commit)(void *ctx, int zpos);
60 void (*win_disable)(void *ctx, int zpos);
61 };
62
63 void exynos_hdmi_drv_attach(struct exynos_drm_hdmi_context *ctx);
64 void exynos_mixer_drv_attach(struct exynos_drm_hdmi_context *ctx);
65 void exynos_hdmi_ops_register(struct exynos_hdmi_ops *ops);
66 void exynos_mixer_ops_register(struct exynos_mixer_ops *ops);
67 #endif
This page took 0.033617 seconds and 4 git commands to generate.