aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fsl-diu-fb.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2012-10-16 18:33:48 -0400
committerTimur Tabi <timur@freescale.com>2012-11-26 14:41:20 -0500
commit7af3b136d4e035d71c4e70c4b4a2017a10623fc0 (patch)
tree79450a6f492f19b081643da9e90eb31fa8063305 /drivers/video/fsl-diu-fb.c
parent8deac723f7b6528e8ab3dec5ce1c913ce3d3009c (diff)
drivers/video: fsl-diu-fb: clean up reset of primary display
Commit 4b5006ec ("shared DIU framebuffer support") added the ability to retain the splash screen until the framebuffer is opened by user space. Clean up this code to eliminate redundant writes to registers, and eliminate the use of dummy area descriptor. Signed-off-by: Timur Tabi <timur@freescale.com>
Diffstat (limited to 'drivers/video/fsl-diu-fb.c')
-rw-r--r--drivers/video/fsl-diu-fb.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index fa7f20039dd2..37175ac6584a 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -496,8 +496,7 @@ static void fsl_diu_enable_panel(struct fb_info *info)
496 496
497 switch (mfbi->index) { 497 switch (mfbi->index) {
498 case PLANE0: 498 case PLANE0:
499 if (hw->desc[0] != ad->paddr) 499 wr_reg_wa(&hw->desc[0], ad->paddr);
500 wr_reg_wa(&hw->desc[0], ad->paddr);
501 break; 500 break;
502 case PLANE1_AOI0: 501 case PLANE1_AOI0:
503 cmfbi = &data->mfb[2]; 502 cmfbi = &data->mfb[2];
@@ -549,8 +548,7 @@ static void fsl_diu_disable_panel(struct fb_info *info)
549 548
550 switch (mfbi->index) { 549 switch (mfbi->index) {
551 case PLANE0: 550 case PLANE0:
552 if (hw->desc[0] != data->dummy_ad.paddr) 551 wr_reg_wa(&hw->desc[0], 0);
553 wr_reg_wa(&hw->desc[0], data->dummy_ad.paddr);
554 break; 552 break;
555 case PLANE1_AOI0: 553 case PLANE1_AOI0:
556 cmfbi = &data->mfb[2]; 554 cmfbi = &data->mfb[2];
@@ -1519,7 +1517,6 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
1519 struct device_node *np = pdev->dev.of_node; 1517 struct device_node *np = pdev->dev.of_node;
1520 struct mfb_info *mfbi; 1518 struct mfb_info *mfbi;
1521 struct fsl_diu_data *data; 1519 struct fsl_diu_data *data;
1522 int diu_mode;
1523 dma_addr_t dma_addr; /* DMA addr of fsl_diu_data struct */ 1520 dma_addr_t dma_addr; /* DMA addr of fsl_diu_data struct */
1524 unsigned int i; 1521 unsigned int i;
1525 int ret; 1522 int ret;
@@ -1584,10 +1581,6 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
1584 goto error; 1581 goto error;
1585 } 1582 }
1586 1583
1587 diu_mode = in_be32(&data->diu_reg->diu_mode);
1588 if (diu_mode == MFB_MODE0)
1589 out_be32(&data->diu_reg->diu_mode, 0); /* disable DIU */
1590
1591 /* Get the IRQ of the DIU */ 1584 /* Get the IRQ of the DIU */
1592 data->irq = irq_of_parse_and_map(np, 0); 1585 data->irq = irq_of_parse_and_map(np, 0);
1593 1586
@@ -1609,11 +1602,11 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
1609 data->dummy_ad.paddr = DMA_ADDR(data, dummy_ad); 1602 data->dummy_ad.paddr = DMA_ADDR(data, dummy_ad);
1610 1603
1611 /* 1604 /*
1612 * Let DIU display splash screen if it was pre-initialized 1605 * Let DIU continue to display splash screen if it was pre-initialized
1613 * by the bootloader, set dummy area descriptor otherwise. 1606 * by the bootloader; otherwise, clear the display.
1614 */ 1607 */
1615 if (diu_mode == MFB_MODE0) 1608 if (in_be32(&data->diu_reg->diu_mode) == MFB_MODE0)
1616 out_be32(&data->diu_reg->desc[0], data->dummy_ad.paddr); 1609 out_be32(&data->diu_reg->desc[0], 0);
1617 1610
1618 out_be32(&data->diu_reg->desc[1], data->dummy_ad.paddr); 1611 out_be32(&data->diu_reg->desc[1], data->dummy_ad.paddr);
1619 out_be32(&data->diu_reg->desc[2], data->dummy_ad.paddr); 1612 out_be32(&data->diu_reg->desc[2], data->dummy_ad.paddr);