Lines Matching +full:qcm2290 +full:- +full:mdss

1 // SPDX-License-Identifier: GPL-2.0-only
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 struct platform_device *pdev = msm_dsi->pdev; in dsi_get_phy()
26 phy_node = of_parse_phandle(pdev->dev.of_node, "phys", 0); in dsi_get_phy()
28 DRM_DEV_ERROR(&pdev->dev, "cannot find phy device\n"); in dsi_get_phy()
29 return -ENXIO; in dsi_get_phy()
34 msm_dsi->phy = platform_get_drvdata(phy_pdev); in dsi_get_phy()
35 msm_dsi->phy_dev = &phy_pdev->dev; in dsi_get_phy()
41 DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__); in dsi_get_phy()
42 return -EPROBE_DEFER; in dsi_get_phy()
44 if (!msm_dsi->phy) { in dsi_get_phy()
45 put_device(&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()
60 if (msm_dsi->phy_dev) { in dsi_destroy()
61 put_device(msm_dsi->phy_dev); in dsi_destroy()
62 msm_dsi->phy = NULL; in dsi_destroy()
63 msm_dsi->phy_dev = NULL; in dsi_destroy()
66 if (msm_dsi->host) { in dsi_destroy()
67 msm_dsi_host_destroy(msm_dsi->host); in dsi_destroy()
68 msm_dsi->host = NULL; in dsi_destroy()
71 platform_set_drvdata(msm_dsi->pdev, NULL); in dsi_destroy()
80 return ERR_PTR(-ENXIO); in dsi_init()
82 msm_dsi = devm_kzalloc(&pdev->dev, sizeof(*msm_dsi), GFP_KERNEL); in dsi_init()
84 return ERR_PTR(-ENOMEM); in dsi_init()
87 msm_dsi->id = -1; in dsi_init()
88 msm_dsi->pdev = pdev; in dsi_init()
118 priv->dsi[msm_dsi->id] = msm_dsi; in dsi_bind()
129 msm_dsi_tx_buf_free(msm_dsi->host); in dsi_unbind()
130 priv->dsi[msm_dsi->id] = NULL; in dsi_unbind()
140 return component_add(&pdev->dev, &dsi_ops); in dsi_dev_attach()
145 component_del(&pdev->dev, &dsi_ops); in dsi_dev_detach()
156 if (PTR_ERR(msm_dsi) == -ENODEV) in dsi_dev_probe()
176 { .compatible = "qcom,mdss-dsi-ctrl" },
179 { .compatible = "qcom,dsi-ctrl-6g-qcm2290" },
216 struct msm_drm_private *priv = dev->dev_private; in msm_dsi_modeset_init()
219 if (priv->num_bridges == ARRAY_SIZE(priv->bridges)) { in msm_dsi_modeset_init()
220 DRM_DEV_ERROR(dev->dev, "too many bridges\n"); in msm_dsi_modeset_init()
221 return -ENOSPC; in msm_dsi_modeset_init()
224 msm_dsi->dev = dev; in msm_dsi_modeset_init()
226 ret = msm_dsi_host_modeset_init(msm_dsi->host, dev); in msm_dsi_modeset_init()
228 DRM_DEV_ERROR(dev->dev, "failed to modeset init host: %d\n", ret); in msm_dsi_modeset_init()
236 * Just skip creating encoder/connector for the slave-DSI. in msm_dsi_modeset_init()
241 msm_dsi->encoder = encoder; in msm_dsi_modeset_init()
243 msm_dsi->bridge = msm_dsi_manager_bridge_init(msm_dsi->id); in msm_dsi_modeset_init()
244 if (IS_ERR(msm_dsi->bridge)) { in msm_dsi_modeset_init()
245 ret = PTR_ERR(msm_dsi->bridge); in msm_dsi_modeset_init()
246 DRM_DEV_ERROR(dev->dev, "failed to create dsi bridge: %d\n", ret); in msm_dsi_modeset_init()
247 msm_dsi->bridge = NULL; in msm_dsi_modeset_init()
251 ret = msm_dsi_manager_ext_bridge_init(msm_dsi->id); in msm_dsi_modeset_init()
253 DRM_DEV_ERROR(dev->dev, in msm_dsi_modeset_init()
258 priv->bridges[priv->num_bridges++] = msm_dsi->bridge; in msm_dsi_modeset_init()
263 if (msm_dsi->bridge) { in msm_dsi_modeset_init()
264 msm_dsi_manager_bridge_destroy(msm_dsi->bridge); in msm_dsi_modeset_init()
265 msm_dsi->bridge = NULL; in msm_dsi_modeset_init()
273 msm_dsi_host_snapshot(disp_state, msm_dsi->host); in msm_dsi_snapshot()
274 msm_dsi_phy_snapshot(disp_state, msm_dsi->phy); in msm_dsi_snapshot()