Lines Matching full:lvds
44 struct sun4i_lvds *lvds = in sun4i_lvds_get_modes() local
47 return drm_panel_get_modes(lvds->panel, connector); in sun4i_lvds_get_modes()
70 struct sun4i_lvds *lvds = drm_encoder_to_sun4i_lvds(encoder); in sun4i_lvds_encoder_enable() local
72 DRM_DEBUG_DRIVER("Enabling LVDS output\n"); in sun4i_lvds_encoder_enable()
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()
82 struct sun4i_lvds *lvds = drm_encoder_to_sun4i_lvds(encoder); in sun4i_lvds_encoder_disable() local
84 DRM_DEBUG_DRIVER("Disabling LVDS output\n"); in sun4i_lvds_encoder_disable()
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()
101 struct sun4i_lvds *lvds; in sun4i_lvds_init() local
104 lvds = devm_kzalloc(drm->dev, sizeof(*lvds), GFP_KERNEL); in sun4i_lvds_init()
105 if (!lvds) in sun4i_lvds_init()
107 encoder = &lvds->encoder; 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()
154 drm_encoder_cleanup(&lvds->encoder); in sun4i_lvds_init()