drm/mgag200: Set MISC memory flags in mm init code
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> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-6-tzimmermann@suse.de
This commit is contained in:
parent
78e5b5036a
commit
b9fa77ec1a
|
@ -90,9 +90,15 @@ static void mgag200_mm_release(struct drm_device *dev, void *ptr)
|
||||||
int mgag200_mm_init(struct mga_device *mdev)
|
int mgag200_mm_init(struct mga_device *mdev)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = &mdev->base;
|
struct drm_device *dev = &mdev->base;
|
||||||
|
u8 misc;
|
||||||
resource_size_t start, len;
|
resource_size_t start, len;
|
||||||
int ret;
|
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 */
|
/* BAR 0 is VRAM */
|
||||||
start = pci_resource_start(dev->pdev, 0);
|
start = pci_resource_start(dev->pdev, 0);
|
||||||
len = pci_resource_len(dev->pdev, 0);
|
len = pci_resource_len(dev->pdev, 0);
|
||||||
|
|
|
@ -978,9 +978,7 @@ static void mgag200_init_regs(struct mga_device *mdev)
|
||||||
WREG_ECRT(0x34, 0x5);
|
WREG_ECRT(0x34, 0x5);
|
||||||
|
|
||||||
misc = RREG8(MGA_MISC_IN);
|
misc = RREG8(MGA_MISC_IN);
|
||||||
misc |= MGAREG_MISC_IOADSEL |
|
misc |= MGAREG_MISC_IOADSEL;
|
||||||
MGAREG_MISC_RAMMAPEN |
|
|
||||||
MGAREG_MISC_HIGH_PG_SEL;
|
|
||||||
WREG8(MGA_MISC_OUT, misc);
|
WREG8(MGA_MISC_OUT, misc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue