From patchwork Fri Dec 13 22:24:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22409 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8AA9323FBA for ; Fri, 13 Dec 2013 22:27:19 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id jt11sf7442844pbb.11 for ; Fri, 13 Dec 2013 14:27:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=D9bGfgEm4/KS8QemkN4uO0T9QRW6H5zJabQ04lLQ0DE=; b=ly5JylsHTAoQqgvX3xqHL2zEYLX29S7WjQpoI5Tb50BDNTpPH8uvOQkBX36E/+yMpy XmMfRLIK3CRIsswOGlfJuxu9oiSQtkmQdYoUPYXXEU/7yMVRFsUeDPIsmlRX3BYz6r8U b287nVKd5+9WEH3LKm4hW+W35j+95NLUCmZUcRnEOh4PKXElYIl4TOwnNIXCEObHhzgx 1NiO+fXdc2Fmrnzz+8IKJBypR25BFbfkADGzGVPmY6XmfswjoSZZNx00KnujveJ4thK6 loQVajtzDXYV6zKM7ljOz9gqCD8dJtXB3+PVD4VsLNmvrAJm4SVdmCW4ijv7uRF/dnCp H+QA== X-Gm-Message-State: ALoCoQmLY31DUDciSuDC7ZFzQMNIozY+JT70b+LXkKdgAW92FmLQZUiFvP1S6M+xj6RYlJ4+L+cl X-Received: by 10.66.219.97 with SMTP id pn1mr3051584pac.9.1386973638832; Fri, 13 Dec 2013 14:27:18 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.49 with SMTP id f17ls1308127qey.54.gmail; Fri, 13 Dec 2013 14:27:18 -0800 (PST) X-Received: by 10.221.39.195 with SMTP id tn3mr2226663vcb.2.1386973638672; Fri, 13 Dec 2013 14:27:18 -0800 (PST) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id fu7si939562vec.107.2013.12.13.14.27.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:27:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id jw12so1803939veb.24 for ; Fri, 13 Dec 2013 14:27:18 -0800 (PST) X-Received: by 10.58.186.198 with SMTP id fm6mr2261987vec.16.1386973638609; Fri, 13 Dec 2013 14:27:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp73530vcz; Fri, 13 Dec 2013 14:27:18 -0800 (PST) X-Received: by 10.66.119.172 with SMTP id kv12mr6193673pab.34.1386973637904; Fri, 13 Dec 2013 14:27:17 -0800 (PST) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx.google.com with ESMTPS id ph10si2518365pbb.49.2013.12.13.14.27.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:27:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.45 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.220.45; Received: by mail-pa0-f45.google.com with SMTP id fb1so593166pad.32 for ; Fri, 13 Dec 2013 14:27:17 -0800 (PST) X-Received: by 10.68.172.196 with SMTP id be4mr6181532pbc.12.1386973637509; Fri, 13 Dec 2013 14:27:17 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id qz9sm7457908pbc.3.2013.12.13.14.27.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:27:16 -0800 (PST) From: John Stultz To: LKML Cc: Greg KH , Android Kernel Team , Sumit Semwal , Jesse Barker , Colin Cross , Rebecca Schultz Zavin , John Stultz Subject: [PATCH 044/115] gpu: ion: Don't flush allocatoins that come from the page pools Date: Fri, 13 Dec 2013 14:24:18 -0800 Message-Id: <1386973529-4884-45-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> References: <1386973529-4884-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Rebecca Schultz Zavin Signed-off-by: Rebecca Schultz Zavin [jstultz: modified patch to apply to staging directory] Signed-off-by: John Stultz --- drivers/staging/android/ion/ion_system_heap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index ad4933e..02726a9 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -76,9 +76,14 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap, if (order > 4) gfp_flags = high_order_gfp_flags; page = alloc_pages(gfp_flags, order); + if (!page) + return 0; + __dma_page_cpu_to_dev(page, 0, PAGE_SIZE << order, + DMA_BIDIRECTIONAL); } if (!page) return 0; + if (split_pages) split_page(page, order); return page; @@ -201,9 +206,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap, kfree(info); } - dma_sync_sg_for_device(NULL, table->sgl, table->nents, - DMA_BIDIRECTIONAL); - buffer->priv_virt = table; return 0; err1: