summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500/psb_drv.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-03-08 20:52:18 +0100
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2022-03-16 17:42:21 +0100
commitd00f44ddfbb18d73fab98492e5fcb43281564f4f (patch)
tree16faa9ae7419fa6cbcd0becbed6f42a37eb26c36 /drivers/gpu/drm/gma500/psb_drv.c
parentdrm/gma500: Cleanup GTT uninit and error handling (diff)
downloadlinux-d00f44ddfbb18d73fab98492e5fcb43281564f4f.tar.xz
linux-d00f44ddfbb18d73fab98492e5fcb43281564f4f.zip
drm/gma500: Split GTT init/resume/fini into GTT and GEM functions
The GTT init, fini and resume functions contain both, GTT and GEM, code. Split each into a separate GTT and a GEM function. The GEM code is responsible for mmap_mutex and the stolen memory area. The rest of the functionality is left in GTT functions. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220308195222.13471-9-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/gma500/psb_drv.c')
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 41be6e1ac7f9..6547967b51e1 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -192,6 +192,7 @@ static void psb_driver_unload(struct drm_device *dev)
psb_mmu_driver_takedown(dev_priv->mmu);
dev_priv->mmu = NULL;
}
+ psb_gem_mm_fini(dev);
psb_gtt_fini(dev);
if (dev_priv->scratch_page) {
set_pages_wb(dev_priv->scratch_page, 1);
@@ -327,6 +328,9 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
ret = psb_gtt_init(dev);
if (ret)
goto out_err;
+ ret = psb_gem_mm_init(dev);
+ if (ret)
+ goto out_err;
ret = -ENOMEM;