All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org,
	emil.velikov@collabora.com, kraxel@redhat.com,
	john.p.donnelly@oracle.com, lyude@redhat.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/7] drm/mgag200: Move PLL setup out of mode-setting function
Date: Tue,  7 Jul 2020 10:24:06 +0200	[thread overview]
Message-ID: <20200707082411.6583-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20200707082411.6583-1-tzimmermann@suse.de>

Makes the code slightly more flexible. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/mgag200/mgag200_mode.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 9037057d3b3a..d9612f531e52 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -712,7 +712,7 @@ static int mga_g200er_set_plls(struct mga_device *mdev, long clock)
 	return 0;
 }
 
-static int mga_crtc_set_plls(struct mga_device *mdev, long clock)
+static int mgag200_crtc_set_plls(struct mga_device *mdev, long clock)
 {
 	u8 misc;
 
@@ -1110,8 +1110,6 @@ static void mgag200_set_mode_regs(struct mga_device *mdev,
 	WREG_ECRT(0x05, crtcext5);
 
 	WREG8(MGA_MISC_OUT, misc);
-
-	mga_crtc_set_plls(mdev, mode->clock);
 }
 
 static u8 mgag200_get_bpp_shift(struct mga_device *mdev,
@@ -1614,6 +1612,7 @@ mgag200_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
 
 	mgag200_set_format_regs(mdev, fb);
 	mgag200_set_mode_regs(mdev, adjusted_mode);
+	mgag200_crtc_set_plls(mdev, adjusted_mode->clock);
 
 	if (mdev->type == G200_ER)
 		mgag200_g200er_reset_tagfifo(mdev);
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-07-07  8:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  8:24 [PATCH 0/7] drm/mgag200: Inline prepare/commit helpers Thomas Zimmermann
2020-07-07  8:24 ` [PATCH 1/7] drm/mgag200: Don't write-protect CRTC 0-7 while in mga_crtc_prepare() Thomas Zimmermann
2020-07-07  8:24 ` Thomas Zimmermann [this message]
2020-07-07  8:24 ` [PATCH 3/7] drm/mgag200: Don't set or clear <scroff> field during modeset Thomas Zimmermann
2020-07-07  8:24 ` [PATCH 4/7] drm/mgag200: Split DPMS function into helpers Thomas Zimmermann
2020-07-07  8:24 ` [PATCH 5/7] drm/mgag200: Set/clear <syncrst> field in display enable/disable helpers Thomas Zimmermann
2020-07-07  8:24 ` [PATCH 6/7] drm/mgag200: Rename G200WB prepare/commit function Thomas Zimmermann
2020-07-07  8:24 ` [PATCH 7/7] drm/mgag200: Inline mga_crtc_{prepare, commit}() into enable function Thomas Zimmermann
2020-07-07 16:40 ` [PATCH 0/7] drm/mgag200: Inline prepare/commit helpers Lyude Paul
2020-07-14  9:02   ` Thomas Zimmermann

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=20200707082411.6583-3-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=john.p.donnelly@oracle.com \
    --cc=kraxel@redhat.com \
    --cc=lyude@redhat.com \
    --cc=sam@ravnborg.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.