{"push_id":1144661062,"size":1,"distinct_size":1,"ref":"refs/heads/real","head":"29d9f055fc6064caec414a9b12b13263daf4733a","before":"93cdfcefabb7577c4b7a0ab6c80920bc94f402af","commits":[{"sha":"29d9f055fc6064caec414a9b12b13263daf4733a","author":{"name":"robcore","email":"a3b05a675e90e628f2d9df6520db16da9bff1bff@gmail.com"},"message":"From 3af5ec050e15071202c95388c5e078d93846691b Mon Sep 17 00:00:00 2001\nFrom: Iliyan Malchev <malchev@google.com>\nDate: Wed, 19 Nov 2014 21:21:01 -0800\nSubject: [PATCH 5853/6000] Effectively revert \"gpu: ion: replace __GFP_ZERO\n with manual zero'ing\"\n\n\tcommit d21375bd0e3b5c9fb1bfd341abb294349ca2507f\n\tAuthor: Mitchel Humpherys <mitchelh@codeaurora.org>\n\tDate:   Thu Jan 31 10:30:40 2013 -0800\n\n\t    gpu: ion: replace __GFP_ZERO with manual zero'ing\n\n\t    As a performance optimization, omit the __GFP_ZERO flag when\n\t    allocating individual pages and, instead, zero out all of the pages in\n\t    one fell swoop.\n\n\t    CRs-Fixed: 449035\n\t    Change-Id: Ieb9a895d8792727a8a40b1e27cb1bbeae098f581\n\t    Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>\n\nb/18402205 External reports: Video playback failing on Flo after upgrade to\n\t   Lollipop\n\nChange-Id: Ibd07d3ac0edd11278306d4dbe72050408cc8e09b\nSigned-off-by: Iliyan Malchev <malchev@google.com>\n(cherry picked from commit 154bef423c71bb39da67e5512ff96cd71cb0dd57)\n---\n drivers/gpu/ion/ion_iommu_heap.c | 43 +++-------------------------------------\n 1 file changed, 3 insertions(+), 40 deletions(-)\n\ndiff --git a/drivers/gpu/ion/ion_iommu_heap.c b/drivers/gpu/ion/ion_iommu_heap.c\nindex d492c84..910b3fe 100644\n--- a/drivers/gpu/ion/ion_iommu_heap.c\n+++ b/drivers/gpu/ion/ion_iommu_heap.c\n@@ -46,8 +46,6 @@ struct ion_iommu_priv_data {\n \tunsigned long size;\n };\n\n-#define MAX_VMAP_RETRIES 10\n-\n static const unsigned int orders[] = {8, 4, 0};\n static const int num_orders = ARRAY_SIZE(orders);\n\n@@ -84,6 +82,8 @@ static struct page_info *alloc_largest_available(unsigned long size,\n \t\t} else {\n \t\t\tgfp |= GFP_KERNEL;\n \t\t}\n+\n+\t\tgfp |= __GFP_ZERO;\n \t\tpage = alloc_pages(gfp, orders[i]);\n \t\tif (!page)\n \t\t\tcontinue;\n@@ -110,8 +110,7 @@ static int ion_iommu_heap_allocate(struct ion_heap *heap,\n \t\tstruct scatterlist *sg;\n \t\tstruct sg_table *table;\n \t\tint j;\n-\t\tvoid *ptr = NULL;\n-\t\tunsigned int npages_to_vmap, total_pages, num_large_pages = 0;\n+\t\tunsigned int num_large_pages = 0;\n \t\tlong size_remaining = PAGE_ALIGN(size);\n \t\tunsigned int max_order = orders[0];\n\n@@ -166,40 +165,6 @@ static int ion_iommu_heap_allocate(struct ion_heap *heap,\n \t\t\tkfree(info);\n \t\t}\n\n-\t\t/*\n-\t\t * As an optimization, we omit __GFP_ZERO from\n-\t\t * alloc_page above and manually zero out all of the\n-\t\t * pages in one fell swoop here. To safeguard against\n-\t\t * insufficient vmalloc space, we only vmap\n-\t\t * `npages_to_vmap' at a time, starting with a\n-\t\t * conservative estimate of 1/8 of the total number of\n-\t\t * vmalloc pages available. Note that the `pages'\n-\t\t * array is composed of all 4K pages, irrespective of\n-\t\t * the size of the pages on the sg list.\n-\t\t */\n-\t\tnpages_to_vmap = ((VMALLOC_END - VMALLOC_START)/8)\n-\t\t\t>> PAGE_SHIFT;\n-\t\ttotal_pages = data->nrpages;\n-\t\tfor (i = 0; i < total_pages; i += npages_to_vmap) {\n-\t\t\tnpages_to_vmap = min(npages_to_vmap, total_pages - i);\n-\t\t\tfor (j = 0; j < MAX_VMAP_RETRIES && npages_to_vmap;\n-\t\t\t     ++j) {\n-\t\t\t\tptr = vmap(&data->pages[i], npages_to_vmap,\n-\t\t\t\t\tVM_IOREMAP, pgprot_kernel);\n-\t\t\t\tif (ptr)\n-\t\t\t\t\tbreak;\n-\t\t\t\telse\n-\t\t\t\t\tnpages_to_vmap >>= 1;\n-\t\t\t}\n-\t\t\tif (!ptr) {\n-\t\t\t\tpr_err(\"Couldn't vmap the pages for zeroing\\n\");\n-\t\t\t\tret = -ENOMEM;\n-\t\t\t\tgoto err3;\n-\t\t\t}\n-\t\t\tmemset(ptr, 0, npages_to_vmap * PAGE_SIZE);\n-\t\t\tvunmap(ptr);\n-\t\t}\n-\n \t\tif (!ION_IS_CACHED(flags))\n \t\t\tdma_sync_sg_for_device(NULL, table->sgl, table->nents,\n \t\t\t\t\t\tDMA_BIDIRECTIONAL);\n@@ -211,8 +176,6 @@ static int ion_iommu_heap_allocate(struct ion_heap *heap,\n \t\treturn -ENOMEM;\n \t}\n\n-\n-err3:\n \tsg_free_table(buffer->sg_table);\n err2:\n \tkfree(buffer->sg_table);\n--\n2.8.1","distinct":true,"url":"https://api.github.com/repos/robcore/Hulk-Kernel-V2/commits/29d9f055fc6064caec414a9b12b13263daf4733a"}]}
{"actor":{"display_login":"robcore"}}