From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org,
kraxel@redhat.com, emil.l.velikov@gmail.com
Cc: dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
"Y.C. Chen" <yc_chen@aspeedtech.com>,
stable@vger.kernel.org
Subject: [PATCH v1 3/4] drm/ast: Add commit-tail function
Date: Wed, 5 Aug 2020 12:54:27 +0200 [thread overview]
Message-ID: <20200805105428.2590-4-tzimmermann@suse.de> (raw)
In-Reply-To: <20200805105428.2590-1-tzimmermann@suse.de>
Duplicates drm_atomic_helper_commit_tail(), so that planes can be
disabled on full mode-setting changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 4961eb60f145 ("drm/ast: Enable atomic modesetting")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
Cc: <stable@vger.kernel.org> # v5.6+
---
drivers/gpu/drm/ast/ast_mode.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 0ea8a68ac2d9..ae5cb0a333f7 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -1043,6 +1043,31 @@ static int ast_connector_init(struct drm_device *dev)
* Mode config
*/
+static void
+ast_mode_config_helper_commit_tail(struct drm_atomic_state *old_state)
+{
+ struct drm_device *dev = old_state->dev;
+
+ drm_atomic_helper_commit_modeset_disables(dev, old_state);
+
+ drm_atomic_helper_commit_planes(dev, old_state, 0);
+
+ drm_atomic_helper_commit_modeset_enables(dev, old_state);
+
+ drm_atomic_helper_fake_vblank(old_state);
+
+ drm_atomic_helper_commit_hw_done(old_state);
+
+ drm_atomic_helper_wait_for_vblanks(dev, old_state);
+
+ drm_atomic_helper_cleanup_planes(dev, old_state);
+}
+
+static const struct drm_mode_config_helper_funcs
+ast_mode_config_helper_funcs = {
+ .atomic_commit_tail = ast_mode_config_helper_commit_tail,
+};
+
static const struct drm_mode_config_funcs ast_mode_config_funcs = {
.fb_create = drm_gem_fb_create,
.mode_valid = drm_vram_helper_mode_valid,
@@ -1082,6 +1107,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,
--
2.28.0
next prev parent reply other threads:[~2020-08-05 20:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200805105428.2590-1-tzimmermann@suse.de>
2020-08-05 10:54 ` [PATCH v1 1/4] drm/ast: Only set format registers if primary plane's format changes Thomas Zimmermann
2020-08-09 15:53 ` Sasha Levin
2020-08-13 16:25 ` Sasha Levin
2020-08-19 23:57 ` Sasha Levin
2020-08-26 13:54 ` Sasha Levin
2020-08-27 9:10 ` Thomas Zimmermann
2020-08-05 10:54 ` [PATCH v1 2/4] drm/ast: Set display mode in atomic_begin() Thomas Zimmermann
2020-08-09 15:53 ` Sasha Levin
2020-08-13 16:25 ` Sasha Levin
2020-08-19 23:56 ` Sasha Levin
2020-08-26 13:53 ` Sasha Levin
2020-08-05 10:54 ` Thomas Zimmermann [this message]
2020-08-09 15:53 ` [PATCH v1 3/4] drm/ast: Add commit-tail function Sasha Levin
2020-08-13 16:25 ` Sasha Levin
2020-08-19 23:56 ` Sasha Levin
2020-08-26 13:53 ` Sasha Levin
2020-08-05 10:54 ` [PATCH v1 4/4] drm/ast: Disable planes while switching display modes Thomas Zimmermann
2020-08-07 8:50 ` daniel
2020-08-12 8:25 ` Thomas Zimmermann
2020-08-12 14:04 ` Daniel Vetter
2020-08-09 15:53 ` Sasha Levin
2020-08-13 16:25 ` Sasha Levin
2020-08-19 23:56 ` Sasha Levin
2020-08-26 13:53 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200805105428.2590-4-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=kraxel@redhat.com \
--cc=sam@ravnborg.org \
--cc=stable@vger.kernel.org \
--cc=yc_chen@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).