PageRenderTime 21ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/drivers/staging/gma500/mdfld_dsi_dpi.h

https://bitbucket.org/cyanogenmod/android_kernel_asus_tf300t
C Header | 78 lines | 42 code | 9 blank | 27 comment | 0 complexity | 4725bb3c95bdcfa39827cd5c7f1ad1f3 MD5 | raw file
Possible License(s): LGPL-2.0, AGPL-1.0, GPL-2.0
 1/*
 2 * Copyright © 2010 Intel Corporation
 3 *
 4 * Permission is hereby granted, free of charge, to any person obtaining a
 5 * copy of this software and associated documentation files (the "Software"),
 6 * to deal in the Software without restriction, including without limitation
 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 8 * and/or sell copies of the Software, and to permit persons to whom the
 9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 *
23 * Authors:
24 * jim liu <jim.liu@intel.com>
25 * Jackie Li<yaodong.li@intel.com>
26 */
27
28#ifndef __MDFLD_DSI_DPI_H__
29#define __MDFLD_DSI_DPI_H__
30
31#include "mdfld_dsi_output.h"
32#include "mdfld_output.h"
33
34struct mdfld_dsi_dpi_timing {
35	u16 hsync_count;
36	u16 hbp_count;
37	u16 hfp_count;
38	u16 hactive_count;
39	u16 vsync_count;
40	u16 vbp_count;
41	u16 vfp_count;
42};
43
44struct mdfld_dsi_dpi_output {
45	struct mdfld_dsi_encoder base;
46	struct drm_device *dev;
47
48	int panel_on;
49	int first_boot;
50
51	struct panel_funcs *p_funcs;
52};
53
54#define MDFLD_DSI_DPI_OUTPUT(dsi_encoder) \
55	container_of(dsi_encoder, struct mdfld_dsi_dpi_output, base)
56
57extern int mdfld_dsi_dpi_timing_calculation(struct drm_display_mode *mode,
58			struct mdfld_dsi_dpi_timing *dpi_timing,
59			int num_lane, int bpp);
60extern struct mdfld_dsi_encoder *mdfld_dsi_dpi_init(struct drm_device *dev,
61			struct mdfld_dsi_connector *dsi_connector,
62			struct panel_funcs *p_funcs);
63
64/* Medfield DPI helper functions */
65extern void mdfld_dsi_dpi_dpms(struct drm_encoder *encoder, int mode);
66extern bool mdfld_dsi_dpi_mode_fixup(struct drm_encoder *encoder,
67			struct drm_display_mode *mode,
68			struct drm_display_mode *adjusted_mode);
69extern void mdfld_dsi_dpi_prepare(struct drm_encoder *encoder);
70extern void mdfld_dsi_dpi_commit(struct drm_encoder *encoder);
71extern void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,
72			struct drm_display_mode *mode,
73			struct drm_display_mode *adjusted_mode);
74extern void mdfld_dsi_dpi_turn_on(struct mdfld_dsi_dpi_output *output,
75			int pipe);
76extern void mdfld_dsi_dpi_controller_init(struct mdfld_dsi_config *si_config,
77			int pipe);
78#endif /*__MDFLD_DSI_DPI_H__*/