Lines Matching refs:rgb

145 	struct tegra_rgb *rgb = to_rgb(output);  in tegra_rgb_encoder_mode_set()  local
151 tegra_dc_write_regs(rgb->dc, rgb_enable, ARRAY_SIZE(rgb_enable)); in tegra_rgb_encoder_mode_set()
154 tegra_dc_writel(rgb->dc, value, DC_DISP_DATA_ENABLE_OPTIONS); in tegra_rgb_encoder_mode_set()
157 value = tegra_dc_readl(rgb->dc, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_mode_set()
160 tegra_dc_writel(rgb->dc, value, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_mode_set()
165 tegra_dc_writel(rgb->dc, value, DC_DISP_DISP_INTERFACE_CONTROL); in tegra_rgb_encoder_mode_set()
169 tegra_dc_writel(rgb->dc, value, DC_DISP_SHIFT_CLOCK_OPTIONS); in tegra_rgb_encoder_mode_set()
171 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_mode_set()
180 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_disable() local
185 tegra_dc_write_regs(rgb->dc, rgb_disable, ARRAY_SIZE(rgb_disable)); in tegra_rgb_encoder_disable()
186 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_disable()
200 struct tegra_rgb *rgb = to_rgb(output); in tegra_rgb_encoder_atomic_check() local
220 div = ((clk_get_rate(rgb->clk) * 2) / pclk) - 2; in tegra_rgb_encoder_atomic_check()
223 err = tegra_dc_state_setup_clock(dc, crtc_state, rgb->clk_parent, in tegra_rgb_encoder_atomic_check()
245 struct tegra_rgb *rgb; in tegra_dc_rgb_probe() local
252 rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL); in tegra_dc_rgb_probe()
253 if (!rgb) in tegra_dc_rgb_probe()
256 rgb->output.dev = dc->dev; in tegra_dc_rgb_probe()
257 rgb->output.of_node = np; in tegra_dc_rgb_probe()
258 rgb->dc = dc; in tegra_dc_rgb_probe()
260 err = tegra_output_probe(&rgb->output); in tegra_dc_rgb_probe()
264 rgb->clk = devm_clk_get(dc->dev, NULL); in tegra_dc_rgb_probe()
265 if (IS_ERR(rgb->clk)) { in tegra_dc_rgb_probe()
267 return PTR_ERR(rgb->clk); in tegra_dc_rgb_probe()
270 rgb->clk_parent = devm_clk_get(dc->dev, "parent"); in tegra_dc_rgb_probe()
271 if (IS_ERR(rgb->clk_parent)) { in tegra_dc_rgb_probe()
273 return PTR_ERR(rgb->clk_parent); in tegra_dc_rgb_probe()
276 err = clk_set_parent(rgb->clk, rgb->clk_parent); in tegra_dc_rgb_probe()
282 dc->rgb = &rgb->output; in tegra_dc_rgb_probe()
289 if (!dc->rgb) in tegra_dc_rgb_remove()
292 tegra_output_remove(dc->rgb); in tegra_dc_rgb_remove()
293 dc->rgb = NULL; in tegra_dc_rgb_remove()
300 struct tegra_output *output = dc->rgb; in tegra_dc_rgb_init()
303 if (!dc->rgb) in tegra_dc_rgb_init()
339 if (dc->rgb) in tegra_dc_rgb_exit()
340 tegra_output_exit(dc->rgb); in tegra_dc_rgb_exit()