drm/ast: Enable CRTC before planes
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Sep 2020 07:22:36 +0000 (09:22 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 16 Sep 2020 11:08:10 +0000 (13:08 +0200)
An active cursor plane requires a valid display mode. Change the
commit_tail callback, so that it sets up the CRTC's mode before
updating planes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200914072236.19398-5-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c

index fd0127f48fb9b4a5321ab9b336ad288aeade4413..834a156e3a7502b0626e983c4483f2ef0e3df3f5 100644 (file)
@@ -1068,6 +1068,11 @@ static int ast_connector_init(struct drm_device *dev)
  * Mode config
  */
 
+static const struct drm_mode_config_helper_funcs
+ast_mode_config_helper_funcs = {
+       .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
+};
+
 static const struct drm_mode_config_funcs ast_mode_config_funcs = {
        .fb_create = drm_gem_fb_create,
        .mode_valid = drm_vram_helper_mode_valid,
@@ -1107,6 +1112,8 @@ int ast_mode_config_init(struct ast_private *ast)
                dev->mode_config.max_height = 1200;
        }
 
+       dev->mode_config.helper_private = &ast_mode_config_helper_funcs;
+
        memset(&ast->primary_plane, 0, sizeof(ast->primary_plane));
        ret = drm_universal_plane_init(dev, &ast->primary_plane, 0x01,
                                       &ast_primary_plane_funcs,