diff options
| author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2018-03-21 06:20:29 -0400 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-03-28 02:45:45 -0400 |
| commit | 23936ba940fbccf08f9f61d7c6d39ba0feb383bc (patch) | |
| tree | f2dc50adf009e09a2f32469e9e16b1c63442cb34 | |
| parent | 75def7785f4901b65a89dc99ea9506b1395242fa (diff) | |
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
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_drv.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 3632854c2b91..ef3b0e3571ec 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c | |||
| @@ -319,6 +319,9 @@ static int omap_modeset_init(struct drm_device *dev) | |||
| 319 | dev->mode_config.max_width = 8192; | 319 | dev->mode_config.max_width = 8192; |
| 320 | dev->mode_config.max_height = 8192; | 320 | dev->mode_config.max_height = 8192; |
| 321 | 321 | ||
| 322 | /* We want the zpos to be normalized */ | ||
| 323 | dev->mode_config.normalize_zpos = true; | ||
| 324 | |||
| 322 | dev->mode_config.funcs = &omap_mode_config_funcs; | 325 | dev->mode_config.funcs = &omap_mode_config_funcs; |
| 323 | dev->mode_config.helper_private = &omap_mode_config_helper_funcs; | 326 | dev->mode_config.helper_private = &omap_mode_config_helper_funcs; |
| 324 | 327 | ||
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 2899435cad6e..161233cbc9a0 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
| @@ -65,7 +65,7 @@ static void omap_plane_atomic_update(struct drm_plane *plane, | |||
| 65 | info.rotation_type = OMAP_DSS_ROT_NONE; | 65 | info.rotation_type = OMAP_DSS_ROT_NONE; |
| 66 | info.rotation = DRM_MODE_ROTATE_0; | 66 | info.rotation = DRM_MODE_ROTATE_0; |
| 67 | info.global_alpha = 0xff; | 67 | info.global_alpha = 0xff; |
| 68 | info.zorder = state->zpos; | 68 | info.zorder = state->normalized_zpos; |
| 69 | 69 | ||
| 70 | /* update scanout: */ | 70 | /* update scanout: */ |
| 71 | omap_framebuffer_update_scanout(state->fb, state, &info); | 71 | omap_framebuffer_update_scanout(state->fb, state, &info); |
