Lines Matching refs:id
35 #define IS_MASTER_DSI_LINK(id) (msm_dsim_glb.master_dsi_link_id == id) argument
37 static inline struct msm_dsi *dsi_mgr_get_dsi(int id) in dsi_mgr_get_dsi() argument
39 return msm_dsim_glb.dsi[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() argument
44 return msm_dsim_glb.dsi[(id + 1) % DSI_MAX]; in dsi_mgr_get_other_dsi()
47 static int dsi_mgr_parse_of(struct device_node *np, int id) in dsi_mgr_parse_of() argument
59 msm_dsim->master_dsi_link_id = id; in dsi_mgr_parse_of()
68 static int dsi_mgr_setup_components(int id) in dsi_mgr_setup_components() argument
70 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_setup_components()
71 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in dsi_mgr_setup_components()
86 struct msm_dsi *master_link_dsi = IS_MASTER_DSI_LINK(id) ? in dsi_mgr_setup_components()
88 struct msm_dsi *slave_link_dsi = IS_MASTER_DSI_LINK(id) ? in dsi_mgr_setup_components()
133 dsi_mgr_phy_enable(int id, in dsi_mgr_phy_enable() argument
136 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_phy_enable()
164 ret = enable_phy(msm_dsi, &shared_timings[id]); in dsi_mgr_phy_enable()
174 static void dsi_mgr_phy_disable(int id) in dsi_mgr_phy_disable() argument
176 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_phy_disable()
197 int id; member
202 int id; member
211 return dsi_connector->id; in dsi_mgr_connector_get_id()
217 return dsi_bridge->id; in dsi_mgr_bridge_get_id()
220 static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) in msm_dsi_manager_panel_init() argument
224 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_panel_init()
225 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in msm_dsi_manager_panel_init()
229 if (IS_BONDED_DSI() && !IS_MASTER_DSI_LINK(id)) { in msm_dsi_manager_panel_init()
244 DRM_ERROR("Could not find panel for %u (%ld)\n", msm_dsi->id, in msm_dsi_manager_panel_init()
273 int id = dsi_mgr_connector_get_id(connector); in dsi_mgr_connector_detect() local
274 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_detect()
293 int id = dsi_mgr_connector_get_id(connector); in dsi_mgr_connector_get_modes() local
294 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_get_modes()
315 int id = dsi_mgr_connector_get_id(connector); in dsi_mgr_connector_mode_valid() local
316 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_mode_valid()
336 int id = dsi_mgr_connector_get_id(connector); in dsi_mgr_connector_best_encoder() local
337 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_connector_best_encoder()
345 int id = dsi_mgr_bridge_get_id(bridge); in dsi_mgr_bridge_pre_enable() local
346 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_pre_enable()
354 DBG("id=%d", id); in dsi_mgr_bridge_pre_enable()
359 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) in dsi_mgr_bridge_pre_enable()
362 ret = dsi_mgr_phy_enable(id, phy_shared_timings); in dsi_mgr_bridge_pre_enable()
366 ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_bonded_dsi, msm_dsi->phy); in dsi_mgr_bridge_pre_enable()
368 pr_err("%s: power on host %d failed, %d\n", __func__, id, ret); in dsi_mgr_bridge_pre_enable()
397 id, ret); in dsi_mgr_bridge_pre_enable()
404 pr_err("%s: enable host %d failed, %d\n", __func__, id, ret); in dsi_mgr_bridge_pre_enable()
433 dsi_mgr_phy_disable(id); in dsi_mgr_bridge_pre_enable()
453 int id = dsi_mgr_bridge_get_id(bridge); in dsi_mgr_bridge_enable() local
454 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_enable()
459 DBG("id=%d", id); in dsi_mgr_bridge_enable()
464 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) in dsi_mgr_bridge_enable()
470 pr_err("%s: enable panel %d failed, %d\n", __func__, id, in dsi_mgr_bridge_enable()
478 int id = dsi_mgr_bridge_get_id(bridge); in dsi_mgr_bridge_disable() local
479 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_disable()
484 DBG("id=%d", id); in dsi_mgr_bridge_disable()
489 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) in dsi_mgr_bridge_disable()
495 pr_err("%s: Panel %d OFF failed, %d\n", __func__, id, in dsi_mgr_bridge_disable()
502 int id = dsi_mgr_bridge_get_id(bridge); in dsi_mgr_bridge_post_disable() local
503 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_post_disable()
510 DBG("id=%d", id); in dsi_mgr_bridge_post_disable()
520 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) in dsi_mgr_bridge_post_disable()
525 pr_err("%s: host %d disable failed, %d\n", __func__, id, ret); in dsi_mgr_bridge_post_disable()
537 id, ret); in dsi_mgr_bridge_post_disable()
549 pr_err("%s: host %d power off failed,%d\n", __func__, id, ret); in dsi_mgr_bridge_post_disable()
559 dsi_mgr_phy_disable(id); in dsi_mgr_bridge_post_disable()
566 int id = dsi_mgr_bridge_get_id(bridge); in dsi_mgr_bridge_mode_set() local
567 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in dsi_mgr_bridge_mode_set()
568 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); in dsi_mgr_bridge_mode_set()
574 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) in dsi_mgr_bridge_mode_set()
606 struct drm_connector *msm_dsi_manager_connector_init(u8 id) in msm_dsi_manager_connector_init() argument
608 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_connector_init()
617 dsi_connector->id = id; in msm_dsi_manager_connector_init()
639 ret = msm_dsi_manager_panel_init(connector, id); in msm_dsi_manager_connector_init()
652 bool msm_dsi_manager_validate_current_config(u8 id) in msm_dsi_manager_validate_current_config() argument
662 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) { in msm_dsi_manager_validate_current_config()
663 DBG("Skip bridge registration for slave DSI->id: %d\n", id); in msm_dsi_manager_validate_current_config()
670 struct drm_bridge *msm_dsi_manager_bridge_init(u8 id) in msm_dsi_manager_bridge_init() argument
672 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_bridge_init()
685 dsi_bridge->id = id; in msm_dsi_manager_bridge_init()
705 struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id) in msm_dsi_manager_ext_bridge_init() argument
707 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_ext_bridge_init()
764 int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg) in msm_dsi_manager_cmd_xfer() argument
766 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_cmd_xfer()
781 if (need_sync && (id == DSI_0)) in msm_dsi_manager_cmd_xfer()
810 bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len) in msm_dsi_manager_cmd_xfer_trigger() argument
812 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); in msm_dsi_manager_cmd_xfer_trigger()
816 if (IS_SYNC_NEEDED() && (id == DSI_0)) in msm_dsi_manager_cmd_xfer_trigger()
830 int id = msm_dsi->id; in msm_dsi_manager_register() local
833 if (id >= DSI_MAX) { in msm_dsi_manager_register()
834 pr_err("%s: invalid id %d\n", __func__, id); in msm_dsi_manager_register()
838 if (msm_dsim->dsi[id]) { in msm_dsi_manager_register()
839 pr_err("%s: dsi%d already registered\n", __func__, id); in msm_dsi_manager_register()
843 msm_dsim->dsi[id] = msm_dsi; in msm_dsi_manager_register()
845 ret = dsi_mgr_parse_of(msm_dsi->pdev->dev.of_node, id); in msm_dsi_manager_register()
851 ret = dsi_mgr_setup_components(id); in msm_dsi_manager_register()
854 __func__, id, ret); in msm_dsi_manager_register()
861 msm_dsim->dsi[id] = NULL; in msm_dsi_manager_register()
872 if (msm_dsi->id >= 0) in msm_dsi_manager_unregister()
873 msm_dsim->dsi[msm_dsi->id] = NULL; in msm_dsi_manager_unregister()
883 return IS_MASTER_DSI_LINK(msm_dsi->id); in msm_dsi_is_master_dsi()