Lines Matching refs:msm_dsi
22 struct msm_dsi *dsi[DSI_MAX];
35 static inline struct msm_dsi *dsi_mgr_get_dsi(int id) in dsi_mgr_get_dsi()
40 static inline struct msm_dsi *dsi_mgr_get_other_dsi(int id) in dsi_mgr_get_other_dsi()
69 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_setup_components() local
70 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in dsi_mgr_setup_components()
71 struct msm_dsi *clk_master_dsi = dsi_mgr_get_dsi(DSI_CLOCK_MASTER); in dsi_mgr_setup_components()
72 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, true); in dsi_mgr_setup_components()
81 msm_dsi_phy_set_usecase(msm_dsi->phy, MSM_DSI_PHY_STANDALONE); in dsi_mgr_setup_components()
82 src_pll = msm_dsi_phy_get_pll(msm_dsi->phy); in dsi_mgr_setup_components()
85 ret = msm_dsi_host_set_src_pll(msm_dsi->host, src_pll); in dsi_mgr_setup_components()
89 struct msm_dsi *master_link_dsi = IS_MASTER_DSI_LINK(id) ? in dsi_mgr_setup_components()
90 msm_dsi : other_dsi; in dsi_mgr_setup_components()
91 struct msm_dsi *slave_link_dsi = IS_MASTER_DSI_LINK(id) ? in dsi_mgr_setup_components()
92 other_dsi : msm_dsi; in dsi_mgr_setup_components()
115 ret = msm_dsi_host_set_src_pll(msm_dsi->host, src_pll); in dsi_mgr_setup_components()
124 static int enable_phy(struct msm_dsi *msm_dsi, int src_pll_id, in enable_phy() argument
131 msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_dual_dsi); in enable_phy()
133 ret = msm_dsi_phy_enable(msm_dsi->phy, src_pll_id, &clk_req); in enable_phy()
134 msm_dsi_phy_get_shared_timings(msm_dsi->phy, shared_timings); in enable_phy()
143 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_phy_enable() local
144 struct msm_dsi *mdsi = dsi_mgr_get_dsi(DSI_CLOCK_MASTER); in dsi_mgr_phy_enable()
145 struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); in dsi_mgr_phy_enable()
171 msm_dsi_host_reset_phy(msm_dsi->host); in dsi_mgr_phy_enable()
172 ret = enable_phy(msm_dsi, src_pll_id, &shared_timings[id]); in dsi_mgr_phy_enable()
177 msm_dsi->phy_enabled = true; in dsi_mgr_phy_enable()
184 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_phy_disable() local
185 struct msm_dsi *mdsi = dsi_mgr_get_dsi(DSI_CLOCK_MASTER); in dsi_mgr_phy_disable()
186 struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); in dsi_mgr_phy_disable()
192 msm_dsi->phy_enabled = false; in dsi_mgr_phy_disable()
199 msm_dsi_phy_disable(msm_dsi->phy); in dsi_mgr_phy_disable()
228 static bool dsi_mgr_is_cmd_mode(struct msm_dsi *msm_dsi) in dsi_mgr_is_cmd_mode() argument
230 unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host); in dsi_mgr_is_cmd_mode()
236 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_setup_encoder() local
237 struct msm_drm_private *priv = msm_dsi->dev->dev_private; in msm_dsi_manager_setup_encoder()
239 struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi); in msm_dsi_manager_setup_encoder()
243 dsi_mgr_is_cmd_mode(msm_dsi)); in msm_dsi_manager_setup_encoder()
250 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_panel_init() local
251 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in msm_dsi_manager_panel_init()
252 struct msm_dsi *master_dsi, *slave_dsi; in msm_dsi_manager_panel_init()
257 slave_dsi = msm_dsi; in msm_dsi_manager_panel_init()
259 master_dsi = msm_dsi; in msm_dsi_manager_panel_init()
270 DRM_ERROR("Could not find panel for %u (%ld)\n", msm_dsi->id, in msm_dsi_manager_panel_init()
288 dsi_mgr_is_cmd_mode(msm_dsi)); in msm_dsi_manager_panel_init()
292 msm_dsi->panel = panel; in msm_dsi_manager_panel_init()
300 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_detect() local
302 return msm_dsi->panel ? connector_status_connected : in dsi_mgr_connector_detect()
320 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_get_modes() local
321 struct drm_panel *panel = msm_dsi->panel; in dsi_mgr_connector_get_modes()
343 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_mode_valid() local
344 struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi); in dsi_mgr_connector_mode_valid()
364 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_best_encoder() local
367 return msm_dsi_get_encoder(msm_dsi); in dsi_mgr_connector_best_encoder()
373 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_pre_enable() local
374 struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); in dsi_mgr_bridge_pre_enable()
375 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_pre_enable()
376 struct drm_panel *panel = msm_dsi->panel; in dsi_mgr_bridge_pre_enable()
382 if (!msm_dsi_device_connected(msm_dsi)) in dsi_mgr_bridge_pre_enable()
478 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_post_disable() local
479 struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); in dsi_mgr_bridge_post_disable()
480 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_post_disable()
481 struct drm_panel *panel = msm_dsi->panel; in dsi_mgr_bridge_post_disable()
487 if (!msm_dsi_device_connected(msm_dsi)) in dsi_mgr_bridge_post_disable()
542 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_mode_set() local
543 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in dsi_mgr_bridge_mode_set()
544 struct mipi_dsi_host *host = msm_dsi->host; in dsi_mgr_bridge_mode_set()
583 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_connector_init() local
596 ret = drm_connector_init(msm_dsi->dev, connector, in msm_dsi_manager_connector_init()
612 drm_connector_attach_encoder(connector, msm_dsi->encoder); in msm_dsi_manager_connector_init()
616 DRM_DEV_ERROR(msm_dsi->dev->dev, "init panel failed %d\n", ret); in msm_dsi_manager_connector_init()
623 connector->funcs->destroy(msm_dsi->connector); in msm_dsi_manager_connector_init()
647 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_bridge_init() local
653 dsi_bridge = devm_kzalloc(msm_dsi->dev->dev, in msm_dsi_manager_bridge_init()
662 encoder = msm_dsi->encoder; in msm_dsi_manager_bridge_init()
682 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_ext_bridge_init() local
683 struct drm_device *dev = msm_dsi->dev; in msm_dsi_manager_ext_bridge_init()
689 int_bridge = msm_dsi->bridge; in msm_dsi_manager_ext_bridge_init()
690 ext_bridge = msm_dsi->external_bridge = in msm_dsi_manager_ext_bridge_init()
691 msm_dsi_host_get_bridge(msm_dsi->host); in msm_dsi_manager_ext_bridge_init()
693 encoder = msm_dsi->encoder; in msm_dsi_manager_ext_bridge_init()
719 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_cmd_xfer() local
720 struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0); in msm_dsi_manager_cmd_xfer()
721 struct mipi_dsi_host *host = msm_dsi->host; in msm_dsi_manager_cmd_xfer()
765 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_cmd_xfer_trigger() local
766 struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0); in msm_dsi_manager_cmd_xfer_trigger()
767 struct mipi_dsi_host *host = msm_dsi->host; in msm_dsi_manager_cmd_xfer_trigger()
780 int msm_dsi_manager_register(struct msm_dsi *msm_dsi) in msm_dsi_manager_register() argument
783 int id = msm_dsi->id; in msm_dsi_manager_register()
796 msm_dsim->dsi[id] = msm_dsi; in msm_dsi_manager_register()
798 ret = dsi_mgr_parse_dual_dsi(msm_dsi->pdev->dev.of_node, id); in msm_dsi_manager_register()
818 void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi) in msm_dsi_manager_unregister() argument
822 if (msm_dsi->host) in msm_dsi_manager_unregister()
823 msm_dsi_host_unregister(msm_dsi->host); in msm_dsi_manager_unregister()
825 if (msm_dsi->id >= 0) in msm_dsi_manager_unregister()
826 msm_dsim->dsi[msm_dsi->id] = NULL; in msm_dsi_manager_unregister()