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_compositor.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_compositor.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_compositor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c index bbf8462879ce..b9415b3f3720 100644 --- a/drivers/gpu/drm/sti/sti_compositor.c +++ b/drivers/gpu/drm/sti/sti_compositor.c @@ -24,8 +24,9 @@ * stiH407 compositor properties */ struct sti_compositor_data stih407_compositor_data = { - .nb_subdev = 7, + .nb_subdev = 8, .subdev_desc = { + {STI_CURSOR_SUBDEV, (int)STI_CURSOR, 0x000}, {STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100}, {STI_GPD_SUBDEV, (int)STI_GDP_1, 0x200}, {STI_GPD_SUBDEV, (int)STI_GDP_2, 0x300}, @@ -68,11 +69,11 @@ static int sti_compositor_init_subdev(struct sti_compositor *compo, break; case STI_GPD_SUBDEV: case STI_VID_SUBDEV: + case STI_CURSOR_SUBDEV: compo->layer[layer_id++] = sti_layer_create(compo->dev, desc[i].id, compo->regs + desc[i].offset); break; - /* case STI_CURSOR_SUBDEV : TODO */ default: DRM_ERROR("Unknow subdev compoment type\n"); return 1; @@ -125,11 +126,12 @@ static int sti_compositor_bind(struct device *dev, struct device *master, } /* The first planes are reserved for primary planes*/ - if (crtc < compo->nb_mixers) { + if (crtc < compo->nb_mixers && primary) { sti_drm_crtc_init(drm_dev, compo->mixer[crtc], primary, cursor); crtc++; cursor = NULL; + primary = NULL; } } } |