Lines Matching refs:dc

20 	struct tegra_dc *dc;  member
81 static void tegra_dc_write_regs(struct tegra_dc *dc, in tegra_dc_write_regs() argument
88 tegra_dc_writel(dc, table[i].value, table[i].offset); in tegra_dc_write_regs()
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()
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()
198 struct tegra_dc *dc = to_tegra_dc(conn_state->crtc); in tegra_rgb_encoder_atomic_check() local
223 err = tegra_dc_state_setup_clock(dc, crtc_state, rgb->clk_parent, in tegra_rgb_encoder_atomic_check()
242 int tegra_dc_rgb_probe(struct tegra_dc *dc) in tegra_dc_rgb_probe() argument
248 np = of_get_child_by_name(dc->dev->of_node, "rgb"); in tegra_dc_rgb_probe()
252 rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL); in tegra_dc_rgb_probe()
256 rgb->output.dev = dc->dev; in tegra_dc_rgb_probe()
258 rgb->dc = dc; in tegra_dc_rgb_probe()
264 rgb->clk = devm_clk_get(dc->dev, NULL); in tegra_dc_rgb_probe()
266 dev_err(dc->dev, "failed to get clock\n"); in tegra_dc_rgb_probe()
270 rgb->clk_parent = devm_clk_get(dc->dev, "parent"); in tegra_dc_rgb_probe()
272 dev_err(dc->dev, "failed to get parent clock\n"); in tegra_dc_rgb_probe()
278 dev_err(dc->dev, "failed to set parent clock: %d\n", err); in tegra_dc_rgb_probe()
282 dc->rgb = &rgb->output; in tegra_dc_rgb_probe()
287 int tegra_dc_rgb_remove(struct tegra_dc *dc) in tegra_dc_rgb_remove() argument
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()
298 int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc) in tegra_dc_rgb_init() argument
300 struct tegra_output *output = dc->rgb; in tegra_dc_rgb_init()
303 if (!dc->rgb) in tegra_dc_rgb_init()
332 output->encoder.possible_crtcs = drm_crtc_mask(&dc->base); in tegra_dc_rgb_init()
337 int tegra_dc_rgb_exit(struct tegra_dc *dc) in tegra_dc_rgb_exit() argument
339 if (dc->rgb) in tegra_dc_rgb_exit()
340 tegra_output_exit(dc->rgb); in tegra_dc_rgb_exit()