diff options
author | Dave Airlie <airlied@redhat.com> | 2016-11-07 02:37:09 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-11-07 02:37:09 +0300 |
commit | 7b624ad8fea1be7ff4c22643e212191aa6a2a3c2 (patch) | |
tree | 41d0357d3259868cd85521c3fb9578cd2fc13831 /drivers/gpu/drm/cirrus | |
parent | dc345c46774bc150ab852d2c74ee6542de438d46 (diff) | |
parent | bc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff) | |
download | linux-7b624ad8fea1be7ff4c22643e212191aa6a2a3c2.tar.xz |
Backmerge tag 'v4.9-rc4' into drm-next
Linux 4.9-rc4
This is needed for nouveau development.
Diffstat (limited to 'drivers/gpu/drm/cirrus')
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_ttm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index de52b20800e1..d6da848f7c6f 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -268,6 +268,9 @@ int cirrus_mm_init(struct cirrus_device *cirrus) return ret; } + arch_io_reserve_memtype_wc(pci_resource_start(dev->pdev, 0), + pci_resource_len(dev->pdev, 0)); + cirrus->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0), pci_resource_len(dev->pdev, 0)); @@ -277,6 +280,8 @@ int cirrus_mm_init(struct cirrus_device *cirrus) void cirrus_mm_fini(struct cirrus_device *cirrus) { + struct drm_device *dev = cirrus->dev; + if (!cirrus->mm_inited) return; @@ -286,6 +291,8 @@ void cirrus_mm_fini(struct cirrus_device *cirrus) arch_phys_wc_del(cirrus->fb_mtrr); cirrus->fb_mtrr = 0; + arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0), + pci_resource_len(dev->pdev, 0)); } void cirrus_ttm_placement(struct cirrus_bo *bo, int domain) |