Lines Matching full:pl

39 static void imx8qxp_pixel_link_enable_mst_en(struct imx8qxp_pixel_link *pl)  in imx8qxp_pixel_link_enable_mst_en()  argument
43 ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc, in imx8qxp_pixel_link_enable_mst_en()
44 pl->mst_en_ctrl, true); in imx8qxp_pixel_link_enable_mst_en()
46 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_enable_mst_en()
48 pl->dc_id, pl->stream_id, ret); in imx8qxp_pixel_link_enable_mst_en()
51 static void imx8qxp_pixel_link_enable_mst_vld(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_enable_mst_vld() argument
55 ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc, in imx8qxp_pixel_link_enable_mst_vld()
56 pl->mst_vld_ctrl, true); in imx8qxp_pixel_link_enable_mst_vld()
58 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_enable_mst_vld()
60 pl->dc_id, pl->stream_id, ret); in imx8qxp_pixel_link_enable_mst_vld()
63 static void imx8qxp_pixel_link_enable_sync(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_enable_sync() argument
67 ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc, in imx8qxp_pixel_link_enable_sync()
68 pl->sync_ctrl, true); in imx8qxp_pixel_link_enable_sync()
70 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_enable_sync()
72 pl->dc_id, pl->stream_id, ret); in imx8qxp_pixel_link_enable_sync()
75 static int imx8qxp_pixel_link_disable_mst_en(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_disable_mst_en() argument
79 ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc, in imx8qxp_pixel_link_disable_mst_en()
80 pl->mst_en_ctrl, false); in imx8qxp_pixel_link_disable_mst_en()
82 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_disable_mst_en()
84 pl->dc_id, pl->stream_id, ret); in imx8qxp_pixel_link_disable_mst_en()
89 static int imx8qxp_pixel_link_disable_mst_vld(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_disable_mst_vld() argument
93 ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc, in imx8qxp_pixel_link_disable_mst_vld()
94 pl->mst_vld_ctrl, false); in imx8qxp_pixel_link_disable_mst_vld()
96 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_disable_mst_vld()
98 pl->dc_id, pl->stream_id, ret); in imx8qxp_pixel_link_disable_mst_vld()
103 static int imx8qxp_pixel_link_disable_sync(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_disable_sync() argument
107 ret = imx_sc_misc_set_control(pl->ipc_handle, pl->sink_rsc, in imx8qxp_pixel_link_disable_sync()
108 pl->sync_ctrl, false); in imx8qxp_pixel_link_disable_sync()
110 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_disable_sync()
112 pl->dc_id, pl->stream_id, ret); in imx8qxp_pixel_link_disable_sync()
117 static void imx8qxp_pixel_link_set_mst_addr(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_set_mst_addr() argument
121 ret = imx_sc_misc_set_control(pl->ipc_handle, in imx8qxp_pixel_link_set_mst_addr()
122 pl->sink_rsc, pl->mst_addr_ctrl, in imx8qxp_pixel_link_set_mst_addr()
123 pl->mst_addr); in imx8qxp_pixel_link_set_mst_addr()
125 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_set_mst_addr()
127 pl->dc_id, pl->stream_id, pl->mst_addr, ret); in imx8qxp_pixel_link_set_mst_addr()
133 struct imx8qxp_pixel_link *pl = bridge->driver_private; in imx8qxp_pixel_link_bridge_attach() local
136 DRM_DEV_ERROR(pl->dev, in imx8qxp_pixel_link_bridge_attach()
142 pl->next_bridge, bridge, in imx8qxp_pixel_link_bridge_attach()
151 struct imx8qxp_pixel_link *pl = bridge->driver_private; in imx8qxp_pixel_link_bridge_mode_set() local
153 imx8qxp_pixel_link_set_mst_addr(pl); in imx8qxp_pixel_link_bridge_mode_set()
160 struct imx8qxp_pixel_link *pl = bridge->driver_private; in imx8qxp_pixel_link_bridge_atomic_enable() local
162 imx8qxp_pixel_link_enable_mst_en(pl); in imx8qxp_pixel_link_bridge_atomic_enable()
163 imx8qxp_pixel_link_enable_mst_vld(pl); in imx8qxp_pixel_link_bridge_atomic_enable()
164 imx8qxp_pixel_link_enable_sync(pl); in imx8qxp_pixel_link_bridge_atomic_enable()
171 struct imx8qxp_pixel_link *pl = bridge->driver_private; in imx8qxp_pixel_link_bridge_atomic_disable() local
173 imx8qxp_pixel_link_disable_mst_en(pl); in imx8qxp_pixel_link_bridge_atomic_disable()
174 imx8qxp_pixel_link_disable_mst_vld(pl); in imx8qxp_pixel_link_bridge_atomic_disable()
175 imx8qxp_pixel_link_disable_sync(pl); in imx8qxp_pixel_link_bridge_atomic_disable()
245 static int imx8qxp_pixel_link_disable_all_controls(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_disable_all_controls() argument
249 ret = imx8qxp_pixel_link_disable_mst_en(pl); in imx8qxp_pixel_link_disable_all_controls()
253 ret = imx8qxp_pixel_link_disable_mst_vld(pl); in imx8qxp_pixel_link_disable_all_controls()
257 return imx8qxp_pixel_link_disable_sync(pl); in imx8qxp_pixel_link_disable_all_controls()
261 imx8qxp_pixel_link_find_next_bridge(struct imx8qxp_pixel_link *pl) in imx8qxp_pixel_link_find_next_bridge() argument
263 struct device_node *np = pl->dev->of_node; in imx8qxp_pixel_link_find_next_bridge()
287 DRM_DEV_ERROR(pl->dev, "no available output port\n"); in imx8qxp_pixel_link_find_next_bridge()
297 DRM_DEV_DEBUG(pl->dev, in imx8qxp_pixel_link_find_next_bridge()
319 pl->mst_addr = port_id - 1; in imx8qxp_pixel_link_find_next_bridge()
326 struct imx8qxp_pixel_link *pl; in imx8qxp_pixel_link_bridge_probe() local
331 pl = devm_kzalloc(dev, sizeof(*pl), GFP_KERNEL); in imx8qxp_pixel_link_bridge_probe()
332 if (!pl) in imx8qxp_pixel_link_bridge_probe()
335 ret = imx_scu_get_handle(&pl->ipc_handle); in imx8qxp_pixel_link_bridge_probe()
343 ret = of_property_read_u8(np, "fsl,dc-id", &pl->dc_id); in imx8qxp_pixel_link_bridge_probe()
349 ret = of_property_read_u8(np, "fsl,dc-stream-id", &pl->stream_id); in imx8qxp_pixel_link_bridge_probe()
355 pl->dev = dev; in imx8qxp_pixel_link_bridge_probe()
357 pl->sink_rsc = pl->dc_id ? IMX_SC_R_DC_1 : IMX_SC_R_DC_0; in imx8qxp_pixel_link_bridge_probe()
359 if (pl->stream_id == 0) { in imx8qxp_pixel_link_bridge_probe()
360 pl->mst_addr_ctrl = IMX_SC_C_PXL_LINK_MST1_ADDR; in imx8qxp_pixel_link_bridge_probe()
361 pl->mst_en_ctrl = IMX_SC_C_PXL_LINK_MST1_ENB; in imx8qxp_pixel_link_bridge_probe()
362 pl->mst_vld_ctrl = IMX_SC_C_PXL_LINK_MST1_VLD; in imx8qxp_pixel_link_bridge_probe()
363 pl->sync_ctrl = IMX_SC_C_SYNC_CTRL0; in imx8qxp_pixel_link_bridge_probe()
365 pl->mst_addr_ctrl = IMX_SC_C_PXL_LINK_MST2_ADDR; in imx8qxp_pixel_link_bridge_probe()
366 pl->mst_en_ctrl = IMX_SC_C_PXL_LINK_MST2_ENB; in imx8qxp_pixel_link_bridge_probe()
367 pl->mst_vld_ctrl = IMX_SC_C_PXL_LINK_MST2_VLD; in imx8qxp_pixel_link_bridge_probe()
368 pl->sync_ctrl = IMX_SC_C_SYNC_CTRL1; in imx8qxp_pixel_link_bridge_probe()
372 ret = imx8qxp_pixel_link_disable_all_controls(pl); in imx8qxp_pixel_link_bridge_probe()
376 pl->next_bridge = imx8qxp_pixel_link_find_next_bridge(pl); in imx8qxp_pixel_link_bridge_probe()
377 if (IS_ERR(pl->next_bridge)) { in imx8qxp_pixel_link_bridge_probe()
378 ret = PTR_ERR(pl->next_bridge); in imx8qxp_pixel_link_bridge_probe()
385 platform_set_drvdata(pdev, pl); in imx8qxp_pixel_link_bridge_probe()
387 pl->bridge.driver_private = pl; in imx8qxp_pixel_link_bridge_probe()
388 pl->bridge.funcs = &imx8qxp_pixel_link_bridge_funcs; in imx8qxp_pixel_link_bridge_probe()
389 pl->bridge.of_node = np; in imx8qxp_pixel_link_bridge_probe()
391 drm_bridge_add(&pl->bridge); in imx8qxp_pixel_link_bridge_probe()
398 struct imx8qxp_pixel_link *pl = platform_get_drvdata(pdev); in imx8qxp_pixel_link_bridge_remove() local
400 drm_bridge_remove(&pl->bridge); in imx8qxp_pixel_link_bridge_remove()