From 1928bb002a2154a7b7a6a105ba1d65a36a7f0263 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 24 Oct 2014 16:24:53 +0900 Subject: [PATCH] drm/panel: s6e63j0x03: Fix uninitialized power state Fix following DSI panel enable error (booted init=/bin/sh): echo 0 > /sys/devices/platform/exynos-drm/graphics/fb0/blank [ 55.708859] exynos-dsi 11c80000.dsi: PLL input frequency: 24000000 [ 55.709038] exynos-dsi 11c80000.dsi: PLL freq 250000000, (p 3, m 125, s 2) [ 55.709107] exynos-dsi 11c80000.dsi: band 4 [ 55.709929] exynos-dsi 11c80000.dsi: PLL failed to stabilize [ 55.709987] exynos-dsi 11c80000.dsi: failed to configure DSI PLL [ 56.007706] exynos-dsi 11c80000.dsi: timeout waiting for reset [ 56.030676] exynos-dsi 11c80000.dsi: waiting for bus lanes timed out [ 56.030804] exynos-dsi 11c80000.dsi: < xfer df45fda8: tx len 3, done 0, rx len 0, done 0 [ 56.127024] exynos-dsi 11c80000.dsi: xfer timed out: 03 00 f1 5a 5a [ 56.127125] panel_s6e63j0x03 11c80000.dsi.0: failed to dcs write: -110[f1 5a 5a] The panel power state was initialized by devm_kzalloc() to 0 which means FB_BLANK_UNBLANK. Request to unblank frame buffer from sysfs was triggering a call to panel set_brightness(). This lead to starting DSI transfers on disabled DSI/panel (no calls to exynos_dsi_enable, s6e63j0x03_prepare, s6e63j0x03_enable) Change-Id: I146d46c92c96112a6c616daf83edc57c5b889902 Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae --- drivers/gpu/drm/panel/panel-s6e63j0x03.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-s6e63j0x03.c index b5b0ec4..d07eb0a 100644 --- a/drivers/gpu/drm/panel/panel-s6e63j0x03.c +++ b/drivers/gpu/drm/panel/panel-s6e63j0x03.c @@ -647,6 +647,8 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) return ret; } + ctx->power = FB_BLANK_POWERDOWN; + drm_panel_init(&ctx->panel); ctx->panel.dev = dev; ctx->panel.funcs = &s6e63j0x03_drm_funcs; @@ -661,6 +663,11 @@ static int s6e63j0x03_probe(struct mipi_dsi_device *dsi) ctx->bl_dev->props.max_brightness = MAX_BRIGHTNESS; ctx->bl_dev->props.brightness = DEFAULT_BRIGHTNESS; + /* + * FIXME: probably we should also initialize backlight power: + * ctx->bl_dev->props.power = FB_BLANK_POWERDOWN; + */ + ret = drm_panel_add(&ctx->panel); if (ret < 0) goto err_unregister_backlight; -- 2.7.4