dsi.h (34d9545b9f769c6553e31a6820c9cb51f5e93099) dsi.h (b62aa70a98c5401ada63657eee7c88da70bdbb27)
1/*
2 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 14 unchanged lines hidden (view full) ---

23
24#include "msm_drv.h"
25
26#define DSI_0 0
27#define DSI_1 1
28#define DSI_MAX 2
29
30struct msm_dsi_phy_shared_timings;
1/*
2 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 14 unchanged lines hidden (view full) ---

23
24#include "msm_drv.h"
25
26#define DSI_0 0
27#define DSI_1 1
28#define DSI_MAX 2
29
30struct msm_dsi_phy_shared_timings;
31struct msm_dsi_phy_clk_request;
31
32enum msm_dsi_phy_type {
33 MSM_DSI_PHY_28NM_HPM,
34 MSM_DSI_PHY_28NM_LP,
35 MSM_DSI_PHY_20NM,
36 MSM_DSI_PHY_28NM_8960,
37 MSM_DSI_PHY_MAX
38};

--- 48 unchanged lines hidden (view full) ---

87 int id;
88};
89
90/* dsi manager */
91struct drm_bridge *msm_dsi_manager_bridge_init(u8 id);
92void msm_dsi_manager_bridge_destroy(struct drm_bridge *bridge);
93struct drm_connector *msm_dsi_manager_connector_init(u8 id);
94struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id);
32
33enum msm_dsi_phy_type {
34 MSM_DSI_PHY_28NM_HPM,
35 MSM_DSI_PHY_28NM_LP,
36 MSM_DSI_PHY_20NM,
37 MSM_DSI_PHY_28NM_8960,
38 MSM_DSI_PHY_MAX
39};

--- 48 unchanged lines hidden (view full) ---

88 int id;
89};
90
91/* dsi manager */
92struct drm_bridge *msm_dsi_manager_bridge_init(u8 id);
93void msm_dsi_manager_bridge_destroy(struct drm_bridge *bridge);
94struct drm_connector *msm_dsi_manager_connector_init(u8 id);
95struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id);
95int msm_dsi_manager_phy_enable(int id,
96 const unsigned long bit_rate, const unsigned long esc_rate,
97 struct msm_dsi_phy_shared_timings *shared_timing);
98void msm_dsi_manager_phy_disable(int id);
99int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);
100bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len);
101void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags);
102int msm_dsi_manager_register(struct msm_dsi *msm_dsi);
103void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi);
104
105/* msm dsi */
106static inline bool msm_dsi_device_connected(struct msm_dsi *msm_dsi)

--- 43 unchanged lines hidden (view full) ---

150int msm_dsi_host_cmd_tx(struct mipi_dsi_host *host,
151 const struct mipi_dsi_msg *msg);
152int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host,
153 const struct mipi_dsi_msg *msg);
154void msm_dsi_host_cmd_xfer_commit(struct mipi_dsi_host *host,
155 u32 dma_base, u32 len);
156int msm_dsi_host_enable(struct mipi_dsi_host *host);
157int msm_dsi_host_disable(struct mipi_dsi_host *host);
96int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg);
97bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len);
98void msm_dsi_manager_attach_dsi_device(int id, u32 device_flags);
99int msm_dsi_manager_register(struct msm_dsi *msm_dsi);
100void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi);
101
102/* msm dsi */
103static inline bool msm_dsi_device_connected(struct msm_dsi *msm_dsi)

--- 43 unchanged lines hidden (view full) ---

