1 From 86fd2e3e74a191ae43122ac18f62f5163c577d4b Mon Sep 17 00:00:00 2001
2 From: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
3 Date: Wed, 26 Nov 2008 14:11:59 +0100
4 Subject: [PATCH 3/3] atmel_mpopfb: add signal to disable line caching and set correct output
6 This patch adds a signal to disable line caching, due to an errata in
7 silicon revision A. It also sets the output from MPOP to BGR to match
8 big endian framebuffer memory.
10 Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
12 diff --git a/drivers/video/atmel_mpopfb.c b/drivers/video/atmel_mpopfb.c
13 index 3b4b668..350303b 100644
14 --- a/drivers/video/atmel_mpopfb.c
15 +++ b/drivers/video/atmel_mpopfb.c
16 @@ -313,6 +313,10 @@ static int atmel_mpopfb_check_var(struct fb_var_screeninfo *var,
17 static void atmel_mpopfb_start(struct atmel_mpopfb_info *sinfo)
19 if (!sinfo->running) {
20 + unsigned int line_cache_disable =
21 + sinfo->baseimg_info.line_cache_disable ?
22 + ATMEL_MPOP_CR_CACHEDIS_MASK : 0;
24 dev_dbg(sinfo->info->device, " * Starting MPOP.\n");
26 /* Enable all error interrupts. */
27 @@ -323,9 +327,9 @@ static void atmel_mpopfb_start(struct atmel_mpopfb_info *sinfo)
28 * reading from the slave interface it will start
31 - mpop_writel(sinfo, ATMEL_MPOP_CR,
32 - ATMEL_MPOP_CR_EN_MASK
33 - /*| ATMEL_MPOP_CR_OUT_BGR_MASK */ );
34 + mpop_writel(sinfo, ATMEL_MPOP_CR, ATMEL_MPOP_CR_EN_MASK
35 + | line_cache_disable
36 + | ATMEL_MPOP_CR_OUT_BGR_MASK);
40 diff --git a/include/linux/atmel_mpopfb.h b/include/linux/atmel_mpopfb.h
41 index cd12e16..d0f2505 100644
42 --- a/include/linux/atmel_mpopfb.h
43 +++ b/include/linux/atmel_mpopfb.h
44 @@ -42,9 +42,11 @@ struct atmel_mpopfb_baseimg_info {
48 - /* Signal that we should flip the video. */
49 + /* Signal for flipping the video. */
52 + /* Signal for disabling the line cache. */
53 + int line_cache_disable;
56 enum atmel_mpopfb_overlay_type {