Lines Matching refs:rgb
46 struct sun4i_rgb *rgb = in sun4i_rgb_get_modes() local
49 return drm_panel_get_modes(rgb->panel); in sun4i_rgb_get_modes()
63 struct sun4i_rgb *rgb = drm_encoder_to_sun4i_rgb(crtc); in sun4i_rgb_mode_valid() local
64 struct sun4i_tcon *tcon = rgb->tcon; in sun4i_rgb_mode_valid()
107 if (rgb->panel) { in sun4i_rgb_mode_valid()
116 if (!rgb->bridge) in sun4i_rgb_mode_valid()
146 struct sun4i_rgb *rgb = drm_connector_to_sun4i_rgb(connector); in sun4i_rgb_connector_destroy() local
148 drm_panel_detach(rgb->panel); in sun4i_rgb_connector_destroy()
162 struct sun4i_rgb *rgb = drm_encoder_to_sun4i_rgb(encoder); in sun4i_rgb_encoder_enable() local
166 if (rgb->panel) { in sun4i_rgb_encoder_enable()
167 drm_panel_prepare(rgb->panel); in sun4i_rgb_encoder_enable()
168 drm_panel_enable(rgb->panel); in sun4i_rgb_encoder_enable()
174 struct sun4i_rgb *rgb = drm_encoder_to_sun4i_rgb(encoder); in sun4i_rgb_encoder_disable() local
178 if (rgb->panel) { in sun4i_rgb_encoder_disable()
179 drm_panel_disable(rgb->panel); in sun4i_rgb_encoder_disable()
180 drm_panel_unprepare(rgb->panel); in sun4i_rgb_encoder_disable()
202 struct sun4i_rgb *rgb; in sun4i_rgb_init() local
205 rgb = devm_kzalloc(drm->dev, sizeof(*rgb), GFP_KERNEL); in sun4i_rgb_init()
206 if (!rgb) in sun4i_rgb_init()
208 rgb->tcon = tcon; in sun4i_rgb_init()
209 encoder = &rgb->encoder; in sun4i_rgb_init()
212 &rgb->panel, &rgb->bridge); in sun4i_rgb_init()
218 drm_encoder_helper_add(&rgb->encoder, in sun4i_rgb_init()
221 &rgb->encoder, in sun4i_rgb_init()
231 rgb->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc); in sun4i_rgb_init()
233 if (rgb->panel) { in sun4i_rgb_init()
234 drm_connector_helper_add(&rgb->connector, in sun4i_rgb_init()
236 ret = drm_connector_init(drm, &rgb->connector, in sun4i_rgb_init()
244 drm_connector_attach_encoder(&rgb->connector, in sun4i_rgb_init()
245 &rgb->encoder); in sun4i_rgb_init()
247 ret = drm_panel_attach(rgb->panel, &rgb->connector); in sun4i_rgb_init()
254 if (rgb->bridge) { in sun4i_rgb_init()
255 ret = drm_bridge_attach(encoder, rgb->bridge, NULL); in sun4i_rgb_init()
265 drm_encoder_cleanup(&rgb->encoder); in sun4i_rgb_init()