Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271354
b: refs/heads/master
c: c4e5a02
h: refs/heads/master
v: v3
  • Loading branch information
Timur Tabi authored and Florian Tobias Schandinat committed Oct 5, 2011
1 parent 0c337ea commit 0fb6228
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e47c211953bd8e396b168eba2c288ea6aec20ef
refs/heads/master: c4e5a0232763db22d6c60c391ed5816b2b2ac063
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/512x/mpc512x_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void __init mpc512x_init_diu(void)
}

mode = in_be32(&diu_reg->diu_mode);
if (mode != MFB_MODE1) {
if (mode == MFB_MODE0) {
pr_info("%s: DIU OFF\n", __func__);
goto out;
}
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/video/fsl-diu-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
struct diu_hw {
struct diu __iomem *diu_reg;
spinlock_t reg_lock;
unsigned int mode; /* DIU operation mode */
};

struct diu_addr {
Expand Down Expand Up @@ -426,7 +425,6 @@ static struct mfb_info mfb_template[] = {
};

static struct diu_hw dr = {
.mode = MFB_MODE1,
.reg_lock = __SPIN_LOCK_UNLOCKED(diu_hw.reg_lock),
};

Expand Down Expand Up @@ -620,7 +618,7 @@ static void enable_lcdc(struct fb_info *info)
struct fsl_diu_data *machine_data = mfbi->parent;

if (!machine_data->fb_enabled) {
out_be32(&hw->diu_mode, dr.mode);
out_be32(&hw->diu_mode, MFB_MODE1);
machine_data->fb_enabled++;
}
}
Expand Down Expand Up @@ -1390,9 +1388,6 @@ static int request_irq_local(int irq)
ints |= INT_VSYNC;
#endif

if (dr.mode == MFB_MODE2 || dr.mode == MFB_MODE3)
ints |= INT_VSYNC_WB;

/* Read to clear the status */
in_be32(&hw->int_status);
out_be32(&hw->int_mask, ints);
Expand Down Expand Up @@ -1558,7 +1553,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
}

diu_mode = in_be32(&dr.diu_reg->diu_mode);
if (diu_mode != MFB_MODE1)
if (diu_mode == MFB_MODE0)
out_be32(&dr.diu_reg->diu_mode, 0); /* disable DIU */

/* Get the IRQ of the DIU */
Expand Down Expand Up @@ -1611,7 +1606,7 @@ static int __devinit fsl_diu_probe(struct platform_device *pdev)
* Let DIU display splash screen if it was pre-initialized
* by the bootloader, set dummy area descriptor otherwise.
*/
if (diu_mode != MFB_MODE1)
if (diu_mode == MFB_MODE0)
out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);

out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr);
Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/fsl-diu-fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ struct diu {
__be32 plut;
} __attribute__ ((packed));

/* Modes of operation of DIU */
/*
* Modes of operation of DIU. The DIU supports five different modes, but
* the driver only supports modes 0 and 1.
*/
#define MFB_MODE0 0 /* DIU off */
#define MFB_MODE1 1 /* All three planes output to display */
#define MFB_MODE2 2 /* Plane 1 to display, planes 2+3 written back*/
#define MFB_MODE3 3 /* All three planes written back to memory */
#define MFB_MODE4 4 /* Color bar generation */

#endif /* __KERNEL__ */
#endif /* __FSL_DIU_FB_H__ */

0 comments on commit 0fb6228

Please sign in to comment.