diff options
Diffstat (limited to 'drivers/video/fsl-diu-fb.c')
-rw-r--r-- | drivers/video/fsl-diu-fb.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 48905d5f4e8d..db3e360e6aad 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1108,6 +1108,10 @@ static int fsl_diu_open(struct fb_info *info, int user) | |||
1108 | struct mfb_info *mfbi = info->par; | 1108 | struct mfb_info *mfbi = info->par; |
1109 | int res = 0; | 1109 | int res = 0; |
1110 | 1110 | ||
1111 | /* free boot splash memory on first /dev/fb0 open */ | ||
1112 | if (!mfbi->index && diu_ops.release_bootmem) | ||
1113 | diu_ops.release_bootmem(); | ||
1114 | |||
1111 | spin_lock(&diu_lock); | 1115 | spin_lock(&diu_lock); |
1112 | mfbi->count++; | 1116 | mfbi->count++; |
1113 | if (mfbi->count == 1) { | 1117 | if (mfbi->count == 1) { |
@@ -1435,6 +1439,7 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev, | |||
1435 | int ret, i, error = 0; | 1439 | int ret, i, error = 0; |
1436 | struct resource res; | 1440 | struct resource res; |
1437 | struct fsl_diu_data *machine_data; | 1441 | struct fsl_diu_data *machine_data; |
1442 | int diu_mode; | ||
1438 | 1443 | ||
1439 | machine_data = kzalloc(sizeof(struct fsl_diu_data), GFP_KERNEL); | 1444 | machine_data = kzalloc(sizeof(struct fsl_diu_data), GFP_KERNEL); |
1440 | if (!machine_data) | 1445 | if (!machine_data) |
@@ -1471,7 +1476,9 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev, | |||
1471 | goto error2; | 1476 | goto error2; |
1472 | } | 1477 | } |
1473 | 1478 | ||
1474 | out_be32(&dr.diu_reg->diu_mode, 0); /* disable DIU anyway*/ | 1479 | diu_mode = in_be32(&dr.diu_reg->diu_mode); |
1480 | if (diu_mode != MFB_MODE1) | ||
1481 | out_be32(&dr.diu_reg->diu_mode, 0); /* disable DIU */ | ||
1475 | 1482 | ||
1476 | /* Get the IRQ of the DIU */ | 1483 | /* Get the IRQ of the DIU */ |
1477 | machine_data->irq = irq_of_parse_and_map(np, 0); | 1484 | machine_data->irq = irq_of_parse_and_map(np, 0); |
@@ -1519,7 +1526,13 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev, | |||
1519 | machine_data->dummy_ad->offset_xyd = 0; | 1526 | machine_data->dummy_ad->offset_xyd = 0; |
1520 | machine_data->dummy_ad->next_ad = 0; | 1527 | machine_data->dummy_ad->next_ad = 0; |
1521 | 1528 | ||
1522 | out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr); | 1529 | /* |
1530 | * Let DIU display splash screen if it was pre-initialized | ||
1531 | * by the bootloader, set dummy area descriptor otherwise. | ||
1532 | */ | ||
1533 | if (diu_mode != MFB_MODE1) | ||
1534 | out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr); | ||
1535 | |||
1523 | out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr); | 1536 | out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr); |
1524 | out_be32(&dr.diu_reg->desc[2], machine_data->dummy_ad->paddr); | 1537 | out_be32(&dr.diu_reg->desc[2], machine_data->dummy_ad->paddr); |
1525 | 1538 | ||