Skip to content

Commit 23936ba

Browse files
Peter Ujfalusitomba
authored andcommitted
drm/omap: Use normalized zpos for plane placement
Planes with identical zpos value will result undefined behavior: disappearing planes, screen flickering and it is not supported by the hardware. Use normalized zpos to make sure that we don't encounter invalid configuration. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> CC: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180321102029.15248-7-peter.ujfalusi@ti.com
1 parent 75def77 commit 23936ba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/gpu/drm/omapdrm/omap_drv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ static int omap_modeset_init(struct drm_device *dev)
319319
dev->mode_config.max_width = 8192;
320320
dev->mode_config.max_height = 8192;
321321

322+
/* We want the zpos to be normalized */
323+
dev->mode_config.normalize_zpos = true;
324+
322325
dev->mode_config.funcs = &omap_mode_config_funcs;
323326
dev->mode_config.helper_private = &omap_mode_config_helper_funcs;
324327

drivers/gpu/drm/omapdrm/omap_plane.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static void omap_plane_atomic_update(struct drm_plane *plane,
6565
info.rotation_type = OMAP_DSS_ROT_NONE;
6666
info.rotation = DRM_MODE_ROTATE_0;
6767
info.global_alpha = 0xff;
68-
info.zorder = state->zpos;
68+
info.zorder = state->normalized_zpos;
6969

7070
/* update scanout: */
7171
omap_framebuffer_update_scanout(state->fb, state, &info);

0 commit comments

Comments
 (0)