summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2015-01-23 12:48:00 +0100
committerStefan Agner <stefan.agner@toradex.com>2015-01-23 13:06:53 +0100
commit7f815a425cc85d4b1c5ffcf182ae41071a94c5d7 (patch)
treebeba1dab4839f5eaa55918128086f632e4c6cf79 /drivers/video
parentcd7624a837a933ba8d47855b0caa0ad6a23096bb (diff)
video: fsl-dcu-fb: reset layers before initialize them
Reset all layers before calling register_framebuffer. Registring a frame buffer device can lead to panel/layers getting enabled immediately, especially when using virtual terminals. In this situation, the other layers have not yet been initialized. Upon writing the DCU_UPDATE_MODE register, which essentially enables the controller, the system sometimes freezed. It looks like the controller relied on stale layer configurations which lead to a system freeze (probably due to illegal memory accesses). This has mainly been observed on Colibri VF50 devices. The user does not see any kernel output because the DCU frame buffer gets initialized before the serial console. Using earlyprintk, the last message beeing shown are: ... [ 0.914572] VFS: Disk quotas dquot_6.5.2 [ 0.920293] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.948795] NFS: Registering the id_resolver key type [ 0.955223] Key type id_resolver registered [ 0.959882] Key type id_legacy registered [ 0.964701] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.972685] ntfs: driver 2.1.31 [Flags: R/W]. [ 0.981762] fuse init (API version 7.23) [ 0.989235] msgmni has been set to 220 [ 1.003070] io scheduler noop registered [ 1.008126] io scheduler deadline registered [ 1.013165] io scheduler cfq registered (default) [ 1.056924] backlight supply power not found, using dummy regulator <freeze> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/fsl-dcu-fb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/fbdev/fsl-dcu-fb.c b/drivers/video/fbdev/fsl-dcu-fb.c
index 7facc0e6c60d..4bcab0f136a2 100644
--- a/drivers/video/fbdev/fsl-dcu-fb.c
+++ b/drivers/video/fbdev/fsl-dcu-fb.c
@@ -711,7 +711,7 @@ static int fsl_dcu_ioctl(struct fb_info *info, unsigned int cmd,
return 0;
}
-static void reset_total_layers(struct dcu_fb_data *dcufb)
+static void reset_layers(struct dcu_fb_data *dcufb)
{
int i;
@@ -1121,6 +1121,8 @@ static int fsl_dcu_probe(struct platform_device *pdev)
if (ret)
goto failed_alloc_framebuffer;
+ reset_layers(dcufb);
+
for (i = 0; i < ARRAY_SIZE(dcufb->fsl_dcu_info); i++) {
dcufb->fsl_dcu_info[i] =
framebuffer_alloc(sizeof(struct mfb_info), &pdev->dev);
@@ -1150,7 +1152,6 @@ static int fsl_dcu_probe(struct platform_device *pdev)
goto failed_alloc_framebuffer;
}
- reset_total_layers(mfbi->parent);
return 0;
failed_register_framebuffer: