Lines Matching refs:msm_dsi

9 bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi)  in msm_dsi_is_cmd_mode()  argument
11 unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host); in msm_dsi_is_cmd_mode()
16 struct drm_dsc_config *msm_dsi_get_dsc_config(struct msm_dsi *msm_dsi) in msm_dsi_get_dsc_config() argument
18 return msm_dsi_host_get_dsc_config(msm_dsi->host); in msm_dsi_get_dsc_config()
21 static int dsi_get_phy(struct msm_dsi *msm_dsi) in dsi_get_phy() argument
23 struct platform_device *pdev = msm_dsi->pdev; in dsi_get_phy()
35 msm_dsi->phy = platform_get_drvdata(phy_pdev); in dsi_get_phy()
36 msm_dsi->phy_dev = &phy_pdev->dev; in dsi_get_phy()
45 if (!msm_dsi->phy) { in dsi_get_phy()
54 static void dsi_destroy(struct msm_dsi *msm_dsi) in dsi_destroy() argument
56 if (!msm_dsi) in dsi_destroy()
59 msm_dsi_manager_unregister(msm_dsi); in dsi_destroy()
61 if (msm_dsi->phy_dev) { in dsi_destroy()
62 put_device(msm_dsi->phy_dev); in dsi_destroy()
63 msm_dsi->phy = NULL; in dsi_destroy()
64 msm_dsi->phy_dev = NULL; in dsi_destroy()
67 if (msm_dsi->host) { in dsi_destroy()
68 msm_dsi_host_destroy(msm_dsi->host); in dsi_destroy()
69 msm_dsi->host = NULL; in dsi_destroy()
72 platform_set_drvdata(msm_dsi->pdev, NULL); in dsi_destroy()
75 static struct msm_dsi *dsi_init(struct platform_device *pdev) in dsi_init()
77 struct msm_dsi *msm_dsi; in dsi_init() local
83 msm_dsi = devm_kzalloc(&pdev->dev, sizeof(*msm_dsi), GFP_KERNEL); in dsi_init()
84 if (!msm_dsi) in dsi_init()
86 DBG("dsi probed=%p", msm_dsi); in dsi_init()
88 msm_dsi->id = -1; in dsi_init()
89 msm_dsi->pdev = pdev; in dsi_init()
90 platform_set_drvdata(pdev, msm_dsi); in dsi_init()
93 ret = msm_dsi_host_init(msm_dsi); in dsi_init()
98 ret = dsi_get_phy(msm_dsi); in dsi_init()
103 ret = msm_dsi_manager_register(msm_dsi); in dsi_init()
107 return msm_dsi; in dsi_init()
110 dsi_destroy(msm_dsi); in dsi_init()
117 struct msm_dsi *msm_dsi = dev_get_drvdata(dev); in dsi_bind() local
119 priv->dsi[msm_dsi->id] = msm_dsi; in dsi_bind()
128 struct msm_dsi *msm_dsi = dev_get_drvdata(dev); in dsi_unbind() local
130 priv->dsi[msm_dsi->id] = NULL; in dsi_unbind()
150 struct msm_dsi *msm_dsi; in dsi_dev_probe() local
153 msm_dsi = dsi_init(pdev); in dsi_dev_probe()
154 if (IS_ERR(msm_dsi)) { in dsi_dev_probe()
156 if (PTR_ERR(msm_dsi) == -ENODEV) in dsi_dev_probe()
159 return PTR_ERR(msm_dsi); in dsi_dev_probe()
167 struct msm_dsi *msm_dsi = platform_get_drvdata(pdev); in dsi_dev_remove() local
170 dsi_destroy(msm_dsi); in dsi_dev_remove()
211 int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, in msm_dsi_modeset_init() argument
217 if (WARN_ON(!encoder) || WARN_ON(!msm_dsi) || WARN_ON(!dev)) in msm_dsi_modeset_init()
227 msm_dsi->dev = dev; in msm_dsi_modeset_init()
229 ret = msm_dsi_host_modeset_init(msm_dsi->host, dev); in msm_dsi_modeset_init()
235 if (msm_dsi_is_bonded_dsi(msm_dsi) && in msm_dsi_modeset_init()
236 !msm_dsi_is_master_dsi(msm_dsi)) { in msm_dsi_modeset_init()
244 msm_dsi->encoder = encoder; in msm_dsi_modeset_init()
246 msm_dsi->bridge = msm_dsi_manager_bridge_init(msm_dsi->id); in msm_dsi_modeset_init()
247 if (IS_ERR(msm_dsi->bridge)) { in msm_dsi_modeset_init()
248 ret = PTR_ERR(msm_dsi->bridge); in msm_dsi_modeset_init()
250 msm_dsi->bridge = NULL; in msm_dsi_modeset_init()
254 ret = msm_dsi_manager_ext_bridge_init(msm_dsi->id); in msm_dsi_modeset_init()
261 priv->bridges[priv->num_bridges++] = msm_dsi->bridge; in msm_dsi_modeset_init()
266 if (msm_dsi->bridge) { in msm_dsi_modeset_init()
267 msm_dsi_manager_bridge_destroy(msm_dsi->bridge); in msm_dsi_modeset_init()
268 msm_dsi->bridge = NULL; in msm_dsi_modeset_init()
274 void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi) in msm_dsi_snapshot() argument
276 msm_dsi_host_snapshot(disp_state, msm_dsi->host); in msm_dsi_snapshot()
277 msm_dsi_phy_snapshot(disp_state, msm_dsi->phy); in msm_dsi_snapshot()