Lines Matching +full:dsi +full:- +full:phy

1 // SPDX-License-Identifier: GPL-2.0-only
6 #include "dsi.h"
10 unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host); in msm_dsi_is_cmd_mode()
17 return msm_dsi_host_get_dsc_config(msm_dsi->host); in msm_dsi_get_dsc_config()
22 return msm_dsi_host_is_wide_bus_enabled(msm_dsi->host); in msm_dsi_wide_bus_enabled()
27 struct platform_device *pdev = msm_dsi->pdev; in dsi_get_phy()
31 phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0); in dsi_get_phy()
33 DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n"); in dsi_get_phy()
34 return -ENXIO; in dsi_get_phy()
39 msm_dsi->phy = platform_get_drvdata(phy_pdev); in dsi_get_phy()
40 msm_dsi->phy_dev = &phy_pdev->dev; in dsi_get_phy()
46 DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__); in dsi_get_phy()
47 return -EPROBE_DEFER; in dsi_get_phy()
49 if (!msm_dsi->phy) { in dsi_get_phy()
50 put_device(&phy_pdev->dev); in dsi_get_phy()
51 DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__); in dsi_get_phy()
52 return -EPROBE_DEFER; in dsi_get_phy()
65 if (msm_dsi->phy_dev) { in dsi_destroy()
66 put_device(msm_dsi->phy_dev); in dsi_destroy()
67 msm_dsi->phy = NULL; in dsi_destroy()
68 msm_dsi->phy_dev = NULL; in dsi_destroy()
71 if (msm_dsi->host) { in dsi_destroy()
72 msm_dsi_host_destroy(msm_dsi->host); in dsi_destroy()
73 msm_dsi->host = NULL; in dsi_destroy()
76 platform_set_drvdata(msm_dsi->pdev, NULL); in dsi_destroy()
85 return ERR_PTR(-ENXIO); in dsi_init()
87 msm_dsi = devm_kzalloc(&pdev->dev, sizeof(*msm_dsi), GFP_KERNEL); in dsi_init()
89 return ERR_PTR(-ENOMEM); in dsi_init()
90 DBG("dsi probed=%p", msm_dsi); in dsi_init()
92 msm_dsi->id = -1; in dsi_init()
93 msm_dsi->pdev = pdev; in dsi_init()
96 /* Init dsi host */ in dsi_init()
101 /* GET dsi PHY */ in dsi_init()
106 /* Register to dsi manager */ in dsi_init()
124 * Next bridge doesn't exist for the secondary DSI host in a bonded in dsi_bind()
131 ext_bridge = devm_drm_of_get_bridge(&msm_dsi->pdev->dev, in dsi_bind()
132 msm_dsi->pdev->dev.of_node, 1, 0); in dsi_bind()
136 msm_dsi->next_bridge = ext_bridge; in dsi_bind()
139 priv->dsi[msm_dsi->id] = msm_dsi; in dsi_bind()
150 msm_dsi_tx_buf_free(msm_dsi->host); in dsi_unbind()
151 priv->dsi[msm_dsi->id] = NULL; in dsi_unbind()
161 return component_add(&pdev->dev, &dsi_ops); in dsi_dev_attach()
166 component_del(&pdev->dev, &dsi_ops); in dsi_dev_detach()
176 /* Don't fail the bind if the dsi port is not connected */ in dsi_dev_probe()
177 if (PTR_ERR(msm_dsi) == -ENODEV) in dsi_dev_probe()
195 { .compatible = "qcom,mdss-dsi-ctrl" },
198 { .compatible = "qcom,dsi-ctrl-6g-qcm2290" },
237 msm_dsi->dev = dev; in msm_dsi_modeset_init()
239 ret = msm_dsi_host_modeset_init(msm_dsi->host, dev); in msm_dsi_modeset_init()
241 DRM_DEV_ERROR(dev->dev, "failed to modeset init host: %d\n", ret); in msm_dsi_modeset_init()
249 * Just skip creating encoder/connector for the slave-DSI. in msm_dsi_modeset_init()
256 DRM_DEV_ERROR(dev->dev, in msm_dsi_modeset_init()
257 "failed to create dsi connector: %d\n", ret); in msm_dsi_modeset_init()
266 msm_dsi_host_snapshot(disp_state, msm_dsi->host); in msm_dsi_snapshot()
267 msm_dsi_phy_snapshot(disp_state, msm_dsi->phy); in msm_dsi_snapshot()