diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-15 15:18:20 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 16:16:21 +0300 |
commit | f6dc815098bde08c09fd1219e0f77663f8a9a6c7 (patch) | |
tree | 018487decc14fad4feaaa84a4fd0017cf01a9932 /drivers/video/omap2/dss/dispc.c | |
parent | 67019db86450b8b279a8c4be6f138e716f9bfdca (diff) | |
download | op-kernel-dev-f6dc815098bde08c09fd1219e0f77663f8a9a6c7.zip op-kernel-dev-f6dc815098bde08c09fd1219e0f77663f8a9a6c7.tar.gz |
OMAP: DSS2: Add GLOBAL_ALPHA & PRE_MULT_ALPHA to ovl caps
Add OMAP_DSS_OVL_CAP_GLOBAL_ALPHA and OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA to
overlay capabilities. Use these instead of FEAT_GLOBAL_ALPHA,
FEAT_GLOBAL_ALPHA_VID1 and FEAT_PRE_MULT_ALPHA in code.
Remove FEAT_GLOBAL_ALPHA_VID1 and FEAT_PRE_MULT_ALPHA which are no
longer used. FEAT_GLOBAL_ALPHA is still used to decide if the HW has
global alpha register.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 2a0fb5c..343b99a 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -725,11 +725,9 @@ static void _dispc_set_vid_size(enum omap_plane plane, int width, int height) static void _dispc_set_pre_mult_alpha(enum omap_plane plane, bool enable) { - if (!dss_has_feature(FEAT_PRE_MULT_ALPHA)) - return; + struct omap_overlay *ovl = omap_dss_get_overlay(plane); - if (!dss_has_feature(FEAT_GLOBAL_ALPHA_VID1) && - plane == OMAP_DSS_VIDEO1) + if ((ovl->caps & OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA) == 0) return; REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), enable ? 1 : 0, 28, 28); @@ -739,12 +737,9 @@ static void _dispc_setup_global_alpha(enum omap_plane plane, u8 global_alpha) { static const unsigned shifts[] = { 0, 8, 16, }; int shift; + struct omap_overlay *ovl = omap_dss_get_overlay(plane); - if (!dss_has_feature(FEAT_GLOBAL_ALPHA)) - return; - - if (!dss_has_feature(FEAT_GLOBAL_ALPHA_VID1) && - plane == OMAP_DSS_VIDEO1) + if ((ovl->caps & OMAP_DSS_OVL_CAP_GLOBAL_ALPHA) == 0) return; shift = shifts[plane]; |