Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333545
b: refs/heads/master
c: 66a0f9e
h: refs/heads/master
i:
  333543: 75d88df
v: v3
  • Loading branch information
Tomi Valkeinen committed Sep 7, 2012
1 parent 96e54fb commit 71647a6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42a6961cf6d23632b8b5c64bd8711aef33e89518
refs/heads/master: 66a0f9e4ac46144fb86ebe90f58ce6f416a55cd5
27 changes: 27 additions & 0 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ struct dispc_features {
unsigned long (*calc_core_clk) (enum omap_channel channel,
u16 width, u16 height, u16 out_width, u16 out_height);
u8 num_fifos;

/* swap GFX & WB fifos */
bool gfx_fifo_workaround:1;
};

#define DISPC_MAX_NR_FIFOS 5
Expand Down Expand Up @@ -1088,6 +1091,29 @@ static void dispc_init_fifos(void)
*/
dispc.fifo_assignment[fifo] = fifo;
}

/*
* The GFX fifo on OMAP4 is smaller than the other fifos. The small fifo
* causes problems with certain use cases, like using the tiler in 2D
* mode. The below hack swaps the fifos of GFX and WB planes, thus
* giving GFX plane a larger fifo. WB but should work fine with a
* smaller fifo.
*/
if (dispc.feat->gfx_fifo_workaround) {
u32 v;

v = dispc_read_reg(DISPC_GLOBAL_BUFFER);

v = FLD_MOD(v, 4, 2, 0); /* GFX BUF top to WB */
v = FLD_MOD(v, 4, 5, 3); /* GFX BUF bottom to WB */
v = FLD_MOD(v, 0, 26, 24); /* WB BUF top to GFX */
v = FLD_MOD(v, 0, 29, 27); /* WB BUF bottom to GFX */

dispc_write_reg(DISPC_GLOBAL_BUFFER, v);

dispc.fifo_assignment[OMAP_DSS_GFX] = OMAP_DSS_WB;
dispc.fifo_assignment[OMAP_DSS_WB] = OMAP_DSS_GFX;
}
}

static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
Expand Down Expand Up @@ -3780,6 +3806,7 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = {
.calc_scaling = dispc_ovl_calc_scaling_44xx,
.calc_core_clk = calc_core_clk_44xx,
.num_fifos = 5,
.gfx_fifo_workaround = true,
};

static int __init dispc_init_features(struct device *dev)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/video/omap2/dss/dispc.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define DISPC_CONTROL2 0x0238
#define DISPC_CONFIG2 0x0620
#define DISPC_DIVISOR 0x0804
#define DISPC_GLOBAL_BUFFER 0x0800
#define DISPC_CONTROL3 0x0848
#define DISPC_CONFIG3 0x084C

Expand Down Expand Up @@ -355,6 +356,8 @@ static inline u16 DISPC_OVL_BASE(enum omap_plane plane)
return 0x014C;
case OMAP_DSS_VIDEO3:
return 0x0300;
case OMAP_DSS_WB:
return 0x0500;
default:
BUG();
return 0;
Expand Down Expand Up @@ -517,6 +520,7 @@ static inline u16 DISPC_FIFO_SIZE_STATUS_OFFSET(enum omap_plane plane)
case OMAP_DSS_VIDEO2:
return 0x0018;
case OMAP_DSS_VIDEO3:
case OMAP_DSS_WB:
return 0x0088;
default:
BUG();
Expand Down
1 change: 1 addition & 0 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ enum omap_plane {
OMAP_DSS_VIDEO1 = 1,
OMAP_DSS_VIDEO2 = 2,
OMAP_DSS_VIDEO3 = 3,
OMAP_DSS_WB = 4,
};

enum omap_channel {
Expand Down

0 comments on commit 71647a6

Please sign in to comment.