You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
powerpc/5121: shared DIU framebuffer support
MPC5121 DIU configuration/setup as initialized by the boot loader currently will get lost while booting Linux. As a result displaying the boot splash is not possible through the boot process. To prevent this we reserve configured DIU frame buffer address range while booting and preserve AOI descriptor and gamma table so that DIU continues displaying through the whole boot process. On first open from user space DIU frame buffer driver releases the reserved frame buffer area and continues to operate as usual. Signed-off-by: John Rigby <jcrigby@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
committed by
Grant Likely
parent
0814a979a6
commit
4b5006ec7b
@@ -1108,6 +1108,10 @@ static int fsl_diu_open(struct fb_info *info, int user)
|
||||
struct mfb_info *mfbi = info->par;
|
||||
int res = 0;
|
||||
|
||||
/* free boot splash memory on first /dev/fb0 open */
|
||||
if (!mfbi->index && diu_ops.release_bootmem)
|
||||
diu_ops.release_bootmem();
|
||||
|
||||
spin_lock(&diu_lock);
|
||||
mfbi->count++;
|
||||
if (mfbi->count == 1) {
|
||||
@@ -1435,6 +1439,7 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
|
||||
int ret, i, error = 0;
|
||||
struct resource res;
|
||||
struct fsl_diu_data *machine_data;
|
||||
int diu_mode;
|
||||
|
||||
machine_data = kzalloc(sizeof(struct fsl_diu_data), GFP_KERNEL);
|
||||
if (!machine_data)
|
||||
@@ -1471,7 +1476,9 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
|
||||
goto error2;
|
||||
}
|
||||
|
||||
out_be32(&dr.diu_reg->diu_mode, 0); /* disable DIU anyway*/
|
||||
diu_mode = in_be32(&dr.diu_reg->diu_mode);
|
||||
if (diu_mode != MFB_MODE1)
|
||||
out_be32(&dr.diu_reg->diu_mode, 0); /* disable DIU */
|
||||
|
||||
/* Get the IRQ of the DIU */
|
||||
machine_data->irq = irq_of_parse_and_map(np, 0);
|
||||
@@ -1519,7 +1526,13 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
|
||||
machine_data->dummy_ad->offset_xyd = 0;
|
||||
machine_data->dummy_ad->next_ad = 0;
|
||||
|
||||
out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);
|
||||
/*
|
||||
* Let DIU display splash screen if it was pre-initialized
|
||||
* by the bootloader, set dummy area descriptor otherwise.
|
||||
*/
|
||||
if (diu_mode != MFB_MODE1)
|
||||
out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);
|
||||
|
||||
out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr);
|
||||
out_be32(&dr.diu_reg->desc[2], machine_data->dummy_ad->paddr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user