]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Wean off drm_pci_alloc/drm_pci_free
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 2 Feb 2020 15:39:34 +0000 (15:39 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Feb 2020 13:06:19 +0000 (13:06 +0000)
commitbeaf358b33a98155da1c277124441b0a1db90f28
tree74ac7dde9698825694bf7df39da7e6620d3838f2
parent0b555073d670f30fd9f1ca165334c623f2c96628
drm/i915: Wean off drm_pci_alloc/drm_pci_free

drm_pci_alloc and drm_pci_free are just very thin wrappers around
dma_alloc_coherent, with a note that we should be removing them.
Furthermore since

commit b920220b383ed879d243ae3a791fff87a22a67b1
Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Date:   Fri Jan 15 16:51:42 2016 -0800

    page-flags: define PG_reserved behavior on compound pages

    As far as I can see there's no users of PG_reserved on compound pages.
    Let's use PF_NO_COMPOUND here.

drm_pci_alloc has been declared broken since it mixes GFP_COMP and
SetPageReserved. Avoid this conflict by weaning ourselves off using the
abstraction and using the dma functions directly.

Reported-by: Taketo Kabe
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1027
Fixes: b920220b383e ("page-flags: define PG_reserved behavior on compound pages")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <stable@vger.kernel.org> # v4.5+
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200202153934.3899472-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/i915_gem_phys.c
drivers/gpu/drm/i915/i915_gem.c