Lines Matching refs:rgb

120 	struct tegra_rgb *rgb = to_rgb(output);  in tegra_rgb_encoder_disable()  local
125 tegra_dc_write_regs(rgb->dc, rgb_disable, ARRAY_SIZE(rgb_disable)); in tegra_rgb_encoder_disable()
126 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_disable()
135 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_enable() local
141 tegra_dc_write_regs(rgb->dc, rgb_enable, ARRAY_SIZE(rgb_enable)); in tegra_rgb_encoder_enable()
144 tegra_dc_writel(rgb->dc, value, DC_DISP_DATA_ENABLE_OPTIONS); in tegra_rgb_encoder_enable()
147 value = tegra_dc_readl(rgb->dc, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_enable()
150 tegra_dc_writel(rgb->dc, value, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_enable()
155 tegra_dc_writel(rgb->dc, value, DC_DISP_DISP_INTERFACE_CONTROL); in tegra_rgb_encoder_enable()
159 tegra_dc_writel(rgb->dc, value, DC_DISP_SHIFT_CLOCK_OPTIONS); in tegra_rgb_encoder_enable()
161 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_enable()
175 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_atomic_check() local
195 div = ((clk_get_rate(rgb->clk) * 2) / pclk) - 2; in tegra_rgb_encoder_atomic_check()
198 err = tegra_dc_state_setup_clock(dc, crtc_state, rgb->clk_parent, in tegra_rgb_encoder_atomic_check()
217 struct tegra_rgb *rgb; in tegra_dc_rgb_probe() local
224 rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL); in tegra_dc_rgb_probe()
225 if (!rgb) in tegra_dc_rgb_probe()
228 rgb->output.dev = dc->dev; in tegra_dc_rgb_probe()
229 rgb->output.of_node = np; in tegra_dc_rgb_probe()
230 rgb->dc = dc; in tegra_dc_rgb_probe()
232 err = tegra_output_probe(&rgb->output); in tegra_dc_rgb_probe()
236 rgb->clk = devm_clk_get(dc->dev, NULL); in tegra_dc_rgb_probe()
237 if (IS_ERR(rgb->clk)) { in tegra_dc_rgb_probe()
239 return PTR_ERR(rgb->clk); in tegra_dc_rgb_probe()
242 rgb->clk_parent = devm_clk_get(dc->dev, "parent"); in tegra_dc_rgb_probe()
243 if (IS_ERR(rgb->clk_parent)) { in tegra_dc_rgb_probe()
245 return PTR_ERR(rgb->clk_parent); in tegra_dc_rgb_probe()
248 err = clk_set_parent(rgb->clk, rgb->clk_parent); in tegra_dc_rgb_probe()
254 dc->rgb = &rgb->output; in tegra_dc_rgb_probe()
261 if (!dc->rgb) in tegra_dc_rgb_remove()
264 tegra_output_remove(dc->rgb); in tegra_dc_rgb_remove()
265 dc->rgb = NULL; in tegra_dc_rgb_remove()
272 struct tegra_output *output = dc->rgb; in tegra_dc_rgb_init()
275 if (!dc->rgb) in tegra_dc_rgb_init()
311 if (dc->rgb) in tegra_dc_rgb_exit()
312 tegra_output_exit(dc->rgb); in tegra_dc_rgb_exit()