Skip to content

Commit a18301b

Browse files
Peter Ujfalusitomba
authored andcommitted
drm/tegra: Let core take care of normalizing the zpos
Set the drm_mode_config->normalize_zpos and call the generic drm_atomic_helper_check() instead of duplicating it within tegra_atomic_check(). Call tegra_display_hub_atomic_check() after the drm_atomic_helpre_check() returned without error. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> CC: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180321102029.15248-4-peter.ujfalusi@ti.com
1 parent a7da5cf commit a18301b

File tree

1 file changed

+4
-17
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+4
-17
lines changed

drivers/gpu/drm/tegra/drm.c

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,11 @@ static int tegra_atomic_check(struct drm_device *drm,
3838
{
3939
int err;
4040

41-
err = drm_atomic_helper_check_modeset(drm, state);
41+
err = drm_atomic_helper_check(drm, state);
4242
if (err < 0)
4343
return err;
4444

45-
err = tegra_display_hub_atomic_check(drm, state);
46-
if (err < 0)
47-
return err;
48-
49-
err = drm_atomic_normalize_zpos(drm, state);
50-
if (err < 0)
51-
return err;
52-
53-
err = drm_atomic_helper_check_planes(drm, state);
54-
if (err < 0)
55-
return err;
56-
57-
if (state->legacy_cursor_update)
58-
state->async_update = !drm_atomic_helper_async_check(drm, state);
59-
60-
return 0;
45+
return tegra_display_hub_atomic_check(drm, state);
6146
}
6247

6348
static const struct drm_mode_config_funcs tegra_drm_mode_config_funcs = {
@@ -151,6 +136,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
151136

152137
drm->mode_config.allow_fb_modifiers = true;
153138

139+
drm->mode_config.normalize_zpos = true;
140+
154141
drm->mode_config.funcs = &tegra_drm_mode_config_funcs;
155142
drm->mode_config.helper_private = &tegra_drm_mode_config_helpers;
156143

0 commit comments

Comments
 (0)