147int msm_dsi_host_cmd_tx(struct mipi_dsi_host *host,
148 const struct mipi_dsi_msg *msg);
149int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host,
150 const struct mipi_dsi_msg *msg);
151void msm_dsi_host_cmd_xfer_commit(struct mipi_dsi_host *host,
152 u32 dma_base, u32 len);
153int msm_dsi_host_enable(struct mipi_dsi_host *host);
154int msm_dsi_host_disable(struct mipi_dsi_host *host);
158int msm_dsi_host_power_on(struct mipi_dsi_host *host);
155int msm_dsi_host_power_on(struct mipi_dsi_host *host,
156 struct msm_dsi_phy_shared_timings *phy_shared_timings);
159int msm_dsi_host_power_off(struct mipi_dsi_host *host);
160int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,
161 struct drm_display_mode *mode);
162struct drm_panel *msm_dsi_host_get_panel(struct mipi_dsi_host *host,
163 unsigned long *panel_flags);
164struct drm_bridge *msm_dsi_host_get_bridge(struct mipi_dsi_host *host);
165int msm_dsi_host_register(struct mipi_dsi_host *host, bool check_defer);
166void msm_dsi_host_unregister(struct mipi_dsi_host *host);
167int msm_dsi_host_set_src_pll(struct mipi_dsi_host *host,
168 struct msm_dsi_pll *src_pll);
169void msm_dsi_host_reset_phy(struct mipi_dsi_host *host);
157int msm_dsi_host_power_off(struct mipi_dsi_host *host);
158int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,
159 struct drm_display_mode *mode);
160struct drm_panel *msm_dsi_host_get_panel(struct mipi_dsi_host *host,
161 unsigned long *panel_flags);
162struct drm_bridge *msm_dsi_host_get_bridge(struct mipi_dsi_host *host);
163int msm_dsi_host_register(struct mipi_dsi_host *host, bool check_defer);
164void msm_dsi_host_unregister(struct mipi_dsi_host *host);
165int msm_dsi_host_set_src_pll(struct mipi_dsi_host *host,
166 struct msm_dsi_pll *src_pll);
167void msm_dsi_host_reset_phy(struct mipi_dsi_host *host);
168void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host,
169 struct msm_dsi_phy_clk_request *clk_req);
170void msm_dsi_host_destroy(struct mipi_dsi_host *host);
171int msm_dsi_host_modeset_init(struct mipi_dsi_host *host,
172 struct drm_device *dev);
173int msm_dsi_host_init(struct msm_dsi *msm_dsi);
174
175/* dsi phy */
176struct msm_dsi_phy;
177struct msm_dsi_phy_shared_timings {
178 u32 clk_post;
179 u32 clk_pre;
180 bool clk_pre_inc_by_2;
181};
170void msm_dsi_host_destroy(struct mipi_dsi_host *host);
171int msm_dsi_host_modeset_init(struct mipi_dsi_host *host,
172 struct drm_device *dev);
173int msm_dsi_host_init(struct msm_dsi *msm_dsi);
174
175/* dsi phy */
176struct msm_dsi_phy;
177struct msm_dsi_phy_shared_timings {
178 u32 clk_post;
179 u32 clk_pre;
180 bool clk_pre_inc_by_2;
181};
182
183struct msm_dsi_phy_clk_request {
184 unsigned long bitclk_rate;
185 unsigned long escclk_rate;
186};
187
182void msm_dsi_phy_driver_register(void);
183void msm_dsi_phy_driver_unregister(void);
184int msm_dsi_phy_enable(struct msm_dsi_phy *phy, int src_pll_id,
188void msm_dsi_phy_driver_register(void);
189void msm_dsi_phy_driver_unregister(void);
190int msm_dsi_phy_enable(struct msm_dsi_phy *phy, int src_pll_id,
185 const unsigned long bit_rate, const unsigned long esc_rate);
191 struct msm_dsi_phy_clk_request *clk_req);
186void msm_dsi_phy_disable(struct msm_dsi_phy *phy);
187void msm_dsi_phy_get_shared_timings(struct msm_dsi_phy *phy,
188 struct msm_dsi_phy_shared_timings *shared_timing);
189struct msm_dsi_pll *msm_dsi_phy_get_pll(struct msm_dsi_phy *phy);
190void msm_dsi_phy_set_usecase(struct msm_dsi_phy *phy,
191 enum msm_dsi_phy_usecase uc);
192
193#endif /* __DSI_CONNECTOR_H__ */
194
192void msm_dsi_phy_disable(struct msm_dsi_phy *phy);
193void msm_dsi_phy_get_shared_timings(struct msm_dsi_phy *phy,
194 struct msm_dsi_phy_shared_timings *shared_timing);
195struct msm_dsi_pll *msm_dsi_phy_get_pll(struct msm_dsi_phy *phy);
196void msm_dsi_phy_set_usecase(struct msm_dsi_phy *phy,
197 enum msm_dsi_phy_usecase uc);
198
199#endif /* __DSI_CONNECTOR_H__ */
200