From: Sangwook Ju Date: Thu, 11 Oct 2018 08:01:39 +0000 (+0900) Subject: [9610] fbdev: dpu: code bug fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=504a75290b7ff19cf42ded7a1d9b4e50d782416a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [9610] fbdev: dpu: code bug fix Change-Id: I1661b38fded5a1aa2faa744031167473c59f2fc6 Signed-off-by: Sangwook Ju --- diff --git a/arch/arm64/boot/dts/exynos/exynos9610-display-lcd.dtsi b/arch/arm64/boot/dts/exynos/exynos9610-display-lcd.dtsi index d276d01bc1ca..f8795b5d643e 100644 --- a/arch/arm64/boot/dts/exynos/exynos9610-display-lcd.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos9610-display-lcd.dtsi @@ -290,41 +290,6 @@ hdr_max_avg_luma = <1200000>; /* 120 */ hdr_min_luma = <5>; /* 0.0005 */ }; - - nt36672a: nt36672a { - mode = <0>; /* 0: video mode, 1: DP command mode, 2: MIPI command mode */ - resolution = <1080 2246>; - size = <80 120>; - timing,refresh = <60>; - timing,h-porch = <20 40 40>; - timing,v-porch = <2 10 10>; - timing,dsi-hs-clk = <1300>; - /* TODO : pms value to be set */ - timing,pmsk = <1 100 1 0>; - timing,dsi-escape-clk = <20>; - mic_en = <0>; /* 0: Disable, 1: Enable */ - mic_ratio = <0>; /* 0: 1/2 mic, 1: 1/3 mic */ - mic_ver = <0>; /* 0: mic v1.1, 1: v1.2, 2: v2.0 */ - type_of_ddi = <2>; /* 0: Samsung Mobile, 1: MAGNA, 2: Normal(Etc) */ - dsc_en = <0>; /* 0: Disable, 1: Enable */ - dsc_cnt = <0>; /* used DSC count */ - dsc_slice_num = <0>; /* count of dsc slice */ - data_lane = <4>; /* number of using data lane */ - cmd_underrun_lp_ref = <4942>; /* for underrun detect at command mode*/ - vt_compensation = <14>; /* for underrun detect at video mode*/ - mres_en = <0>; - mres_number = <3>; - mres_width = <1440 1080 720>; - mres_height = <2960 2220 1480>; - mres_dsc_width = <720 540 360>; - mres_dsc_height = <40 30 74>; - mres_dsc_en = <1 1 0>; - hdr_num = <1>; /* max: 4 */ - hdr_type = <2 0 0 0>; /* 1: DOLBY_VISION, 2: HDR10, 3: HLG */ - hdr_max_luma = <5400000>; /* 540 */ - hdr_max_avg_luma = <1200000>; /* 120 */ - hdr_min_luma = <5>; /* 0.0005 */ - }; }; }; }; diff --git a/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_mipi_lcd.c b/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_mipi_lcd.c index f09b013722bc..7911b6d13257 100644 --- a/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_mipi_lcd.c +++ b/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_mipi_lcd.c @@ -37,8 +37,8 @@ struct panel_device { int cabc_mode; }; -struct panel_device *panel_drvdata; -struct class *panel_class; +struct panel_device *nt36672a_panel_drvdata; +struct class *nt36672a_panel_class; #endif static int nt36672a_get_brightness(struct backlight_device *bd) @@ -309,23 +309,23 @@ static int nt36672a_probe(struct dsim_device *dsim) goto exit0; } - panel_drvdata = panel; + nt36672a_panel_drvdata = panel; panel->dsim = dsim; panel->cabc_mode = 0; - if (IS_ERR_OR_NULL(panel_class)) { - panel_class = class_create(THIS_MODULE, "panel"); - if (IS_ERR_OR_NULL(panel_class)) { + if (IS_ERR_OR_NULL(nt36672a_panel_class)) { + nt36672a_panel_class = class_create(THIS_MODULE, "panel"); + if (IS_ERR_OR_NULL(nt36672a_panel_class)) { pr_err("failed to create panel class\n"); ret = -EINVAL; goto exit1; } - panel_class->dev_groups = panel_groups; + nt36672a_panel_class->dev_groups = panel_groups; } - panel->dev = device_create(panel_class, dsim->dev, 0, + panel->dev = device_create(nt36672a_panel_class, dsim->dev, 0, &panel, !panel_no ? "panel" : "panel%d", panel_no); if (IS_ERR_OR_NULL(panel->dev)) { pr_err("failed to create panel device\n"); @@ -341,7 +341,7 @@ static int nt36672a_probe(struct dsim_device *dsim) return ret; exit2: - class_destroy(panel_class); + class_destroy(nt36672a_panel_class); exit1: kfree(panel); exit0: @@ -352,7 +352,7 @@ exit0: static int nt36672a_displayon(struct dsim_device *dsim) { #if defined(CONFIG_EXYNOS_PANEL_CABC) - struct panel_device *panel = panel_drvdata; + struct panel_device *panel = nt36672a_panel_drvdata; #endif dsim_info("%s +\n", __func__); nt36672a_lcd_init(dsim->id, &dsim->lcd_info); diff --git a/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_param.h b/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_param.h index ec6ff3579b46..5973b30450e2 100644 --- a/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_param.h +++ b/drivers/video/fbdev/exynos/dpu20/panels/nt36672a_param.h @@ -12,32 +12,6 @@ #ifndef __NT36672A_PARAM_H__ #define __NT36672A_PARAM_H__ -#if defined(CONFIG_EXYNOS_PANEL_CABC) -/* - *cabc_mode[1:0] must be re-mapped according to DDI command - *3FA0 is OLED, so CABC command is not supported. - *Following values represent for ACL2 control of 3FA0. - *- [2'b00] ACL off - *- [2'b01] ACL low - *- [2'b10] ACL mid - *- [2'b11] ACL high - */ -enum cabc_mode { - CABC_OFF = 0, - CABC_USER_IMAGE, - CABC_STILL_PICTURE, - CABC_MOVING_IMAGE, - CABC_READ_MODE = 0x80, -}; - -enum power_mode { - POWER_SAVE_OFF = 0, - POWER_SAVE_LOW = 1, - POWER_SAVE_MEDIUM = 2, - POWER_SAVE_HIGH = 3, - POWER_SAVE_MAX = 4, -}; -#endif /* MIPI commands list */ static const unsigned char SEQ_SLEEP_OUT[] = { 0x11, diff --git a/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_mipi_lcd.c b/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_mipi_lcd.c index ca9733fe5bab..2e93d7f934be 100644 --- a/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_mipi_lcd.c +++ b/drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_mipi_lcd.c @@ -39,8 +39,8 @@ struct panel_device { int cabc_mode; }; -struct panel_device *panel_drvdata; -struct class *panel_class; +struct panel_device *s6e3fa0_panel_drvdata; +struct class *s6e3fa0_panel_class; static int s6e3fa0_get_brightness(struct backlight_device *bd) { @@ -464,23 +464,23 @@ static int s6e3fa0_probe(struct dsim_device *dsim) goto exit0; } - panel_drvdata = panel; + s6e3fa0_panel_drvdata = panel; panel->dsim = dsim; panel->cabc_mode = 0; - if (IS_ERR_OR_NULL(panel_class)) { - panel_class = class_create(THIS_MODULE, "panel"); - if (IS_ERR_OR_NULL(panel_class)) { + if (IS_ERR_OR_NULL(s6e3fa0_panel_class)) { + s6e3fa0_panel_class = class_create(THIS_MODULE, "panel"); + if (IS_ERR_OR_NULL(s6e3fa0_panel_class)) { pr_err("failed to create panel class\n"); ret = -EINVAL; goto exit1; } - panel_class->dev_groups = panel_groups; + s6e3fa0_panel_class->dev_groups = panel_groups; } - panel->dev = device_create(panel_class, dsim->dev, 0, + panel->dev = device_create(s6e3fa0_panel_class, dsim->dev, 0, &panel, !panel_no ? "panel" : "panel%d", panel_no); if (IS_ERR_OR_NULL(panel->dev)) { pr_err("failed to create panel device\n"); @@ -496,7 +496,7 @@ static int s6e3fa0_probe(struct dsim_device *dsim) return ret; exit2: - class_destroy(panel_class); + class_destroy(s6e3fa0_panel_class); exit1: kfree(panel); exit0: @@ -506,7 +506,7 @@ exit0: static int s6e3fa0_displayon(struct dsim_device *dsim) { #if defined(CONFIG_EXYNOS_PANEL_CABC) - struct panel_device *panel = panel_drvdata; + struct panel_device *panel = s6e3fa0_panel_drvdata; #endif s6e3fa0_lcd_init(dsim->id, &dsim->lcd_info);