aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vboxvideo
diff options
context:
space:
mode:
authorTian Tao2021-03-03 09:39:46 +0800
committerDaniel Vetter2021-03-11 14:19:43 +0100
commit429fc6f9550eb4bd2b012831bafbb64dc318ae4b (patch)
tree3dc017aab6183341a2b6d447b39e57ab6331aa48 /drivers/gpu/drm/vboxvideo
parentb603e810f740e76b6a67089c06d7f4442b187a9a (diff)
drm/vboxvideo: Use managed VRAM-helper initialization
updated to use drmm_vram_helper_init(). Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1614735587-6621-1-git-send-email-tiantao6@hisilicon.com
Diffstat (limited to 'drivers/gpu/drm/vboxvideo')
-rw-r--r--drivers/gpu/drm/vboxvideo/vbox_ttm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vboxvideo/vbox_ttm.c b/drivers/gpu/drm/vboxvideo/vbox_ttm.c
index 0066a3c1dfc9..fd8a53a4d8d6 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_ttm.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_ttm.c
@@ -12,15 +12,13 @@
int vbox_mm_init(struct vbox_private *vbox)
{
- struct drm_vram_mm *vmm;
int ret;
struct drm_device *dev = &vbox->ddev;
struct pci_dev *pdev = to_pci_dev(dev->dev);
- vmm = drm_vram_helper_alloc_mm(dev, pci_resource_start(pdev, 0),
+ ret = drmm_vram_helper_init(dev, pci_resource_start(pdev, 0),
vbox->available_vram_size);
- if (IS_ERR(vmm)) {
- ret = PTR_ERR(vmm);
+ if (ret) {
DRM_ERROR("Error initializing VRAM MM; %d\n", ret);
return ret;
}
@@ -33,5 +31,4 @@ int vbox_mm_init(struct vbox_private *vbox)
void vbox_mm_fini(struct vbox_private *vbox)
{
arch_phys_wc_del(vbox->fb_mtrr);
- drm_vram_helper_release_mm(&vbox->ddev);
}