Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251081
b: refs/heads/master
c: 0c65622
h: refs/heads/master
i:
  251079: 3720b89
v: v3
  • Loading branch information
Archit Taneja authored and Tomi Valkeinen committed May 16, 2011
1 parent da9407a commit 3e9b6ae
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 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: 75d7247c07d27d046323504e2dbca5b3e94fbece
refs/heads/master: 0c65622b1f92eb437d00ede920fc43b2ff2d44b7
36 changes: 32 additions & 4 deletions trunk/drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,37 @@ static inline int dsi_get_num_data_lanes_dssdev(struct omap_dss_device *dssdev)
return num_data_lanes;
}

static unsigned dsi_get_line_buf_size(struct platform_device *dsidev)
{
int val;

/* line buffer on OMAP3 is 1024 x 24bits */
/* XXX: for some reason using full buffer size causes
* considerable TX slowdown with update sizes that fill the
* whole buffer */
if (!dss_has_feature(FEAT_DSI_GNQ))
return 1023 * 3;

val = REG_GET(dsidev, DSI_GNQ, 14, 12); /* VP1_LINE_BUFFER_SIZE */

switch (val) {
case 1:
return 512 * 3; /* 512x24 bits */
case 2:
return 682 * 3; /* 682x24 bits */
case 3:
return 853 * 3; /* 853x24 bits */
case 4:
return 1024 * 3; /* 1024x24 bits */
case 5:
return 1194 * 3; /* 1194x24 bits */
case 6:
return 1365 * 3; /* 1365x24 bits */
default:
BUG();
}
}

static void dsi_set_lane_config(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
Expand Down Expand Up @@ -3771,10 +3802,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
u32 l;
int r;
const unsigned channel = dsi->update_channel;
/* line buffer is 1024 x 24bits */
/* XXX: for some reason using full buffer size causes considerable TX
* slowdown with update sizes that fill the whole buffer */
const unsigned line_buf_size = 1023 * 3;
const unsigned line_buf_size = dsi_get_line_buf_size(dsidev);

DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
x, y, w, h);
Expand Down

0 comments on commit 3e9b6ae

Please sign in to comment.