diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch new file mode 100644 index 0000000000..bca449f169 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0016-DSS2-DSI-improve-packet-len-calculation.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 6b2c9d84c7accdfe1067fcdc8a00e50674aab4bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
3 | Date: Thu, 2 Apr 2009 17:42:26 +0300 | ||
4 | Subject: [PATCH] DSS2: DSI: improve packet len calculation | ||
5 | |||
6 | --- | ||
7 | drivers/video/omap2/dss/dsi.c | 21 ++++++++++++++++----- | ||
8 | 1 files changed, 16 insertions(+), 5 deletions(-) | ||
9 | |||
10 | diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c | ||
11 | index aecb89d..66ac6ea 100644 | ||
12 | --- a/drivers/video/omap2/dss/dsi.c | ||
13 | +++ b/drivers/video/omap2/dss/dsi.c | ||
14 | @@ -2624,17 +2624,28 @@ static void dsi_update_screen_dispc(struct omap_display *display, | ||
15 | u16 x, u16 y, u16 w, u16 h) | ||
16 | { | ||
17 | int bytespp = 3; | ||
18 | + int len; | ||
19 | int total_len; | ||
20 | - int line_packet_len; | ||
21 | + int packet_payload; | ||
22 | + int packet_len; | ||
23 | u32 l; | ||
24 | |||
25 | if (dsi.update_mode == OMAP_DSS_UPDATE_MANUAL) | ||
26 | DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n", | ||
27 | x, y, w, h); | ||
28 | |||
29 | - /* TODO: one packet could be longer, I think? Max is the line buffer */ | ||
30 | - line_packet_len = w * bytespp + 1; /* 1 byte for DCS cmd */ | ||
31 | - total_len = line_packet_len * h; | ||
32 | + len = w * h * bytespp; | ||
33 | + | ||
34 | + /* XXX: one packet could be longer, I think? Line buffer is | ||
35 | + * 1024 x 24bits, but we have to put DCS cmd there also. | ||
36 | + * 1023 * 3 should work, but causes strange color effects. */ | ||
37 | + packet_payload = min(w, (u16)1020) * bytespp; | ||
38 | + | ||
39 | + packet_len = packet_payload + 1; /* 1 byte for DCS cmd */ | ||
40 | + total_len = (len / packet_payload) * packet_len; | ||
41 | + | ||
42 | + if (len % packet_payload) | ||
43 | + total_len += (len % packet_payload) + 1; | ||
44 | |||
45 | display->ctrl->setup_update(display, x, y, w, h); | ||
46 | |||
47 | @@ -2646,7 +2657,7 @@ static void dsi_update_screen_dispc(struct omap_display *display, | ||
48 | l = FLD_VAL(total_len, 23, 0); /* TE_SIZE */ | ||
49 | dsi_write_reg(DSI_VC_TE(1), l); | ||
50 | |||
51 | - dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, line_packet_len, 0); | ||
52 | + dsi_vc_write_long_header(1, DSI_DT_DCS_LONG_WRITE, packet_len, 0); | ||
53 | |||
54 | if (dsi.use_te) | ||
55 | l = FLD_MOD(l, 1, 30, 30); /* TE_EN */ | ||
56 | -- | ||
57 | 1.5.6.5 | ||
58 | |||