Lines Matching full:rgb
123 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_disable() local
128 tegra_dc_write_regs(rgb->dc, rgb_disable, ARRAY_SIZE(rgb_disable)); in tegra_rgb_encoder_disable()
129 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_disable()
138 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_enable() local
144 tegra_dc_write_regs(rgb->dc, rgb_enable, ARRAY_SIZE(rgb_enable)); in tegra_rgb_encoder_enable()
147 tegra_dc_writel(rgb->dc, value, DC_DISP_DATA_ENABLE_OPTIONS); in tegra_rgb_encoder_enable()
150 value = tegra_dc_readl(rgb->dc, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_enable()
153 tegra_dc_writel(rgb->dc, value, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_enable()
158 tegra_dc_writel(rgb->dc, value, DC_DISP_DISP_INTERFACE_CONTROL); in tegra_rgb_encoder_enable()
162 tegra_dc_writel(rgb->dc, value, DC_DISP_SHIFT_CLOCK_OPTIONS); in tegra_rgb_encoder_enable()
164 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_enable()
178 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_atomic_check() local
198 div = ((clk_get_rate(rgb->clk) * 2) / pclk) - 2; in tegra_rgb_encoder_atomic_check()
201 err = tegra_dc_state_setup_clock(dc, crtc_state, rgb->clk_parent, in tegra_rgb_encoder_atomic_check()
220 struct tegra_rgb *rgb; in tegra_dc_rgb_probe() local
223 np = of_get_child_by_name(dc->dev->of_node, "rgb"); in tegra_dc_rgb_probe()
227 rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL); in tegra_dc_rgb_probe()
228 if (!rgb) in tegra_dc_rgb_probe()
231 rgb->output.dev = dc->dev; in tegra_dc_rgb_probe()
232 rgb->output.of_node = np; in tegra_dc_rgb_probe()
233 rgb->dc = dc; in tegra_dc_rgb_probe()
235 err = tegra_output_probe(&rgb->output); in tegra_dc_rgb_probe()
239 rgb->clk = devm_clk_get(dc->dev, NULL); in tegra_dc_rgb_probe()
240 if (IS_ERR(rgb->clk)) { in tegra_dc_rgb_probe()
242 return PTR_ERR(rgb->clk); in tegra_dc_rgb_probe()
245 rgb->clk_parent = devm_clk_get(dc->dev, "parent"); in tegra_dc_rgb_probe()
246 if (IS_ERR(rgb->clk_parent)) { in tegra_dc_rgb_probe()
248 return PTR_ERR(rgb->clk_parent); in tegra_dc_rgb_probe()
251 err = clk_set_parent(rgb->clk, rgb->clk_parent); in tegra_dc_rgb_probe()
257 dc->rgb = &rgb->output; in tegra_dc_rgb_probe()
264 if (!dc->rgb) in tegra_dc_rgb_remove()
267 tegra_output_remove(dc->rgb); in tegra_dc_rgb_remove()
268 dc->rgb = NULL; in tegra_dc_rgb_remove()
275 struct tegra_output *output = dc->rgb; in tegra_dc_rgb_init()
278 if (!dc->rgb) in tegra_dc_rgb_init()
303 * Other outputs can be attached to either display controller. The RGB in tegra_dc_rgb_init()
314 if (dc->rgb) in tegra_dc_rgb_exit()
315 tegra_output_exit(dc->rgb); in tegra_dc_rgb_exit()