From: wangjiao Date: Fri, 30 Nov 2018 06:54:44 +0000 (+0800) Subject: (CR):[Kane]:[factory]Modify lcd suspend write faill issue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9928441e8d44c658d67dfc7dc4907412db03a242;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git (CR):[Kane]:[factory]Modify lcd suspend write faill issue Change-Id: I51f21313d99154c1d7d49058a1330aa534545547 Signed-off-by: wangjiao --- diff --git a/drivers/video/fbdev/exynos/dpu20/panels/hix83112a_mipi_lcd.c b/drivers/video/fbdev/exynos/dpu20/panels/hix83112a_mipi_lcd.c index d9ae5ffe7849..0c840672c5c0 100755 --- a/drivers/video/fbdev/exynos/dpu20/panels/hix83112a_mipi_lcd.c +++ b/drivers/video/fbdev/exynos/dpu20/panels/hix83112a_mipi_lcd.c @@ -172,6 +172,9 @@ static int hix83112a_set_brightness(struct backlight_device *bd) dsim = get_dsim_drvdata(0); + if (!IS_DSIM_ON_STATE(dsim)) + return 0; + if (brightness < MIN_BRIGHTNESS || brightness > MAX_BRIGHTNESS) { pr_err("Brightness should be in the range of 0 ~ 255\n"); return -EINVAL; diff --git a/drivers/video/fbdev/exynos/dpu20/panels/nov36672a_mipi_lcd.c b/drivers/video/fbdev/exynos/dpu20/panels/nov36672a_mipi_lcd.c index 77f21a28e0cd..9d20152037e4 100755 --- a/drivers/video/fbdev/exynos/dpu20/panels/nov36672a_mipi_lcd.c +++ b/drivers/video/fbdev/exynos/dpu20/panels/nov36672a_mipi_lcd.c @@ -162,6 +162,9 @@ static int nov36672a_set_brightness(struct backlight_device *bd) dsim = get_dsim_drvdata(0); + if (!IS_DSIM_ON_STATE(dsim)) + return 0; + if (brightness < MIN_BRIGHTNESS || brightness > MAX_BRIGHTNESS) { pr_err("Brightness should be in the range of 0 ~ 255\n"); return -EINVAL;