From 83e92eb20a4dac778928e163b9903eae05baeb6b Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Fri, 6 Mar 2020 17:04:01 -0800 Subject: [PATCH] NXP: linux: remove uneeded patch to allow build to compile --- ...t-functions-to-get-CMA-base-and-size.patch | 31 ----------- ...ute-linear-window-offset-if-possible.patch | 52 ------------------- 2 files changed, 83 deletions(-) delete mode 100644 projects/NXP/devices/iMX6/patches/linux/linux-0001-mm-cma-export-functions-to-get-CMA-base-and-size.patch delete mode 100644 projects/NXP/devices/iMX6/patches/linux/linux-0002-drm-etnaviv-use-CMA-area-to-compute-linear-window-offset-if-possible.patch diff --git a/projects/NXP/devices/iMX6/patches/linux/linux-0001-mm-cma-export-functions-to-get-CMA-base-and-size.patch b/projects/NXP/devices/iMX6/patches/linux/linux-0001-mm-cma-export-functions-to-get-CMA-base-and-size.patch deleted file mode 100644 index d6693d3ba2..0000000000 --- a/projects/NXP/devices/iMX6/patches/linux/linux-0001-mm-cma-export-functions-to-get-CMA-base-and-size.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Lucas Stach -Subject: [PATCH 1/2] mm: cma: export functions to get CMA base and size -Date: Wed, 29 May 2019 12:43:11 +0200 - -Make them usable in modules. Some drivers want to know where their -device CMA area is located to make better decisions about the DMA -programming. - -Signed-off-by: Lucas Stach ---- - mm/cma.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/mm/cma.c b/mm/cma.c -index 3340ef34c154..191c89bf038d 100644 ---- a/mm/cma.c -+++ b/mm/cma.c -@@ -44,11 +44,13 @@ phys_addr_t cma_get_base(const struct cma *cma) - { - return PFN_PHYS(cma->base_pfn); - } -+EXPORT_SYMBOL_GPL(cma_get_base); - - unsigned long cma_get_size(const struct cma *cma) - { - return cma->count << PAGE_SHIFT; - } -+EXPORT_SYMBOL_GPL(cma_get_size); - - const char *cma_get_name(const struct cma *cma) - { diff --git a/projects/NXP/devices/iMX6/patches/linux/linux-0002-drm-etnaviv-use-CMA-area-to-compute-linear-window-offset-if-possible.patch b/projects/NXP/devices/iMX6/patches/linux/linux-0002-drm-etnaviv-use-CMA-area-to-compute-linear-window-offset-if-possible.patch deleted file mode 100644 index 1da5f15490..0000000000 --- a/projects/NXP/devices/iMX6/patches/linux/linux-0002-drm-etnaviv-use-CMA-area-to-compute-linear-window-offset-if-possible.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Lucas Stach -Subject: [PATCH 2/2] drm/etnaviv: use CMA area to compute linear window offset - if possible -Date: Wed, 29 May 2019 12:43:12 +0200 - -The dma_required_mask might overestimate the memory size, or might not match -up with the CMA area placement for other reasons. Get the information about -CMA area placement directly from CMA where it is available, but keep the -dma_required_mask as an approximate fallback for architectures where CMA is -not available. - -Signed-off-by: Lucas Stach ---- - drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c -index 72d01e873160..b144f1bbbb3c 100644 ---- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c -+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c -@@ -4,7 +4,9 @@ - */ - - #include -+#include - #include -+#include - #include - #include - #include -@@ -724,11 +726,18 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) - */ - if (!(gpu->identity.features & chipFeatures_PIPE_3D) || - (gpu->identity.minor_features0 & chipMinorFeatures0_MC20)) { -- u32 dma_mask = (u32)dma_get_required_mask(gpu->dev); -- if (dma_mask < PHYS_OFFSET + SZ_2G) -+ struct cma *cma = dev_get_cma_area(gpu->dev); -+ phys_addr_t end_mask; -+ -+ if (cma) -+ end_mask = cma_get_base(cma) - 1 + cma_get_size(cma); -+ else -+ end_mask = dma_get_required_mask(gpu->dev); -+ -+ if (end_mask < PHYS_OFFSET + SZ_2G) - gpu->memory_base = PHYS_OFFSET; - else -- gpu->memory_base = dma_mask - SZ_2G + 1; -+ gpu->memory_base = end_mask - SZ_2G + 1; - } else if (PHYS_OFFSET >= SZ_2G) { - dev_info(gpu->dev, "Need to move linear window on MC1.0, disabling TS\n"); - gpu->memory_base = PHYS_OFFSET;