summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_mixer.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-08-03 08:40:24 +1000
committerDave Airlie <airlied@redhat.com>2016-08-03 08:40:24 +1000
commit586efded6b8beb932e9a356f351b0c681503358f (patch)
tree1c9af56fa0d2c70bf93cf5a02429f4b5b7d11007 /drivers/gpu/drm/sti/sti_mixer.c
parentdfd2e9ab6a7db56a5f5bb55f71485a92613c8e11 (diff)
parent2fc4d838aaf2607216eda5ce9dba18fa14422a31 (diff)
Merge branch 'generic-zpos-v8' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next
Merge generic ZPOS property support, this was backed up behind some other changes I didn't have a stable branch point for. Now they are merged to Linus tree this pull is just drm patches. * 'generic-zpos-v8' of http://git.linaro.org/people/benjamin.gaignard/kernel: drm: rcar: use generic code for managing zpos plane property drm/exynos: use generic code for managing zpos plane property drm: sti: use generic zpos for plane drm: add generic zpos property
Diffstat (limited to 'drivers/gpu/drm/sti/sti_mixer.c')
-rw-r--r--drivers/gpu/drm/sti/sti_mixer.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 1885c7ab5a8b..7d9aea805eab 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -239,13 +239,10 @@ static void sti_mixer_set_background_area(struct sti_mixer *mixer,
int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane)
{
- int plane_id, depth = plane->zorder;
+ int plane_id, depth = plane->drm_plane.state->normalized_zpos;
unsigned int i;
u32 mask, val;
- if ((depth < 1) || (depth > GAM_MIXER_NB_DEPTH_LEVEL))
- return 1;
-
switch (plane->desc) {
case STI_GDP_0:
plane_id = GAM_DEPTH_GDP0_ID;
@@ -278,8 +275,8 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane)
break;
}
- mask |= GAM_DEPTH_MASK_ID << (3 * (depth - 1));
- plane_id = plane_id << (3 * (depth - 1));
+ mask |= GAM_DEPTH_MASK_ID << (3 * depth);
+ plane_id = plane_id << (3 * depth);
DRM_DEBUG_DRIVER("%s %s depth=%d\n", sti_mixer_to_str(mixer),
sti_plane_to_str(plane), depth);