blob: 1fbc2f78c95834002970ae2538001cdb25ddef5a [file] [log] [blame]
Veera Sundaram Sankaran1c0afc52015-01-02 14:42:48 -08001/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
Arpita Banerjee841fa062013-05-24 14:59:51 -07002 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in
10 * the documentation and/or other materials provided with the
11 * distribution.
12 * * Neither the name of The Linux Foundation nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
23 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#ifndef _GCDB_DISPLAY_H_
31#define _GCDB_DISPLAY_H_
32
33/*---------------------------------------------------------------------------*/
34/* HEADER files */
35/*---------------------------------------------------------------------------*/
36#include <debug.h>
37#include "include/display_resource.h"
Veera Sundaram Sankaranded347c2014-12-17 17:22:52 -080038#include "panel_display.h"
Arpita Banerjee841fa062013-05-24 14:59:51 -070039
Arpita Banerjee841fa062013-05-24 14:59:51 -070040#define REGULATOR_SIZE 28
41#define PHYSICAL_SIZE 16
42#define STRENGTH_SIZE 8
43#define BIST_SIZE 6
44#define LANE_SIZE 45
45
46/*---------------------------------------------------------------------------*/
47/* API */
48/*---------------------------------------------------------------------------*/
49
Kuogee Hsieh5accef12013-12-18 14:12:09 -080050int target_backlight_ctrl(struct backlight *bl, uint8_t enable);
Arpita Banerjee0906ffd2013-05-24 16:25:38 -070051int target_panel_clock(uint8_t enable, struct msm_panel_info *pinfo);
Dhaval Patel29f24492013-08-08 20:45:42 -070052int target_panel_reset(uint8_t enable, struct panel_reset_sequence *resetseq,
53 struct msm_panel_info *pinfo);
Kuogee Hsieh93bcff62014-08-22 14:02:08 -070054int target_ldo_ctrl(uint8_t enable, struct msm_panel_info *pinfo);
Vineet Bajaja83cf802015-05-07 17:31:33 +053055int target_display_dsi2hdmi_config(struct msm_panel_info *pinfo);
Dhaval Patel7709c412015-05-12 10:09:41 -070056int target_dsi_phy_config(struct mdss_dsi_phy_ctrl *phy_db);
Arpita Banerjee841fa062013-05-24 14:59:51 -070057
Aravind Venkateswarand494f962014-02-25 17:16:49 -080058int gcdb_display_init(const char *panel_name, uint32_t rev, void *base);
Padmanabhan Komandurubccbcdc2015-06-30 16:19:24 +053059int gcdb_display_cmdline_arg(char *pbuf, uint16_t buf_size);
Arpita Banerjee841fa062013-05-24 14:59:51 -070060void gcdb_display_shutdown();
Veera Sundaram Sankaranded347c2014-12-17 17:22:52 -080061int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
62 struct msm_panel_info *pinfo, struct mdss_dsi_phy_ctrl *phy_db);
Padmanabhan Komandurubccbcdc2015-06-30 16:19:24 +053063void set_panel_cmd_string(const char *panel_name);
64struct oem_panel_data mdss_dsi_get_oem_data(void);
65struct panel_struct mdss_dsi_get_panel_data(void);
Arpita Banerjee841fa062013-05-24 14:59:51 -070066
Padmanabhan Komandurubccbcdc2015-06-30 16:19:24 +053067struct oem_panel_data {
68 char panel[MAX_PANEL_ID_LEN];
69 bool cont_splash;
70 bool skip;
71};
Veera Sundaram Sankaran1c0afc52015-01-02 14:42:48 -080072
Arpita Banerjee841fa062013-05-24 14:59:51 -070073#endif /*_GCDB_DISPLAY_H_ */