Linux Audio

Check our new training course

Loading...
Note: File does not exist in v6.13.7.
 1/*
 2 * Copyright (c)  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, sublicensen
 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 * Thomas Eaton <thomas.g.eaton@intel.com>
25 * Scott Rowe <scott.m.rowe@intel.com>
26*/
27
28#ifndef MDFLD_OUTPUT_H
29#define MDFLD_OUTPUT_H
30
31#include "psb_drv.h"
32
33#define TPO_PANEL_WIDTH		84
34#define TPO_PANEL_HEIGHT	46
35#define TMD_PANEL_WIDTH		39
36#define TMD_PANEL_HEIGHT	71
37
38struct mdfld_dsi_config;
39
40enum panel_type {
41	TPO_VID,
42	TMD_VID,
43	HDMI,
44	TC35876X,
45};
46
47struct panel_info {
48	u32 width_mm;
49	u32 height_mm;
50	/* Other info */
51};
52
53struct panel_funcs {
54	const struct drm_encoder_helper_funcs *encoder_helper_funcs;
55	struct drm_display_mode * (*get_config_mode)(struct drm_device *);
56	int (*get_panel_info)(struct drm_device *, int, struct panel_info *);
57	int (*reset)(int pipe);
58	void (*drv_ic_init)(struct mdfld_dsi_config *dsi_config, int pipe);
59};
60
61int mdfld_output_init(struct drm_device *dev);
62
63struct backlight_device *mdfld_get_backlight_device(void);
64int mdfld_set_brightness(struct backlight_device *bd);
65
66int mdfld_get_panel_type(struct drm_device *dev, int pipe);
67
68extern const struct drm_crtc_helper_funcs mdfld_helper_funcs;
69
70extern const struct panel_funcs mdfld_tmd_vid_funcs;
71extern const struct panel_funcs mdfld_tpo_vid_funcs;
72
73extern void mdfld_disable_crtc(struct drm_device *dev, int pipe);
74extern void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe);
75extern void mdfldWaitForPipeDisable(struct drm_device *dev, int pipe);
76#endif