diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-07 10:24:06 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-14 09:06:27 +0200 |
commit | fc42e89fe514cecc52b8547ffb7784a758c2c450 (patch) | |
tree | 452cf1baeacbe5629d0f25f0b55363075fee0a6d /drivers | |
parent | da568d5e352c95c6278ddc2778cbd36b5ea65b09 (diff) |
drm/mgag200: Move PLL setup out of mode-setting function
Makes the code slightly more flexible. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-3-tzimmermann@suse.de
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_mode.c | 5 |
1 files 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); |