本文整理汇总了C++中dsim_err函数的典型用法代码示例。如果您正苦于以下问题:C++ dsim_err函数的具体用法?C++ dsim_err怎么用?C++ dsim_err使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dsim_err函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: s6d7aa0x62_displayon
static int s6d7aa0x62_displayon(struct dsim_device *dsim)
{
int ret = 0;
dsim_info("MDD : %s was called\n", __func__);
ret = dsim_write_hl_data(dsim, SEQ_DISPLAY_ON, ARRAY_SIZE(SEQ_DISPLAY_ON));
if (ret < 0) {
dsim_err("%s : fail to write CMD : DISPLAY_ON\n", __func__);
goto displayon_err;
}
msleep(20);
ret = dsim_write_hl_data(dsim, SEQ_BRIGHTNESS_1, ARRAY_SIZE(SEQ_BRIGHTNESS_1));
if (ret < 0) {
dsim_err("%s : fail to write CMD : SEQ_BRIGHTNESS_1\n", __func__);
goto displayon_err;
}
ret = dsim_write_hl_data(dsim, SEQ_BRIGHTNESS_2, ARRAY_SIZE(SEQ_BRIGHTNESS_2));
if (ret < 0) {
dsim_err("%s : fail to write CMD : SEQ_BRIGHTNESS_2\n", __func__);
goto displayon_err;
}
ret = dsim_write_hl_data(dsim, SEQ_BRIGHTNESS_3, ARRAY_SIZE(SEQ_BRIGHTNESS_3));
if (ret < 0) {
dsim_err("%s : fail to write CMD : SEQ_BRIGHTNESS_3\n", __func__);
goto displayon_err;
}
displayon_err:
return ret;
}
示例2: s6e3ha0_wqhd_exit
static int s6e3ha0_wqhd_exit(struct dsim_device *dsim)
{
int ret = 0;
dsim_info("MDD : %s was called\n", __func__);
ret = dsim_write_hl_data(dsim, SEQ_DISPLAY_OFF, ARRAY_SIZE(SEQ_DISPLAY_OFF));
if (ret < 0) {
dsim_err("%s : fail to write CMD : DISPLAY_OFF\n", __func__);
goto exit_err;
}
msleep(10);
ret = dsim_write_hl_data(dsim, SEQ_SLEEP_IN, ARRAY_SIZE(SEQ_SLEEP_IN));
if (ret < 0) {
dsim_err("%s : fail to write CMD : SLEEP_IN\n", __func__);
goto exit_err;
}
msleep(120);
exit_err:
return ret;
}
示例3: dsim_panel_set_elvss
static void dsim_panel_set_elvss(struct dsim_device *dsim)
{
u8 *elvss = NULL;
unsigned char SEQ_ELVSS[ELVSS_LEN_MAX] = {0, };
struct panel_private *panel = &dsim->priv;
bool bIsHbm = (LEVEL_IS_HBM(panel->auto_brightness) && (panel->bd->props.brightness == panel->bd->props.max_brightness));
SEQ_ELVSS[0] = aid_dimming_dynamic.elvss_reg;
elvss = get_elvss_from_index(dsim, dsim->priv.br_index, dsim->priv.caps_enable);
if (elvss == NULL) {
dsim_err("%s : failed to get elvss value\n", __func__);
return;
}
memcpy(&SEQ_ELVSS[1], dsim->priv.elvss_set, aid_dimming_dynamic.elvss_len - 1);
memcpy(SEQ_ELVSS, elvss, aid_dimming_dynamic.elvss_cmd_cnt);
SEQ_ELVSS[aid_dimming_dynamic.elvss_len - 1] += dsim_panel_get_elvssoffset(dsim);
if(bIsHbm)
SEQ_ELVSS[2] = 0x0A;
if(dynamic_lcd_type == LCD_TYPE_S6E3HA2_WQHD) {
dsim_info("%s elvss ha2\n", __func__);
if (dsim_write_hl_data(dsim, SEQ_ELVSS, aid_dimming_dynamic.elvss_len) < 0)
dsim_err("%s : failed to write elvss \n", __func__);
} else {
dsim_info("%s elvss ha3/hf3\n", __func__);
memcpy(dsim->priv.tset, &SEQ_ELVSS[1], aid_dimming_dynamic.elvss_len - 1);
dsim_panel_set_tset(dsim, 1);
}
}
示例4: s6d7aa0x62_exit
static int s6d7aa0x62_exit(struct dsim_device *dsim)
{
int ret = 0;
dsim_info("MDD : %s was called\n", __func__);
ret = dsim_write_hl_data(dsim, SEQ_DISPLAY_OFF, ARRAY_SIZE(SEQ_DISPLAY_OFF));
if (ret < 0) {
dsim_err("%s : fail to write CMD : DISPLAY_OFF\n", __func__);
goto exit_err;
}
msleep(10);
ret = dsim_write_hl_data(dsim, SEQ_SLEEP_IN, ARRAY_SIZE(SEQ_SLEEP_IN));
if (ret < 0) {
dsim_err("%s : fail to write CMD : SLEEP_IN\n", __func__);
goto exit_err;
}
msleep(150);
ret = gpio_request_one(backlight_on, GPIOF_OUT_INIT_LOW, "BLIC_ON");
gpio_free(backlight_on);
usleep_range(10000, 11000);
exit_err:
return ret;
}
示例5: dsim_panel_set_acl
static int dsim_panel_set_acl(struct dsim_device *dsim, int force)
{
int ret = 0, level = ACL_STATUS_8P;
struct panel_private *panel = &dsim->priv;
if (panel == NULL) {
dsim_err("%s : panel is NULL\n", __func__);
goto exit;
}
if (dsim->priv.siop_enable || LEVEL_IS_HBM(dsim->priv.auto_brightness)) // auto acl or hbm is acl on
goto acl_update;
if (!dsim->priv.acl_enable)
level = ACL_STATUS_0P;
acl_update:
if(force || dsim->priv.current_acl != panel->acl_cutoff_tbl[level][1]) {
if((ret = dsim_write_hl_data(dsim, panel->acl_opr_tbl[level], 2)) < 0) {
dsim_err("fail to write acl opr command.\n");
goto exit;
}
if((ret = dsim_write_hl_data(dsim, panel->acl_cutoff_tbl[level], 2)) < 0) {
dsim_err("fail to write acl command.\n");
goto exit;
}
dsim->priv.current_acl = panel->acl_cutoff_tbl[level][1];
dsim_info("acl: %d, auto_brightness: %d\n", dsim->priv.current_acl, dsim->priv.auto_brightness);
}
exit:
if (!ret)
ret = -EPERM;
return ret;
}
示例6: dsim_panel_aid_ctrl_for_hmt
static void dsim_panel_aid_ctrl_for_hmt(struct dsim_device *dsim)
{
u8 *aid = NULL;
aid = get_aid_from_index_for_hmt(dsim, dsim->priv.hmt_br_index);
if (aid == NULL) {
dsim_err("%s : faield to get aid value\n", __func__);
return;
}
if (dsim_write_hl_data(dsim, aid, AID_CMD_CNT + 1) < 0)
dsim_err("%s : failed to write hmt aid \n", __func__);
}
示例7: dsim_panel_gamma_ctrl_for_hmt
static void dsim_panel_gamma_ctrl_for_hmt(struct dsim_device *dsim)
{
u8 *gamma = NULL;
gamma = get_gamma_from_index_for_hmt(dsim, dsim->priv.hmt_br_index);
if (gamma == NULL) {
dsim_err("%s :faied to get gamma\n", __func__);
return;
}
if (dsim_write_hl_data(dsim, gamma, GAMMA_CMD_CNT) < 0)
dsim_err("%s : failed to write hmt gamma \n", __func__);
}
示例8: dsim_reg_get_dphy_timing
static int dsim_reg_get_dphy_timing(unsigned long hs_clk, unsigned long esc_clk, struct dphy_timing_value *t)
{
int i = sizeof(dphy_timing) / sizeof(dphy_timing[0]) - 1;
while (i) {
if ((dphy_timing[i][0] * MHZ) < hs_clk) {
i--;
continue;
} else {
t->bps = hs_clk;
t->clk_prepare = dphy_timing[i][1];
t->clk_zero = dphy_timing[i][2];
t->clk_post = dphy_timing[i][3];
t->clk_trail = dphy_timing[i][4];
t->hs_prepare = dphy_timing[i][5];
t->hs_zero = dphy_timing[i][6];
t->hs_trail = dphy_timing[i][7];
t->lpx = dphy_timing[i][8];
t->hs_exit = dphy_timing[i][9];
t->m_pllctl = dphy_timing[i][10];
break;
}
}
if (!i) {
dsim_err("%ld hs clock can't find proper dphy timing values\n", hs_clk);
return -EINVAL;
}
if ((esc_clk > 20 * MHZ) || (esc_clk < 7 * MHZ)) {
dsim_err("%ld can't be used as escape clock\n", esc_clk);
return -EINVAL;
}
i = sizeof(b_dphyctl) / sizeof(b_dphyctl[0]) - 1;
while (i) {
if ((b_dphyctl[i][0] * MHZ) < esc_clk) {
i--;
continue;
} else {
t->b_dphyctl = b_dphyctl[i][1];
break;
}
}
if (!i) {
dsim_err("%ld esc clock can't find proper dphy timing values\n", esc_clk);
return -EINVAL;
}
return 0;
}
示例9: dsim_panel_probe
static int dsim_panel_probe(struct dsim_device *dsim)
{
int ret = 0;
struct panel_private *panel = &dsim->priv;
#if defined(CONFIG_EXYNOS_DECON_MDNIE_LITE)
u16 coordinate[2] = {0, };
#endif
dsim->lcd = lcd_device_register("panel", dsim->dev, &dsim->priv, NULL);
if (IS_ERR(dsim->lcd)) {
dsim_err("%s : faield to register lcd device\n", __func__);
ret = PTR_ERR(dsim->lcd);
goto probe_err;
}
ret = dsim_backlight_probe(dsim);
if (ret) {
dsim_err("%s : failed to prbe backlight driver\n", __func__);
goto probe_err;
}
panel->lcdConnected = PANEL_CONNECTED;
panel->state = PANEL_STATE_RESUMED;
panel->temperature = NORMAL_TEMPERATURE;
panel->acl_enable = 0;
panel->current_acl = 0;
panel->auto_brightness = 0;
panel->siop_enable = 0;
panel->current_hbm = 0;
panel->current_vint = 0;
mutex_init(&panel->lock);
#ifdef CONFIG_EXYNOS_DECON_LCD_MCD
panel->mcd_on = 0;
#endif
if (panel->ops->probe) {
ret = panel->ops->probe(dsim);
if (ret) {
dsim_err("%s : failed to probe panel\n", __func__);
goto probe_err;
}
}
#if defined(CONFIG_EXYNOS_DECON_LCD_SYSFS)
lcd_init_sysfs(dsim);
#endif
#if defined(CONFIG_EXYNOS_DECON_MDNIE_LITE)
coordinate[0] = (u16)panel->coordinate[0];
coordinate[1] = (u16)panel->coordinate[1];
mdnie_register(&dsim->lcd->dev, dsim, (mdnie_w)mdnie_lite_send_seq, (mdnie_r)mdnie_lite_read, coordinate, &tune_info);
#endif
probe_err:
return ret;
}
示例10: get_acutal_br_index_for_hmt
static int get_acutal_br_index_for_hmt(struct dsim_device *dsim, int br)
{
int i;
int min;
int gap;
int index = 0;
struct panel_private *panel = &dsim->priv;
struct SmtDimInfo *dimming_info = panel->hmt_dim_info;
if (dimming_info == NULL) {
dsim_err("%s : dimming_info is NULL\n", __func__);
return 0;
}
min = HMT_MAX_BRIGHTNESS;
for (i = 0; i < MAX_BR_INFO; i++) {
if (br > dimming_info[i].br)
gap = br - dimming_info[i].br;
else
gap = dimming_info[i].br - br;
if (gap == 0) {
index = i;
break;
}
if (gap < min) {
min = gap;
index = i;
}
}
return index;
}
示例11: dsim_reg_set_config
void dsim_reg_set_config(u32 mode, u32 data_lane_cnt)
{
u32 val;
u32 mask;
if (mode == VIDEO_MODE) {
val = DSIM_CONFIG_VIDEO_MODE | DSIM_CONFIG_BURST_MODE |
DSIM_CONFIG_HFP_DISABLE | DSIM_CONFIG_MFLUSH_VS;
} else if (mode == COMMAND_MODE) {
val = DSIM_CONFIG_CLKLANE_STOP_START; /* In Command mode Clk lane stop disable */
} else {
dsim_err("This DDI is not MIPI interface.\n");
return;
}
val |= DSIM_CONFIG_EOT_R03_DISABLE |
DSIM_CONFIG_NUM_OF_DATA_LANE(data_lane_cnt - 1) |
DSIM_CONFIG_PIXEL_FORMAT(DSIM_PIXEL_FORMAT_RGB24);
mask = DSIM_CONFIG_CLKLANE_STOP_START | DSIM_CONFIG_MFLUSH_VS | DSIM_CONFIG_EOT_R03_DISABLE |
DSIM_CONFIG_BURST_MODE | DSIM_CONFIG_VIDEO_MODE | DSIM_CONFIG_HFP_DISABLE |
DSIM_CONFIG_PIXEL_FORMAT_MASK | DSIM_CONFIG_NUM_OF_DATA_LANE_MASK;
dsim_write_mask(DSIM_CONFIG, val, mask);
}
示例12: lcd_enable
void lcd_enable()
{
int id = 0;
if (dsim_wr_data(id, MIPI_DSI_DCS_SHORT_WRITE,
SEQ_DISPLAY_ON[0], 0) < 0)
dsim_err("fail to send SEQ_DISPLAY_ON command.\n");
}
示例13: dsim_panel_set_elvss
static void dsim_panel_set_elvss(struct dsim_device *dsim)
{
u8 *elvss = NULL;
unsigned char SEQ_ELVSS[ELVSS_LEN] = {ELVSS_REG, };
elvss = get_elvss_from_index(dsim, dsim->priv.br_index, dsim->priv.caps_enable);
if (elvss == NULL) {
dsim_err("%s : failed to get elvss value\n", __func__);
return;
}
memcpy(&SEQ_ELVSS[1], dsim->priv.elvss_set, ELVSS_LEN - 1);
memcpy(SEQ_ELVSS, elvss, ELVSS_CMD_CNT);
SEQ_ELVSS[ELVSS_LEN - 1] += dsim_panel_get_elvssoffset(dsim);
if (dsim_write_hl_data(dsim, SEQ_ELVSS, ELVSS_LEN) < 0)
dsim_err("%s : failed to write elvss \n", __func__);
}
示例14: dsim_panel_aid_ctrl
static void dsim_panel_aid_ctrl(struct dsim_device *dsim)
{
u8 *aid = NULL;
unsigned char SEQ_AID[AID_CMD_CNT_MAX] = { 0, };
aid = get_aid_from_index(dsim, dsim->priv.br_index);
if (aid == NULL) {
dsim_err("%s : failed to get elvss value\n", __func__);
return;
}
SEQ_AID[0] = aid[0];
memcpy(&SEQ_AID[1], dsim->priv.aid, aid_dimming_dynamic.aid_cmd_cnt - 1); // HA2/HF3 not read. but no danger
memcpy(&SEQ_AID[aid_dimming_dynamic.aid_reg_offset], aid + 1, aid_dimming_dynamic.aid_cmd_cnt - aid_dimming_dynamic.aid_reg_offset + 1);
if (dsim_write_hl_data(dsim, SEQ_AID, aid_dimming_dynamic.aid_cmd_cnt) < 0)
dsim_err("%s : failed to write aid \n", __func__);
}
示例15: dsim_reg_wait_lane_stop_state
u32 dsim_reg_wait_lane_stop_state(u32 id)
{
u32 state;
u32 cnt = 100;
do {
state = dsim_reg_is_lane_stop_state(id);
cnt--;
} while (!state && cnt);
if (!cnt) {
dsim_err("wait timeout DSI Master is not stop state.\n");
dsim_err("check initialization process.\n");
return -EBUSY;
}
return 0;
}