diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2022-06-01 13:25:17 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2022-06-07 09:39:54 +0200 |
commit | b62d943e9686e791dd39f8bde302fc27446cdca9 (patch) | |
tree | dc05ebabd25938439ebab8d913acc86eabd772d7 /drivers/gpu/drm/mgag200/mgag200_g200wb.c | |
parent | d45e32c9d98ce7c22a4bafe69cee58165b59533b (diff) | |
download | linux-b62d943e9686e791dd39f8bde302fc27446cdca9.tar.bz2 |
drm/mgag200: Implement new init logic
Rework mgag200_regs_init() and mgag200_mm_init() into device preinit
and init functions. The preinit function, mgag200_device_preinit(),
requests and maps a device's I/O and video memory. The init function,
mgag200_device_init() initializes the state of struct mga_device.
Splitting the initialization between the two functions is necessary
to perform per-model operations between the two calls, such as reading
the unique revision ID on G200SEs.
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-6-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_g200wb.c')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_g200wb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_g200wb.c b/drivers/gpu/drm/mgag200/mgag200_g200wb.c index 38e374c00419..776bad867b4d 100644 --- a/drivers/gpu/drm/mgag200/mgag200_g200wb.c +++ b/drivers/gpu/drm/mgag200/mgag200_g200wb.c @@ -29,14 +29,11 @@ struct mga_device *mgag200_g200wb_device_create(struct pci_dev *pdev, const stru if (ret) return ERR_PTR(ret); - mdev->flags = flags; - mdev->type = type; - - ret = mgag200_regs_init(mdev); + ret = mgag200_device_preinit(mdev); if (ret) return ERR_PTR(ret); - ret = mgag200_mm_init(mdev); + ret = mgag200_device_init(mdev, type, flags); if (ret) return ERR_PTR(ret); |