aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti/sti_mixer.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2014-12-11 13:34:42 +0100
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2014-12-11 14:00:09 +0100
commit96006a770df80d69cbde4802e1e7cdfd70c510b3 (patch)
tree8f99791fa1a346effdff490dc880dd341cebca9a /drivers/gpu/drm/sti/sti_mixer.c
parentdrm: sti: enable auxiliary CRTC (diff)
downloadlinux-dev-96006a770df80d69cbde4802e1e7cdfd70c510b3.tar.xz
linux-dev-96006a770df80d69cbde4802e1e7cdfd70c510b3.zip
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 '')
-rw-r--r--drivers/gpu/drm/sti/sti_mixer.c6
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;
}