From: Eric Anholt Date: Thu, 30 Mar 2017 17:23:27 +0000 (-0700) Subject: Revert "drm/vc4: Verify at boot that CMA doesn't cross a 256MB boundary." X-Git-Tag: archive/raspbian/4.9.82-1+deb9u3+rpi1_jessie~5^2~256 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4540fe5d87c592707cc621a00cc58c5feef152a5;p=linux-4.9.git Revert "drm/vc4: Verify at boot that CMA doesn't cross a 256MB boundary." This reverts commit 016c804fa69381bd23a1a13cba08a3c4557fcdff. The restriction was lifted by the previous commit. --- diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c index 60f5c2591ccd..e167a1e1bccb 100644 --- a/drivers/base/dma-contiguous.c +++ b/drivers/base/dma-contiguous.c @@ -35,7 +35,6 @@ #endif struct cma *dma_contiguous_default_area; -EXPORT_SYMBOL(dma_contiguous_default_area); /* * Default global CMA area size can be defined in kernel's .config. diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index b2f6b7edf5d4..550fcdc57330 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -16,10 +16,7 @@ * this program. If not, see . */ -#include "linux/init.h" -#include "linux/cma.h" #include "linux/component.h" -#include "linux/dma-contiguous.h" #include "linux/pm_runtime.h" #include "vc4_drv.h" #include "vc4_regs.h" @@ -337,23 +334,8 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) struct drm_device *drm = dev_get_drvdata(master); struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_v3d *v3d = NULL; - struct cma *cma; int ret; - cma = dev_get_cma_area(dev); - if (!cma) - return -EINVAL; - - if ((cma_get_base(cma) & 0xf0000000) != - ((cma_get_base(cma) + cma_get_size(cma) - 1) & 0xf0000000)) { - DRM_ERROR("V3D requires that the CMA area (0x%08lx - 0x%08lx) " - "not span a 256MB boundary, or memory corruption " - "would happen.\n", - (long)cma_get_base(cma), - cma_get_base(cma) + cma_get_size(cma)); - return -EINVAL; - } - v3d = devm_kzalloc(&pdev->dev, sizeof(*v3d), GFP_KERNEL); if (!v3d) return -ENOMEM; diff --git a/mm/cma.c b/mm/cma.c index 6a242bd373f2..397687fc51f9 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -47,13 +47,11 @@ phys_addr_t cma_get_base(const struct cma *cma) { return PFN_PHYS(cma->base_pfn); } -EXPORT_SYMBOL(cma_get_base); unsigned long cma_get_size(const struct cma *cma) { return cma->count << PAGE_SHIFT; } -EXPORT_SYMBOL(cma_get_size); static unsigned long cma_bitmap_aligned_mask(const struct cma *cma, unsigned int align_order)