Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c04d0161 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/i915: Drop get/put_pages for scratch page



While discussing/reviewing __GFP_MOVEABLE behaviour and interactions
with our various page allocations on irc Chris brought up that the
scratch page isn't allocated as moveable, but we still grab/put a
reference to lock it in place. Which is unecessary.

So drop that.

Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent e259f172
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -1752,7 +1752,6 @@ static int setup_scratch_page(struct drm_device *dev)
	page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
	page = alloc_page(GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
	if (page == NULL)
	if (page == NULL)
		return -ENOMEM;
		return -ENOMEM;
	get_page(page);
	set_pages_uc(page, 1);
	set_pages_uc(page, 1);


#ifdef CONFIG_INTEL_IOMMU
#ifdef CONFIG_INTEL_IOMMU
@@ -1777,7 +1776,6 @@ static void teardown_scratch_page(struct drm_device *dev)
	set_pages_wb(page, 1);
	set_pages_wb(page, 1);
	pci_unmap_page(dev->pdev, dev_priv->gtt.base.scratch.addr,
	pci_unmap_page(dev->pdev, dev_priv->gtt.base.scratch.addr,
		       PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
		       PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
	put_page(page);
	__free_page(page);
	__free_page(page);
}
}