blob: d6aeaf3c6d6cb69ad039ec18bddd559cf32f8d62 [file] [log] [blame]
Inki Dae1c248b72011-10-04 19:19:01 +09001/* exynos_drm.h
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Authors:
5 * Inki Dae <inki.dae@samsung.com>
6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 *
Inki Daed81aecb2012-12-18 02:30:17 +09009 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
Inki Dae1c248b72011-10-04 19:19:01 +090013 */
Inki Dae1c248b72011-10-04 19:19:01 +090014#ifndef _EXYNOS_DRM_H_
15#define _EXYNOS_DRM_H_
16
David Howells718dced2012-10-04 18:21:50 +010017#include <uapi/drm/exynos_drm.h>
Joonyoung Shimd7f16422012-05-17 20:06:32 +090018
Inki Dae1c248b72011-10-04 19:19:01 +090019/**
Eun-Chul Kim607c50d2012-02-14 15:59:46 +090020 * A structure for lcd panel information.
Inki Dae1c248b72011-10-04 19:19:01 +090021 *
22 * @timing: default video mode for initializing
Eun-Chul Kim607c50d2012-02-14 15:59:46 +090023 * @width_mm: physical size of lcd width.
24 * @height_mm: physical size of lcd height.
25 */
26struct exynos_drm_panel_info {
27 struct fb_videomode timing;
28 u32 width_mm;
29 u32 height_mm;
30};
31
32/**
33 * Platform Specific Structure for DRM based FIMD.
34 *
35 * @panel: default panel info for initializing
Inki Dae1c248b72011-10-04 19:19:01 +090036 * @default_win: default window layer number to be used for UI.
37 * @bpp: default bit per pixel.
38 */
39struct exynos_drm_fimd_pdata {
Eun-Chul Kim607c50d2012-02-14 15:59:46 +090040 struct exynos_drm_panel_info panel;
Inki Dae1c248b72011-10-04 19:19:01 +090041 u32 vidcon0;
42 u32 vidcon1;
43 unsigned int default_win;
44 unsigned int bpp;
45};
46
Seung-Woo Kimd8408322011-12-21 17:39:39 +090047/**
48 * Platform Specific Structure for DRM based HDMI.
49 *
50 * @hdmi_dev: device point to specific hdmi driver.
51 * @mixer_dev: device point to specific mixer driver.
52 *
53 * this structure is used for common hdmi driver and each device object
54 * would be used to access specific device driver(hdmi or mixer driver)
55 */
56struct exynos_drm_common_hdmi_pd {
57 struct device *hdmi_dev;
58 struct device *mixer_dev;
59};
60
61/**
62 * Platform Specific Structure for DRM based HDMI core.
63 *
Joonyoung Shim3ecd70b2012-03-16 18:47:03 +090064 * @is_v13: set if hdmi version 13 is.
Joonyoung Shim7ecd34e2012-04-23 19:35:47 +090065 * @cfg_hpd: function pointer to configure hdmi hotplug detection pin
66 * @get_hpd: function pointer to get value of hdmi hotplug detection pin
Seung-Woo Kimd8408322011-12-21 17:39:39 +090067 */
68struct exynos_drm_hdmi_pdata {
Joonyoung Shim7ecd34e2012-04-23 19:35:47 +090069 bool is_v13;
70 void (*cfg_hpd)(bool external);
71 int (*get_hpd)(void);
Seung-Woo Kimd8408322011-12-21 17:39:39 +090072};
73
Eunchul Kim16102ed2012-12-14 17:58:55 +090074/**
75 * Platform Specific Structure for DRM based IPP.
76 *
77 * @inv_pclk: if set 1. invert pixel clock
78 * @inv_vsync: if set 1. invert vsync signal for wb
79 * @inv_href: if set 1. invert href signal
80 * @inv_hsync: if set 1. invert hsync signal for wb
81 */
82struct exynos_drm_ipp_pol {
83 unsigned int inv_pclk;
84 unsigned int inv_vsync;
85 unsigned int inv_href;
86 unsigned int inv_hsync;
87};
88
89/**
90 * Platform Specific Structure for DRM based FIMC.
91 *
92 * @pol: current hardware block polarity settings.
93 * @clk_rate: current hardware clock rate.
94 */
95struct exynos_drm_fimc_pdata {
96 struct exynos_drm_ipp_pol pol;
97 int clk_rate;
98};
99
Kamil Debski265da782012-02-15 10:23:33 +0900100#endif /* _EXYNOS_DRM_H_ */