summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e47c21)
raw | patch | inline | side by side (parent: 7e47c21)
author | Timur Tabi <timur@freescale.com> | |
Wed, 28 Sep 2011 21:19:53 +0000 (16:19 -0500) | ||
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | |
Wed, 5 Oct 2011 01:10:12 +0000 (01:10 +0000) |
The Freescale DIU video controller supports five video "modes", but only
the first two are used by the driver. The other three are special modes
that don't make sense for a framebuffer driver. Therefore, there's no
point in keeping a global variable that indicates which mode we're
supposed to use.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
the first two are used by the driver. The other three are special modes
that don't make sense for a framebuffer driver. Therefore, there's no
point in keeping a global variable that indicates which mode we're
supposed to use.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
arch/powerpc/platforms/512x/mpc512x_shared.c | patch | blob | history | |
drivers/video/fsl-diu-fb.c | patch | blob | history | |
include/linux/fsl-diu-fb.h | patch | blob | history |
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index 3dc62f907a1ef6aa53ef6b2503d4e5a4147d7b0a..cfe958e94e1ef6b741ef4783a0790f20adbb67fa 100644 (file)
}
mode = in_be32(&diu_reg->diu_mode);
- if (mode != MFB_MODE1) {
+ if (mode == MFB_MODE0) {
pr_info("%s: DIU OFF\n", __func__);
goto out;
}
index 0fd4c784f8df0a776218ff9a896d6df91ab8f853..6539e70cb59a39a8e03813e7988a959f99d6acf5 100644 (file)
struct diu_hw {
struct diu __iomem *diu_reg;
spinlock_t reg_lock;
- unsigned int mode; /* DIU operation mode */
};
struct diu_addr {
};
static struct diu_hw dr = {
- .mode = MFB_MODE1,
.reg_lock = __SPIN_LOCK_UNLOCKED(diu_hw.reg_lock),
};
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++;
}
}
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);
}
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 */
* 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);
index 363d5e290cad05568a7e433cdc251b1f3ad8f9f1..11c16a1fb9e3d8316ac4098ca450af8089dffdb3 100644 (file)
__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__ */