1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2016 Nexell Co., Ltd.
12 #include <asm/arch/display.h>
14 #include "soc/s5pxx18_soc_disptop.h"
16 static int rgb_switch(int module, int input, struct dp_sync_info *sync,
17 struct dp_rgb_dev *dev)
19 int mpu = dev->lcd_mpu_type;
30 printf("Fail, %s nuknown module %d\n", __func__, module);
34 nx_disp_top_set_primary_mux(sel);
38 void nx_rgb_display(int module,
39 struct dp_sync_info *sync, struct dp_ctrl_info *ctrl,
40 struct dp_plane_top *top, struct dp_plane_info *planes,
41 struct dp_rgb_dev *dev)
43 struct dp_plane_info *plane = planes;
44 int input = module == 0 ? DP_DEVICE_DP0 : DP_DEVICE_DP1;
45 int count = top->plane_num;
48 printf("RGB: dp.%d\n", module);
50 dp_control_init(module);
51 dp_plane_init(module);
54 dp_plane_screen_setup(module, top);
56 for (i = 0; count > i; i++, plane++) {
59 dp_plane_layer_setup(module, plane);
60 dp_plane_layer_enable(module, plane, 1);
63 dp_plane_screen_enable(module, 1);
65 rgb_switch(module, input, sync, dev);
67 dp_control_setup(module, sync, ctrl);
68 dp_control_enable(module, 1);