video: tegra: dc: add API for selecting PREMULT_ALPHA cursor blending
authorAndy Ritger <aritger@nvidia.com>
Fri, 23 Aug 2013 23:24:48 +0000 (16:24 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Fri, 27 Sep 2013 02:46:17 +0000 (19:46 -0700)
commit8170e0f94e70a7cd8ae93d9661d08837c802208e
treeaa6cb8b4056c209a4664f8ce2f4dc74c006e05c7
parent170d2441ee71391a969e8aab7a1ffa7323e7c0e7
video: tegra: dc: add API for selecting PREMULT_ALPHA cursor blending

Add TEGRA_DC_EXT_CURSOR_FORMAT_FLAGS_RGBA_PREMULT_ALPHA flag for
tegra_dc_ext_cursor_image::flags to select premultiplied alpha.

For consistency, rename

    TEGRA_DC_EXT_CURSOR_FLAGS_2BIT_LEGACY
    TEGRA_DC_EXT_CURSOR_FLAGS_RGBA_NORMAL

to

    TEGRA_DC_EXT_CURSOR_FORMAT_FLAGS_2BIT_LEGACY
    TEGRA_DC_EXT_CURSOR_FORMAT_FLAGS_RGBA_NON_PREMULT_ALPHA

(but retain the old names as aliases, for source-level backwards
compatibility).

Add new caps bits to be reported in tegra_dc_ext_control_capabilities::caps

    TEGRA_DC_EXT_CAPABILITIES_CURSOR_TWO_COLOR
    TEGRA_DC_EXT_CAPABILITIES_CURSOR_RGBA_NON_PREMULT_ALPHA
    TEGRA_DC_EXT_CAPABILITIES_CURSOR_RGBA_PREMULT_ALPHA

Note that before this change the default RGBA cursor behavior on T114 was
non-premultipled alpha, while on T124 it was premultipled alpha.  Now,
the default RGBA cursor behavior is consistently non-premultipled alpha.
Existing T124 RGBA cursor users will need to use the new PREMULT_ALPHA
flag.

Update the cursor image format documentation in tegra_dc_ext.h

Bug 1354320

Change-Id: I82b04c97dea1830ce2659c966ae2a1b59fa06028
Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-on: http://git-master/r/271749
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
drivers/video/tegra/dc/ext/control.c
drivers/video/tegra/dc/ext/cursor.c
drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h
include/video/tegra_dc_ext.h