Lines Matching refs:rgb

48 	struct sun4i_rgb *rgb =  in sun4i_rgb_get_modes()  local
51 return drm_panel_get_modes(rgb->panel, connector); in sun4i_rgb_get_modes()
65 struct sun4i_rgb *rgb = drm_encoder_to_sun4i_rgb(crtc); in sun4i_rgb_mode_valid() local
66 struct sun4i_tcon *tcon = rgb->tcon; in sun4i_rgb_mode_valid()
109 if (rgb->panel) { in sun4i_rgb_mode_valid()
118 if (!rgb->bridge) in sun4i_rgb_mode_valid()
161 struct sun4i_rgb *rgb = drm_encoder_to_sun4i_rgb(encoder); in sun4i_rgb_encoder_enable() local
165 if (rgb->panel) { in sun4i_rgb_encoder_enable()
166 drm_panel_prepare(rgb->panel); in sun4i_rgb_encoder_enable()
167 drm_panel_enable(rgb->panel); in sun4i_rgb_encoder_enable()
173 struct sun4i_rgb *rgb = drm_encoder_to_sun4i_rgb(encoder); in sun4i_rgb_encoder_disable() local
177 if (rgb->panel) { in sun4i_rgb_encoder_disable()
178 drm_panel_disable(rgb->panel); in sun4i_rgb_encoder_disable()
179 drm_panel_unprepare(rgb->panel); in sun4i_rgb_encoder_disable()
192 struct sun4i_rgb *rgb; in sun4i_rgb_init() local
195 rgb = devm_kzalloc(drm->dev, sizeof(*rgb), GFP_KERNEL); in sun4i_rgb_init()
196 if (!rgb) in sun4i_rgb_init()
198 rgb->tcon = tcon; in sun4i_rgb_init()
199 encoder = &rgb->encoder; in sun4i_rgb_init()
202 &rgb->panel, &rgb->bridge); in sun4i_rgb_init()
208 drm_encoder_helper_add(&rgb->encoder, in sun4i_rgb_init()
210 ret = drm_simple_encoder_init(drm, &rgb->encoder, in sun4i_rgb_init()
218 rgb->encoder.possible_crtcs = drm_crtc_mask(&tcon->crtc->crtc); in sun4i_rgb_init()
220 if (rgb->panel) { in sun4i_rgb_init()
221 drm_connector_helper_add(&rgb->connector, in sun4i_rgb_init()
223 ret = drm_connector_init(drm, &rgb->connector, in sun4i_rgb_init()
231 drm_connector_attach_encoder(&rgb->connector, in sun4i_rgb_init()
232 &rgb->encoder); in sun4i_rgb_init()
235 if (rgb->bridge) { in sun4i_rgb_init()
236 ret = drm_bridge_attach(encoder, rgb->bridge, NULL, 0); in sun4i_rgb_init()
244 drm_encoder_cleanup(&rgb->encoder); in sun4i_rgb_init()