From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@redhat.com, lyude@redhat.com,
sam@ravnborg.org, emil.velikov@collabora.com, krzk@kernel.org,
john.p.donnelly@Oracle.com, rong.a.chen@intel.com,
kraxel@redhat.com, eich@suse.com, tiwai@suse.de
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH v2 5/8] drm/mgag200: Set MISC memory flags in mm init code
Date: Thu, 30 Jul 2020 12:28:41 +0200 [thread overview]
Message-ID: <20200730102844.10995-6-tzimmermann@suse.de> (raw)
In-Reply-To: <20200730102844.10995-1-tzimmermann@suse.de>
The modesetting code initialized several memory-related flags in the
MISC register. Move this code to MM initialization.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/mgag200/mgag200_mm.c | 6 ++++++
drivers/gpu/drm/mgag200/mgag200_mode.c | 4 +---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_mm.c b/drivers/gpu/drm/mgag200/mgag200_mm.c
index 7b69392bcb89..1b1918839e1e 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mm.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mm.c
@@ -90,9 +90,15 @@ static void mgag200_mm_release(struct drm_device *dev, void *ptr)
int mgag200_mm_init(struct mga_device *mdev)
{
struct drm_device *dev = &mdev->base;
+ u8 misc;
resource_size_t start, len;
int ret;
+ misc = RREG8(MGA_MISC_IN);
+ misc |= MGAREG_MISC_RAMMAPEN |
+ MGAREG_MISC_HIGH_PG_SEL;
+ WREG8(MGA_MISC_OUT, misc);
+
/* BAR 0 is VRAM */
start = pci_resource_start(dev->pdev, 0);
len = pci_resource_len(dev->pdev, 0);
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 7161b1651aa0..66818ee10694 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -978,9 +978,7 @@ static void mgag200_init_regs(struct mga_device *mdev)
WREG_ECRT(0x34, 0x5);
misc = RREG8(MGA_MISC_IN);
- misc |= MGAREG_MISC_IOADSEL |
- MGAREG_MISC_RAMMAPEN |
- MGAREG_MISC_HIGH_PG_SEL;
+ misc |= MGAREG_MISC_IOADSEL;
WREG8(MGA_MISC_OUT, misc);
}
--
2.27.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-07-30 10:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 10:28 [PATCH v2 0/8] drm/mgag200: Support desktop chips Thomas Zimmermann
2020-07-30 10:28 ` [PATCH v2 1/8] drm/mgag200: Enable caching for SHMEM pages Thomas Zimmermann
2020-07-30 10:28 ` [PATCH v2 2/8] drm/mgag200: Move register initialization into helper function Thomas Zimmermann
2020-07-30 10:28 ` [PATCH v2 3/8] drm/mgag200: Initialize PCI registers early during device setup Thomas Zimmermann
2020-07-30 10:28 ` [PATCH v2 4/8] drm/mgag200: Enable MGA mode during device register initialization Thomas Zimmermann
2020-07-30 10:28 ` Thomas Zimmermann [this message]
2020-07-30 10:28 ` [PATCH v2 6/8] drm/mgag200: Clear <page> field during MM init Thomas Zimmermann
2020-07-30 10:28 ` [PATCH v2 7/8] drm/mgag200: Move G200SE's unique id into model-specific data Thomas Zimmermann
2020-07-30 10:28 ` [PATCH v2 8/8] drm/mgag200: Add support for G200 desktop cards 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=20200730102844.10995-6-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=eich@suse.com \
--cc=emil.velikov@collabora.com \
--cc=john.p.donnelly@Oracle.com \
--cc=kraxel@redhat.com \
--cc=krzk@kernel.org \
--cc=lyude@redhat.com \
--cc=rong.a.chen@intel.com \
--cc=sam@ravnborg.org \
--cc=tiwai@suse.de \
/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