drm (ast, cirrus, mgag200, nouveau, savage, vmwgfx): Remove drm_mtrr_{add, del}
This replaces drm_mtrr_{add,del} with arch_phys_wc_{add,del}. The interface is simplified (because the base and size parameters to drm_mtrr_del never did anything), and it no longer adds MTRRs on systems that don't need them. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
此提交包含在:
@@ -271,9 +271,8 @@ int cirrus_mm_init(struct cirrus_device *cirrus)
|
||||
return ret;
|
||||
}
|
||||
|
||||
cirrus->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 0),
|
||||
pci_resource_len(dev->pdev, 0),
|
||||
DRM_MTRR_WC);
|
||||
cirrus->fb_mtrr = arch_phys_wc_add(pci_resource_start(dev->pdev, 0),
|
||||
pci_resource_len(dev->pdev, 0));
|
||||
|
||||
cirrus->mm_inited = true;
|
||||
return 0;
|
||||
@@ -281,8 +280,6 @@ 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;
|
||||
|
||||
@@ -290,12 +287,8 @@ void cirrus_mm_fini(struct cirrus_device *cirrus)
|
||||
|
||||
cirrus_ttm_global_release(cirrus);
|
||||
|
||||
if (cirrus->fb_mtrr >= 0) {
|
||||
drm_mtrr_del(cirrus->fb_mtrr,
|
||||
pci_resource_start(dev->pdev, 0),
|
||||
pci_resource_len(dev->pdev, 0), DRM_MTRR_WC);
|
||||
cirrus->fb_mtrr = -1;
|
||||
}
|
||||
arch_phys_wc_del(cirrus->fb_mtrr);
|
||||
cirrus->fb_mtrr = 0;
|
||||
}
|
||||
|
||||
void cirrus_ttm_placement(struct cirrus_bo *bo, int domain)
|
||||
|
新增問題並參考
封鎖使用者