Lines Matching refs:msm_dsi
24 struct msm_dsi *dsi[DSI_MAX];
37 static inline struct msm_dsi *dsi_mgr_get_dsi(int id) in dsi_mgr_get_dsi()
42 static inline struct msm_dsi *dsi_mgr_get_other_dsi(int id) in dsi_mgr_get_other_dsi()
70 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_setup_components() local
71 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in dsi_mgr_setup_components()
72 struct msm_dsi *clk_master_dsi = dsi_mgr_get_dsi(DSI_CLOCK_MASTER); in dsi_mgr_setup_components()
73 struct msm_dsi *clk_slave_dsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); in dsi_mgr_setup_components()
77 ret = msm_dsi_host_register(msm_dsi->host); in dsi_mgr_setup_components()
81 msm_dsi_phy_set_usecase(msm_dsi->phy, MSM_DSI_PHY_STANDALONE); in dsi_mgr_setup_components()
82 msm_dsi_host_set_phy_mode(msm_dsi->host, msm_dsi->phy); in dsi_mgr_setup_components()
84 struct msm_dsi *master_link_dsi = IS_MASTER_DSI_LINK(id) ? in dsi_mgr_setup_components()
85 msm_dsi : other_dsi; in dsi_mgr_setup_components()
86 struct msm_dsi *slave_link_dsi = IS_MASTER_DSI_LINK(id) ? in dsi_mgr_setup_components()
87 other_dsi : msm_dsi; in dsi_mgr_setup_components()
107 msm_dsi_host_set_phy_mode(msm_dsi->host, msm_dsi->phy); in dsi_mgr_setup_components()
114 static int enable_phy(struct msm_dsi *msm_dsi, in enable_phy() argument
120 msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_bonded_dsi); in enable_phy()
122 return msm_dsi_phy_enable(msm_dsi->phy, &clk_req, shared_timings); in enable_phy()
129 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_phy_enable() local
130 struct msm_dsi *mdsi = dsi_mgr_get_dsi(DSI_CLOCK_MASTER); in dsi_mgr_phy_enable()
131 struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); in dsi_mgr_phy_enable()
156 msm_dsi_host_reset_phy(msm_dsi->host); in dsi_mgr_phy_enable()
157 ret = enable_phy(msm_dsi, &shared_timings[id]); in dsi_mgr_phy_enable()
162 msm_dsi->phy_enabled = true; in dsi_mgr_phy_enable()
169 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_phy_disable() local
170 struct msm_dsi *mdsi = dsi_mgr_get_dsi(DSI_CLOCK_MASTER); in dsi_mgr_phy_disable()
171 struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); in dsi_mgr_phy_disable()
177 msm_dsi->phy_enabled = false; in dsi_mgr_phy_disable()
184 msm_dsi_phy_disable(msm_dsi->phy); in dsi_mgr_phy_disable()
204 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_power_on() local
205 struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); in dsi_mgr_bridge_power_on()
206 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_power_on()
217 ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_bonded_dsi, msm_dsi->phy); in dsi_mgr_bridge_power_on()
254 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_power_off() local
255 struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); in dsi_mgr_bridge_power_off()
256 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_power_off()
271 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_pre_enable() local
272 struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); in dsi_mgr_bridge_pre_enable()
273 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_pre_enable()
285 dev_err(&msm_dsi->pdev->dev, "Power on failed: %d\n", ret); in dsi_mgr_bridge_pre_enable()
313 struct msm_dsi *m_dsi = dsi_mgr_get_dsi(DSI_0); in msm_dsi_manager_tpg_enable()
314 struct msm_dsi *s_dsi = dsi_mgr_get_dsi(DSI_1); in msm_dsi_manager_tpg_enable()
327 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_post_disable() local
328 struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); in dsi_mgr_bridge_post_disable()
329 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_post_disable()
358 msm_dsi_phy_pll_save_state(msm_dsi->phy); in dsi_mgr_bridge_post_disable()
380 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_mode_set() local
381 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in dsi_mgr_bridge_mode_set()
382 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_mode_set()
400 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_mode_valid() local
401 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_mode_valid()
402 struct platform_device *pdev = msm_dsi->pdev; in dsi_mgr_bridge_mode_valid()
430 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_attach() local
432 return drm_bridge_attach(bridge->encoder, msm_dsi->next_bridge, in dsi_mgr_bridge_attach()
445 int msm_dsi_manager_connector_init(struct msm_dsi *msm_dsi, in msm_dsi_manager_connector_init() argument
448 struct drm_device *dev = msm_dsi->dev; in msm_dsi_manager_connector_init()
454 dsi_bridge = devm_kzalloc(msm_dsi->dev->dev, in msm_dsi_manager_connector_init()
459 dsi_bridge->id = msm_dsi->id; in msm_dsi_manager_connector_init()
464 ret = devm_drm_bridge_add(msm_dsi->dev->dev, bridge); in msm_dsi_manager_connector_init()
487 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_cmd_xfer() local
488 struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0); in msm_dsi_manager_cmd_xfer()
489 struct mipi_dsi_host *host = msm_dsi->host; in msm_dsi_manager_cmd_xfer()
533 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_cmd_xfer_trigger() local
534 struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0); in msm_dsi_manager_cmd_xfer_trigger()
535 struct mipi_dsi_host *host = msm_dsi->host; in msm_dsi_manager_cmd_xfer_trigger()
548 int msm_dsi_manager_register(struct msm_dsi *msm_dsi) in msm_dsi_manager_register() argument
551 int id = msm_dsi->id; in msm_dsi_manager_register()
564 msm_dsim->dsi[id] = msm_dsi; in msm_dsi_manager_register()
566 ret = dsi_mgr_parse_of(msm_dsi->pdev->dev.of_node, id); in msm_dsi_manager_register()
586 void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi) in msm_dsi_manager_unregister() argument
590 if (msm_dsi->host) in msm_dsi_manager_unregister()
591 msm_dsi_host_unregister(msm_dsi->host); in msm_dsi_manager_unregister()
593 if (msm_dsi->id >= 0) in msm_dsi_manager_unregister()
594 msm_dsim->dsi[msm_dsi->id] = NULL; in msm_dsi_manager_unregister()
597 bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi) in msm_dsi_is_bonded_dsi() argument
602 bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi) in msm_dsi_is_master_dsi() argument
604 return IS_MASTER_DSI_LINK(msm_dsi->id); in msm_dsi_is_master_dsi()
607 const char *msm_dsi_get_te_source(struct msm_dsi *msm_dsi) in msm_dsi_get_te_source() argument
609 return msm_dsi->te_source; in msm_dsi_get_te_source()