diff options
author | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2014-12-11 15:34:42 +0300 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2014-12-11 16:00:09 +0300 |
commit | 96006a770df80d69cbde4802e1e7cdfd70c510b3 (patch) | |
tree | 8f99791fa1a346effdff490dc880dd341cebca9a /drivers/gpu/drm/sti/sti_mixer.c | |
parent | 5e03abc52cd16c852552f9eaae497c9d6e55e5d0 (diff) | |
download | linux-96006a770df80d69cbde4802e1e7cdfd70c510b3.tar.xz |
drm: sti: add cursor plane
stih407 SoC have a dedicated hardware cursor plane,
this patch enable it.
The hardware have a color look up table, fix it to
be able to use ARGB8888.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_mixer.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_mixer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c index 6bcdf3f86d22..9a4ce74ac329 100644 --- a/drivers/gpu/drm/sti/sti_mixer.c +++ b/drivers/gpu/drm/sti/sti_mixer.c @@ -45,6 +45,7 @@ static const u32 mixerColorSpaceMatIdentity[] = { #define GAM_CTL_GDP1_MASK BIT(4) #define GAM_CTL_GDP2_MASK BIT(5) #define GAM_CTL_GDP3_MASK BIT(6) +#define GAM_CTL_CURSOR_MASK BIT(9) const char *sti_mixer_to_str(struct sti_mixer *mixer) { @@ -127,6 +128,9 @@ int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer) case STI_VID_1: layer_id = GAM_DEPTH_VID1_ID; break; + case STI_CURSOR: + /* no need to set depth for cursor */ + return 0; default: DRM_ERROR("Unknown layer %d\n", layer->desc); return 1; @@ -188,6 +192,8 @@ static u32 sti_mixer_get_layer_mask(struct sti_layer *layer) return GAM_CTL_VID0_MASK; case STI_VID_1: return GAM_CTL_VID1_MASK; + case STI_CURSOR: + return GAM_CTL_CURSOR_MASK; default: return 0; } |