Lines Matching +full:tcon +full:- +full:channel
1 // SPDX-License-Identifier: GPL-2.0+
4 * Maxime Ripard <maxime.ripard@free-electrons.com>
47 return drm_panel_get_modes(lvds->panel, connector); in sun4i_lvds_get_modes()
74 if (lvds->panel) { in sun4i_lvds_encoder_enable()
75 drm_panel_prepare(lvds->panel); in sun4i_lvds_encoder_enable()
76 drm_panel_enable(lvds->panel); in sun4i_lvds_encoder_enable()
86 if (lvds->panel) { in sun4i_lvds_encoder_disable()
87 drm_panel_disable(lvds->panel); in sun4i_lvds_encoder_disable()
88 drm_panel_unprepare(lvds->panel); in sun4i_lvds_encoder_disable()
97 int sun4i_lvds_init(struct drm_device *drm, struct sun4i_tcon *tcon) in sun4i_lvds_init() argument
104 lvds = devm_kzalloc(drm->dev, sizeof(*lvds), GFP_KERNEL); in sun4i_lvds_init()
106 return -ENOMEM; in sun4i_lvds_init()
107 encoder = &lvds->encoder; in sun4i_lvds_init()
109 ret = drm_of_find_panel_or_bridge(tcon->dev->of_node, 1, 0, in sun4i_lvds_init()
110 &lvds->panel, &bridge); in sun4i_lvds_init()
112 dev_info(drm->dev, "No panel or bridge found... LVDS output disabled\n"); in sun4i_lvds_init()
116 drm_encoder_helper_add(&lvds->encoder, in sun4i_lvds_init()
118 ret = drm_simple_encoder_init(drm, &lvds->encoder, in sun4i_lvds_init()
121 dev_err(drm->dev, "Couldn't initialise the lvds encoder\n"); in sun4i_lvds_init()
125 /* The LVDS encoder can only work with the TCON channel 0 */ in sun4i_lvds_init()
126 lvds->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc); in sun4i_lvds_init()
128 if (lvds->panel) { in sun4i_lvds_init()
129 drm_connector_helper_add(&lvds->connector, in sun4i_lvds_init()
131 ret = drm_connector_init(drm, &lvds->connector, in sun4i_lvds_init()
135 dev_err(drm->dev, "Couldn't initialise the lvds connector\n"); in sun4i_lvds_init()
139 drm_connector_attach_encoder(&lvds->connector, in sun4i_lvds_init()
140 &lvds->encoder); in sun4i_lvds_init()
152 drm_encoder_cleanup(&lvds->encoder); in sun4i_lvds_init()