diff options
author | Dave Airlie <airlied@redhat.com> | 2016-11-07 09:37:09 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-11-07 09:37:09 +1000 |
commit | 7b624ad8fea1be7ff4c22643e212191aa6a2a3c2 (patch) | |
tree | 41d0357d3259868cd85521c3fb9578cd2fc13831 /drivers/gpu/drm/mgag200 | |
parent | dc345c46774bc150ab852d2c74ee6542de438d46 (diff) | |
parent | bc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff) | |
download | linux-7b624ad8fea1be7ff4c22643e212191aa6a2a3c2.tar.bz2 |
Backmerge tag 'v4.9-rc4' into drm-next
Linux 4.9-rc4
This is needed for nouveau development.
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_ttm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_ttm.c b/drivers/gpu/drm/mgag200/mgag200_ttm.c index 83272b456329..5e20220ef4c6 100644 --- a/drivers/gpu/drm/mgag200/mgag200_ttm.c +++ b/drivers/gpu/drm/mgag200/mgag200_ttm.c @@ -267,6 +267,9 @@ int mgag200_mm_init(struct mga_device *mdev) return ret; } + arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0), + pci_resource_len(dev->pdev, 0)); + mdev->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0), pci_resource_len(dev->pdev, 0)); @@ -275,10 +278,14 @@ int mgag200_mm_init(struct mga_device *mdev) void mgag200_mm_fini(struct mga_device *mdev) { + struct drm_device *dev = mdev->dev; + ttm_bo_device_release(&mdev->ttm.bdev); mgag200_ttm_global_release(mdev); + arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0), + pci_resource_len(dev->pdev, 0)); arch_phys_wc_del(mdev->fb_mtrr); mdev->fb_mtrr = 0; } |