Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / gma500 / mdfld_output.h
blob37a516cc56beac1aaaf9b9b0ce4e05018663c0c9
1 /*
2 * Copyright (c) 2010 Intel Corporation
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:
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.
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.
23 * Authors:
24 * Thomas Eaton <thomas.g.eaton@intel.com>
25 * Scott Rowe <scott.m.rowe@intel.com>
28 #ifndef MDFLD_OUTPUT_H
29 #define MDFLD_OUTPUT_H
31 #include "psb_drv.h"
33 #define TPO_PANEL_WIDTH 84
34 #define TPO_PANEL_HEIGHT 46
35 #define TMD_PANEL_WIDTH 39
36 #define TMD_PANEL_HEIGHT 71
38 struct mdfld_dsi_config;
40 enum panel_type {
41 TPO_VID,
42 TMD_VID,
43 HDMI,
44 TC35876X,
47 struct panel_info {
48 u32 width_mm;
49 u32 height_mm;
50 /* Other info */
53 struct 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)(struct drm_device *, int);
58 void (*drv_ic_init)(struct mdfld_dsi_config *dsi_config, int pipe);
61 int mdfld_output_init(struct drm_device *dev);
63 struct backlight_device *mdfld_get_backlight_device(void);
64 int mdfld_set_brightness(struct backlight_device *bd);
66 int mdfld_get_panel_type(struct drm_device *dev, int pipe);
68 extern const struct drm_crtc_helper_funcs mdfld_helper_funcs;
70 extern const struct panel_funcs mdfld_tmd_vid_funcs;
71 extern const struct panel_funcs mdfld_tpo_vid_funcs;
73 extern void mdfld_disable_crtc(struct drm_device *dev, int pipe);
74 extern void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe);
75 extern void mdfldWaitForPipeDisable(struct drm_device *dev, int pipe);
76 #endif