n = lcd_debug_info_len(len + offset);
len += snprintf((buf+len), n,
"driver version: %s\n"
- "panel_type: %s, chip: %d, mode: %s, status: %d\n"
+ "panel_type: %s, chip: %d, mode: %s, status: %d, viu_sel: %d\n"
"key_valid: %d, config_load: %d\n"
"fr_auto_policy: %d\n",
lcd_drv->version,
pconf->lcd_propname, lcd_drv->data->chip_type,
- lcd_mode_mode_to_str(lcd_drv->lcd_mode), lcd_drv->lcd_status,
+ lcd_mode_mode_to_str(lcd_drv->lcd_mode),
+ lcd_drv->lcd_status, lcd_drv->viu_sel,
lcd_drv->lcd_key_valid, lcd_drv->lcd_config_load,
lcd_drv->fr_auto_policy);
if (clk_bit < 0xff)
vout_func_vcbus_setb(VPU_VENCX_CLK_CTRL, clk_sel, clk_bit, 1);
+ /* special setting for dummy mode */
+ if (index == 1) {
+ if (vinfo->mode == VMODE_DUMMY_LCD) {
+ /* viu1 use encl_vsync */
+ vout_func_vcbus_setb(VPU_VIU_VENC_MUX_CTRL, 0, 4, 2);
+ vout_func_vcbus_setb(VPU_VIU_VENC_MUX_CTRL, 1, 20, 1);
+ vout_func_vcbus_setb(VPP_WRBAK_CTRL, 1, 11, 1);
+ } else {
+ vout_func_vcbus_setb(VPU_VIU_VENC_MUX_CTRL, 0, 20, 1);
+ vout_func_vcbus_setb(VPP_WRBAK_CTRL, 0, 11, 1);
+ }
+ }
+
#if 0
VOUTPR("%s: %d, mux_sel=%d, clk_sel=%d\n",
__func__, index, mux_sel, clk_sel);
.viu_mux = VIU_MUX_MAX,
.vout_device = NULL,
},
+ {
+ .name = "dummy_panel",
+ .mode = VMODE_DUMMY_LCD,
+ .width = 1920,
+ .height = 1080,
+ .field_height = 1080,
+ .aspect_ratio_num = 16,
+ .aspect_ratio_den = 9,
+ .sync_duration_num = 60,
+ .sync_duration_den = 1,
+ .video_clk = 148500000,
+ .htotal = 2200,
+ .vtotal = 1125,
+ .fr_adj_type = VOUT_FR_ADJ_NONE,
+ .viu_color_fmt = COLOR_FMT_RGB444,
+ .viu_mux = VIU_MUX_MAX,
+ .vout_device = NULL,
+ },
};
static struct vinfo_s *nulldisp_get_current_info(void)
return count;
}
+static ssize_t vout_dummy_store(struct class *class,
+ struct class_attribute *attr, const char *buf, size_t count)
+{
+ unsigned int tmp[4], sync_duration;
+ enum vmode_e mode;
+ int ret;
+
+ mutex_lock(&vout_serve_mutex);
+ mode = VMODE_DUMMY_LCD;
+ ret = sscanf(buf, "%d %d %d %d", &tmp[0], &tmp[1], &tmp[2], &tmp[3]);
+ if (ret == 2) {
+ nulldisp_vinfo[2].width = tmp[0];
+ nulldisp_vinfo[2].height = tmp[1];
+ nulldisp_vinfo[2].field_height = tmp[1];
+ VOUTPR("set dummy size: %d x %d\n", tmp[0], tmp[1]);
+ vout_notifier_call_chain(VOUT_EVENT_MODE_CHANGE, &mode);
+ } else if (ret == 4) {
+ nulldisp_vinfo[2].width = tmp[0];
+ nulldisp_vinfo[2].height = tmp[1];
+ nulldisp_vinfo[2].field_height = tmp[1];
+ nulldisp_vinfo[2].sync_duration_num = tmp[2];
+ nulldisp_vinfo[2].sync_duration_den = tmp[3];
+ sync_duration = (tmp[2] * 100) / tmp[3];
+ VOUTPR("set dummy size: %d x %d, frame_rate: %d.%02dHz\n",
+ tmp[0], tmp[1],
+ (sync_duration / 100), (sync_duration % 100));
+ vout_notifier_call_chain(VOUT_EVENT_MODE_CHANGE, &mode);
+ } else {
+ VOUTERR("invalid data\n");
+ }
+ mutex_unlock(&vout_serve_mutex);
+
+ return count;
+}
+
static ssize_t vout_axis_show(struct class *class,
struct class_attribute *attr, char *buf)
{
static struct class_attribute vout_class_attrs[] = {
__ATTR(mode, 0644, vout_mode_show, vout_mode_store),
+ __ATTR(dummy, 0644, NULL, vout_dummy_store),
__ATTR(axis, 0644, vout_axis_show, vout_axis_store),
__ATTR(fr_policy, 0644,
vout_fr_policy_show, vout_fr_policy_store),