diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-04-10 05:48:34 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-06-17 08:44:28 -0400 |
commit | f2aee319d95fcba3d29424aeaf6d39d4c2a7890a (patch) | |
tree | bb099e5ea51b576fe2e943f943b18b77a93b7d9b /drivers/video | |
parent | ab6b2582b8f931f8f324fbf7bcb8338b8fc1eded (diff) |
OMAPDSS: DISPC: fix row_inc for OMAP3
pixel_inc and row_inc work differently on OMAP2/3 and OMAP4+ DSS. On
OMAP2/3 DSS, the pixel_inc is _not_ added by the HW at the end of the
line, after the last pixel, whereas on OMAP4+ it is.
The driver currently works for OMAP4+, but does not handle OMAP2/3
correctly, which leads to tilted image when row_inc is used.
This patch adds a flag to DISPC driver so that the pixel_inc is added
when required.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/dispc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c index ddce8fcfc5c1..4488d9367bd3 100644 --- a/drivers/video/fbdev/omap2/dss/dispc.c +++ b/drivers/video/fbdev/omap2/dss/dispc.c | |||
@@ -95,6 +95,9 @@ struct dispc_features { | |||
95 | bool mstandby_workaround:1; | 95 | bool mstandby_workaround:1; |
96 | 96 | ||
97 | bool set_max_preload:1; | 97 | bool set_max_preload:1; |
98 | |||
99 | /* PIXEL_INC is not added to the last pixel of a line */ | ||
100 | bool last_pixel_inc_missing:1; | ||
98 | }; | 101 | }; |
99 | 102 | ||
100 | #define DISPC_MAX_NR_FIFOS 5 | 103 | #define DISPC_MAX_NR_FIFOS 5 |
@@ -2692,6 +2695,9 @@ static int dispc_ovl_setup_common(enum omap_plane plane, | |||
2692 | dispc_ovl_set_ba1_uv(plane, p_uv_addr + offset1); | 2695 | dispc_ovl_set_ba1_uv(plane, p_uv_addr + offset1); |
2693 | } | 2696 | } |
2694 | 2697 | ||
2698 | if (dispc.feat->last_pixel_inc_missing) | ||
2699 | row_inc += pix_inc - 1; | ||
2700 | |||
2695 | dispc_ovl_set_row_inc(plane, row_inc); | 2701 | dispc_ovl_set_row_inc(plane, row_inc); |
2696 | dispc_ovl_set_pix_inc(plane, pix_inc); | 2702 | dispc_ovl_set_pix_inc(plane, pix_inc); |
2697 | 2703 | ||
@@ -3769,6 +3775,7 @@ static const struct dispc_features omap24xx_dispc_feats __initconst = { | |||
3769 | .num_fifos = 3, | 3775 | .num_fifos = 3, |
3770 | .no_framedone_tv = true, | 3776 | .no_framedone_tv = true, |
3771 | .set_max_preload = false, | 3777 | .set_max_preload = false, |
3778 | .last_pixel_inc_missing = true, | ||
3772 | }; | 3779 | }; |
3773 | 3780 | ||
3774 | static const struct dispc_features omap34xx_rev1_0_dispc_feats __initconst = { | 3781 | static const struct dispc_features omap34xx_rev1_0_dispc_feats __initconst = { |
@@ -3789,6 +3796,7 @@ static const struct dispc_features omap34xx_rev1_0_dispc_feats __initconst = { | |||
3789 | .num_fifos = 3, | 3796 | .num_fifos = 3, |
3790 | .no_framedone_tv = true, | 3797 | .no_framedone_tv = true, |
3791 | .set_max_preload = false, | 3798 | .set_max_preload = false, |
3799 | .last_pixel_inc_missing = true, | ||
3792 | }; | 3800 | }; |
3793 | 3801 | ||
3794 | static const struct dispc_features omap34xx_rev3_0_dispc_feats __initconst = { | 3802 | static const struct dispc_features omap34xx_rev3_0_dispc_feats __initconst = { |
@@ -3809,6 +3817,7 @@ static const struct dispc_features omap34xx_rev3_0_dispc_feats __initconst = { | |||
3809 | .num_fifos = 3, | 3817 | .num_fifos = 3, |
3810 | .no_framedone_tv = true, | 3818 | .no_framedone_tv = true, |
3811 | .set_max_preload = false, | 3819 | .set_max_preload = false, |
3820 | .last_pixel_inc_missing = true, | ||
3812 | }; | 3821 | }; |
3813 | 3822 | ||
3814 | static const struct dispc_features omap44xx_dispc_feats __initconst = { | 3823 | static const struct dispc_features omap44xx_dispc_feats __initconst = { |