[PATCH v1 2/4] drm/ast: Set display mode in atomic_begin()

Thomas Zimmermann tzimmermann at suse.de
Wed Aug 5 10:54:26 UTC 2020


Move the mode-setting code from atomic_flush() to atomic_begin(), and
thus before the plane update. With the CRTC update before the plane
updates, the cursor can be disabled while the mode is being changed.

The patch removes the call ast_open_key() from atomic_begin(), The
function unlocks ast's extended display registers; something that has
been done at this point already.

The now-empty implementation of atomic_flush() is also being removed.

Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Fixes: 4961eb60f145 ("drm/ast: Enable atomic modesetting")
Cc: Thomas Zimmermann <tzimmermann at suse.de>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Dave Airlie <airlied at redhat.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Sam Ravnborg <sam at ravnborg.org>
Cc: Emil Velikov <emil.l.velikov at gmail.com>
Cc: "Y.C. Chen" <yc_chen at aspeedtech.com>
Cc: <stable at vger.kernel.org> # v5.6+
---
 drivers/gpu/drm/ast/ast_mode.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index b129833c0821..0ea8a68ac2d9 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -757,14 +757,6 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
 
 static void ast_crtc_helper_atomic_begin(struct drm_crtc *crtc,
 					 struct drm_crtc_state *old_crtc_state)
-{
-	struct ast_private *ast = to_ast_private(crtc->dev);
-
-	ast_open_key(ast);
-}
-
-static void ast_crtc_helper_atomic_flush(struct drm_crtc *crtc,
-					 struct drm_crtc_state *old_crtc_state)
 {
 	struct drm_device *dev = crtc->dev;
 	struct ast_private *ast = to_ast_private(dev);
@@ -813,7 +805,6 @@ ast_crtc_helper_atomic_disable(struct drm_crtc *crtc,
 static const struct drm_crtc_helper_funcs ast_crtc_helper_funcs = {
 	.atomic_check = ast_crtc_helper_atomic_check,
 	.atomic_begin = ast_crtc_helper_atomic_begin,
-	.atomic_flush = ast_crtc_helper_atomic_flush,
 	.atomic_enable = ast_crtc_helper_atomic_enable,
 	.atomic_disable = ast_crtc_helper_atomic_disable,
 };
-- 
2.28.0



More information about the dri-devel mailing list