Skip to content

Commit

Permalink
drm/exynos: Fix default value for zpos plane property
Browse files Browse the repository at this point in the history
The default zpos property for all planes in Exynos DRM was fixed as zero.
Fix this by providing proper value provided by hardware drivers, which
typically matches hardware window number.

Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Fixes: e47726a ("drm/exynos: use generic code for managing zpos plane property")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Marek Szyprowski authored and Inki Dae committed May 24, 2018
1 parent e9497dc commit e9dfe83
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/gpu/drm/exynos/exynos_drm_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,12 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = {
};

static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
bool immutable)
int zpos, bool immutable)
{
/* FIXME */
if (immutable)
drm_plane_create_zpos_immutable_property(plane, 0);
drm_plane_create_zpos_immutable_property(plane, zpos);
else
drm_plane_create_zpos_property(plane, 0, 0, MAX_PLANE - 1);
drm_plane_create_zpos_property(plane, zpos, 0, MAX_PLANE - 1);
}

int exynos_plane_init(struct drm_device *dev,
Expand All @@ -320,7 +319,7 @@ int exynos_plane_init(struct drm_device *dev,
exynos_plane->index = index;
exynos_plane->config = config;

exynos_plane_attach_zpos_property(&exynos_plane->base,
exynos_plane_attach_zpos_property(&exynos_plane->base, config->zpos,
!(config->capabilities & EXYNOS_DRM_PLANE_CAP_ZPOS));

return 0;
Expand Down

0 comments on commit e9dfe83

Please sign in to comment.