diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-06-01 14:25:16 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-06-07 10:39:51 +0300 |
commit | d45e32c9d98ce7c22a4bafe69cee58165b59533b (patch) | |
tree | 0479e9f3cb16036722eb011b6c73c192530b5a35 /drivers/gpu/drm/mgag200/mgag200_g200.c | |
parent | ce19021fd99ab2c915f2b44b0df39bef75f11d18 (diff) | |
download | linux-d45e32c9d98ce7c22a4bafe69cee58165b59533b.tar.xz |
drm/mgag200: Call mgag200_device_probe_vram() from per-model init
Call mgag200_device_probe_vram() from each model's initializer. The
G200EW3 uses a special helper with additional instructions.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220601112522.5774-5-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_g200.c')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_g200.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_g200.c b/drivers/gpu/drm/mgag200/mgag200_g200.c index b9ec6367719c..4e30b54a2677 100644 --- a/drivers/gpu/drm/mgag200/mgag200_g200.c +++ b/drivers/gpu/drm/mgag200/mgag200_g200.c @@ -162,6 +162,7 @@ struct mga_device *mgag200_g200_device_create(struct pci_dev *pdev, const struct struct mgag200_g200_device *g200; struct mga_device *mdev; struct drm_device *dev; + resource_size_t vram_available; int ret; g200 = devm_drm_dev_alloc(&pdev->dev, drv, struct mgag200_g200_device, base.base); @@ -189,7 +190,9 @@ struct mga_device *mgag200_g200_device_create(struct pci_dev *pdev, const struct if (ret) return ERR_PTR(ret); - ret = mgag200_modeset_init(mdev); + vram_available = mgag200_device_probe_vram(mdev); + + ret = mgag200_modeset_init(mdev, vram_available); if (ret) return ERR_PTR(ret); |