SCALERPATH_VG0 = 0x1,
};
+enum decon_enhance_path {
+ ENHANCEPATH_ENHANCE_ALL_OFF = 0x0,
+ ENHANCEPATH_DQE_ON = 0x2,
+};
+
enum decon_path_cfg {
PATH_CON_ID_DSIM_IF0 = 0,
PATH_CON_ID_DSIM_IF1 = 1,
void decon_reg_set_int(u32 id, struct decon_mode_info *psr, u32 en);
int decon_reg_get_interrupt_and_clear(u32 id, u32 *ext_irq);
+void decon_reg_set_data_path(u32 id, enum decon_data_path d_path,
+ enum decon_scaler_path s_path, enum decon_enhance_path e_path);
+void decon_reg_get_data_path(u32 id, enum decon_data_path *d_path,
+ enum decon_scaler_path *s_path, enum decon_enhance_path *e_path);
+
void decon_reg_set_start_crc(u32 id, u32 en);
void decon_reg_set_select_crc_bits(u32 id, u32 bit_sel);
void decon_reg_get_crc_data(u32 id, u32 *w0_data, u32 *w1_data);
/* TODO: this will be removed later */
void decon_reg_update_req_global(u32 id);
+void decon_reg_update_req_dqe(u32 id);
/*********************************************************************/
#endif /* __SAMSUNG_DECON_CAL_H__ */
}
-static void decon_reg_set_data_path(u32 id, enum decon_data_path d_path,
- enum decon_scaler_path s_path)
+void decon_reg_set_data_path(u32 id, enum decon_data_path d_path,
+ enum decon_scaler_path s_path, enum decon_enhance_path e_path)
{
u32 val, mask;
- val = SCALER_PATH_F(s_path) | COMP_OUTIF_PATH_F(d_path);
- mask = SCALER_PATH_MASK | COMP_OUTIF_PATH_MASK;
+ val = SCALER_PATH_F(s_path)
+ | ENHANCE_PATH_F(e_path)
+ | COMP_OUTIF_PATH_F(d_path);
+ mask = SCALER_PATH_MASK | ENHANCE_PATH_MASK | COMP_OUTIF_PATH_MASK;
decon_write_mask(id, DATA_PATH_CONTROL_2, val, mask);
}
+void decon_reg_get_data_path(u32 id, enum decon_data_path *d_path,
+ enum decon_scaler_path *s_path, enum decon_enhance_path *e_path)
+{
+ u32 val;
+
+ val = decon_read(id, DATA_PATH_CONTROL_2);
+ *d_path = COMP_OUTIF_PATH_GET(val);
+ *s_path = SCALER_PATH_GET(val);
+ *e_path = ENHANCE_PATH_GET(val);
+}
+
/*
* Check major configuration of data_path_control
* DSCC[7]
u32 overlap_w = 0;
enum decon_data_path d_path = DPATH_DSCENC0_OUTFIFO0_DSIMIF0;
enum decon_scaler_path s_path = SCALERPATH_OFF;
+ enum decon_enhance_path e_path = ENHANCEPATH_ENHANCE_ALL_OFF;
struct decon_lcd *lcd_info = p->lcd_info;
struct decon_mode_info *psr = &p->psr;
decon_err("[decon%d] dsc_cnt=%d : not supported\n",
id, lcd_info->dsc_cnt);
- decon_reg_set_data_path(id, d_path, s_path);
+ decon_reg_set_data_path(id, d_path, s_path, e_path);
/* call decon_reg_config_data_path_size () inside */
dsc_reg_init(id, p, overlap_w, 0);
} else {
DPATH_NOCOMP_OUTFIFO0_DSIMIF0 :
DECON2_NOCOMP_OUTFIFO0_DPIF;
- decon_reg_set_data_path(id, d_path, s_path);
+ decon_reg_set_data_path(id, d_path, s_path, e_path);
decon_reg_config_data_path_size(id,
lcd_info->xres, lcd_info->yres, overlap_w, NULL, p);
struct decon_mode_info *psr = &p->psr;
enum decon_data_path d_path = DPATH_DSCENC0_OUTFIFO0_DSIMIF0;
enum decon_scaler_path s_path = SCALERPATH_OFF;
+ enum decon_enhance_path e_path = ENHANCEPATH_ENHANCE_ALL_OFF;
enum decon_rgb_order rgb_order = DECON_RGB;
enum decon_dsi_mode dsi_mode = psr->dsi_mode;
u32 overlap_w = 0; /* default=0 : range=[0, 32] & (multiples of 2) */
decon_err("[decon%d] dsc_cnt=%d : not supported\n",
id, lcd_info->dsc_cnt);
- decon_reg_set_data_path(id, d_path, s_path);
+ decon_reg_set_data_path(id, d_path, s_path, e_path);
/* call decon_reg_config_data_path_size () inside */
dsc_reg_init(id, p, overlap_w, 0);
} else {
DPATH_NOCOMP_OUTFIFO0_DSIMIF0 :
DECON2_NOCOMP_OUTFIFO0_DPIF;
- decon_reg_set_data_path(id, d_path, s_path);
+ decon_reg_set_data_path(id, d_path, s_path, e_path);
decon_reg_config_data_path_size(id,
lcd_info->xres, lcd_info->yres, overlap_w, NULL, p);
/* perframe stop */
decon_reg_per_frame_off(id);
-
+#if defined(CONFIG_EXYNOS_DECON_DQE)
+ decon_reg_update_req_dqe(id);
+#endif
decon_reg_update_req_global(id);
/* timeout : 1 / fps + 20% margin */
/* instant stop */
decon_reg_direct_on_off(id, 0);
-
+#if defined(CONFIG_EXYNOS_DECON_DQE)
+ decon_reg_update_req_dqe(id);
+#endif
decon_reg_update_req_global(id);
#if defined(CONFIG_EXYNOS_DISPLAYPORT)
SHADOW_REG_UPDATE_REQ_GLOBAL);
}
+void decon_reg_update_req_dqe(u32 id)
+{
+ if (id != 0)
+ return;
+
+ decon_write_mask(id, SHADOW_REG_UPDATE_REQ, ~0,
+ SHADOW_REG_UPDATE_REQ_DQE);
+}
+
int decon_reg_init(u32 id, u32 dsi_idx, struct decon_param *p)
{
struct decon_lcd *lcd_info = p->lcd_info;
struct decon_mode_info *psr = &p->psr;
enum decon_scaler_path s_path = SCALERPATH_OFF;
+ enum decon_enhance_path e_path = ENHANCEPATH_ENHANCE_ALL_OFF;
/*
* DECON does not need to start, if DECON is already
/* FIXME: DECON_T dedicated to PRE_WB */
if (p->psr.out_type == DECON_OUT_WB)
- decon_reg_set_data_path(id, DPATH_WBPRE_ONLY, s_path);
+ decon_reg_set_data_path(id, DPATH_WBPRE_ONLY, s_path, e_path);
/* asserted interrupt should be cleared before initializing decon hw */
decon_reg_clear_int_all(id);
int ret = 0;
decon_reg_direct_on_off(id, 1);
+#if defined(CONFIG_EXYNOS_DECON_DQE)
+ decon_reg_update_req_dqe(id);
+#endif
decon_reg_update_req_global(id);
/*