d09823e3b1708d012540248a3ea640032032997b
[buildroot.git] /
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
5
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.
9
10 Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
11
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)
18 {
19 if (!sinfo->running) {
20 + unsigned int line_cache_disable =
21 + sinfo->baseimg_info.line_cache_disable ?
22 + ATMEL_MPOP_CR_CACHEDIS_MASK : 0;
23 +
24 dev_dbg(sinfo->info->device, " * Starting MPOP.\n");
25
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
29 * generating a frame.
30 */
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);
37
38 sinfo->running = 1;
39 }
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 {
45 unsigned xsize;
46 unsigned ysize;
47
48 - /* Signal that we should flip the video. */
49 + /* Signal for flipping the video. */
50 int flip;
51
52 + /* Signal for disabling the line cache. */
53 + int line_cache_disable;
54 };
55
56 enum atmel_mpopfb_overlay_type {
57 --
58 1.5.6.3
59