diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-16 14:53:50 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-20 09:16:08 +0200 |
commit | 8e46dc585389fedd1563698214b2153825789e1e (patch) | |
tree | 5f1cd637430b661fe040a8a435a8d4438222dca4 /drivers | |
parent | 48fde424c2f7ea7f6f324dcfd292cc50a850367c (diff) |
drm/ast: Use managed VRAM-helper initialization
As a first step to managed MM code in ast, switch over VRAM MM helpers.
v2:
* updated to use drmm_vram_helper_init()
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-4-tzimmermann@suse.de
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/ast/ast_mm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/ast/ast_mm.c b/drivers/gpu/drm/ast/ast_mm.c index 9c3788a4c1c5..f0a96cae68c9 100644 --- a/drivers/gpu/drm/ast/ast_mm.c +++ b/drivers/gpu/drm/ast/ast_mm.c @@ -35,15 +35,12 @@ int ast_mm_init(struct ast_private *ast) { - struct drm_vram_mm *vmm; int ret; struct drm_device *dev = ast->dev; - vmm = drm_vram_helper_alloc_mm( - dev, pci_resource_start(dev->pdev, 0), - ast->vram_size); - if (IS_ERR(vmm)) { - ret = PTR_ERR(vmm); + ret = drmm_vram_helper_init(dev, pci_resource_start(dev->pdev, 0), + ast->vram_size); + if (ret) { drm_err(dev, "Error initializing VRAM MM; %d\n", ret); return ret; } @@ -60,8 +57,6 @@ void ast_mm_fini(struct ast_private *ast) { struct drm_device *dev = ast->dev; - drm_vram_helper_release_mm(dev); - arch_phys_wc_del(ast->fb_mtrr); arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0), pci_resource_len(dev->pdev, 0)); |