Lines Matching refs:dc

20 	struct tegra_dc *dc;  member
80 static void tegra_dc_write_regs(struct tegra_dc *dc, in tegra_dc_write_regs() argument
87 tegra_dc_writel(dc, table[i].value, table[i].offset); in tegra_dc_write_regs()
130 tegra_dc_write_regs(rgb->dc, rgb_disable, ARRAY_SIZE(rgb_disable)); in tegra_rgb_encoder_disable()
131 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_disable()
146 tegra_dc_write_regs(rgb->dc, rgb_enable, ARRAY_SIZE(rgb_enable)); in tegra_rgb_encoder_enable()
149 tegra_dc_writel(rgb->dc, value, DC_DISP_DATA_ENABLE_OPTIONS); in tegra_rgb_encoder_enable()
152 value = tegra_dc_readl(rgb->dc, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_enable()
155 tegra_dc_writel(rgb->dc, value, DC_COM_PIN_OUTPUT_POLARITY(1)); in tegra_rgb_encoder_enable()
160 tegra_dc_writel(rgb->dc, value, DC_DISP_DISP_INTERFACE_CONTROL); in tegra_rgb_encoder_enable()
164 tegra_dc_writel(rgb->dc, value, DC_DISP_SHIFT_CLOCK_OPTIONS); in tegra_rgb_encoder_enable()
166 tegra_dc_commit(rgb->dc); in tegra_rgb_encoder_enable()
178 struct tegra_dc *dc = to_tegra_dc(conn_state->crtc); in tegra_rgb_encoder_atomic_check() local
203 err = tegra_dc_state_setup_clock(dc, crtc_state, rgb->clk_parent, in tegra_rgb_encoder_atomic_check()
219 int tegra_dc_rgb_probe(struct tegra_dc *dc) in tegra_dc_rgb_probe() argument
225 np = of_get_child_by_name(dc->dev->of_node, "rgb"); in tegra_dc_rgb_probe()
229 rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL); in tegra_dc_rgb_probe()
233 rgb->output.dev = dc->dev; in tegra_dc_rgb_probe()
235 rgb->dc = dc; in tegra_dc_rgb_probe()
241 rgb->clk = devm_clk_get(dc->dev, NULL); in tegra_dc_rgb_probe()
243 dev_err(dc->dev, "failed to get clock\n"); in tegra_dc_rgb_probe()
247 rgb->clk_parent = devm_clk_get(dc->dev, "parent"); in tegra_dc_rgb_probe()
249 dev_err(dc->dev, "failed to get parent clock\n"); in tegra_dc_rgb_probe()
255 dev_err(dc->dev, "failed to set parent clock: %d\n", err); in tegra_dc_rgb_probe()
259 dc->rgb = &rgb->output; in tegra_dc_rgb_probe()
264 int tegra_dc_rgb_remove(struct tegra_dc *dc) in tegra_dc_rgb_remove() argument
266 if (!dc->rgb) in tegra_dc_rgb_remove()
269 tegra_output_remove(dc->rgb); in tegra_dc_rgb_remove()
270 dc->rgb = NULL; in tegra_dc_rgb_remove()
275 int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc) in tegra_dc_rgb_init() argument
277 struct tegra_output *output = dc->rgb; in tegra_dc_rgb_init()
280 if (!dc->rgb) in tegra_dc_rgb_init()
309 output->encoder.possible_crtcs = drm_crtc_mask(&dc->base); in tegra_dc_rgb_init()
314 int tegra_dc_rgb_exit(struct tegra_dc *dc) in tegra_dc_rgb_exit() argument
316 if (dc->rgb) in tegra_dc_rgb_exit()
317 tegra_output_exit(dc->rgb); in tegra_dc_rgb_exit()