[9610] fbdev: dpu: code bug fix
authorSangwook Ju <sw.ju@samsung.com>
Thu, 11 Oct 2018 08:01:39 +0000 (17:01 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:43 +0000 (20:23 +0300)
Change-Id: I1661b38fded5a1aa2faa744031167473c59f2fc6
Signed-off-by: Sangwook Ju <sw.ju@samsung.com>
arch/arm64/boot/dts/exynos/exynos9610-display-lcd.dtsi
drivers/video/fbdev/exynos/dpu20/panels/nt36672a_mipi_lcd.c
drivers/video/fbdev/exynos/dpu20/panels/nt36672a_param.h
drivers/video/fbdev/exynos/dpu20/panels/s6e3fa0_mipi_lcd.c

index d276d01bc1cafc1c663650fb6d606f723bc9e8d2..f8795b5d643e6d91ca3da26e865b7d9cd3f64a78 100644 (file)
                                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 */
-                       };
                };
        };
 };
index f09b013722bcc3867be940fc9c109716f4136025..7911b6d13257435c9624973ef052f946d4785f1a 100644 (file)
@@ -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);
index ec6ff3579b46d45918918c7bc0ee0eaea12e9130..5973b30450e2fab406b2750e530f0d8ee8f49512 100644 (file)
 #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,
index ca9733fe5bab6fb099dee512e74c821146a576e6..2e93d7f934beea65eb2b1704f43c16a40f3a930f 100644 (file)
@@ -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);