From patchwork Fri Dec 13 22:23:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 22376 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6929923FBA for ; Fri, 13 Dec 2013 22:26:24 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oy12sf4843155veb.5 for ; Fri, 13 Dec 2013 14:26:24 -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=TvA/P7mxO0OJFiqNF0Mj3OOm98ahrjhmMAj2XW8CyXs=; b=KdIbIVw55VmYfV2CLqBkd0wAgPYgGRd+EcpDdgAfU+yPN/nhj683MkECVgGPgcr2sq ZoYBXpJJIMHBsIwknvy56MeFb5YqwR4EZdcAechAzGnICmN3aFILfGo6djm1yxyXWFwX mYZZr8i9dYZzO9m+ZM9ns+0ptk96HVl2j3AAZpouTuFzSHQ5u5eCJXRhfIpZkEl6QJhd bV3K1dTvrDXohi4BQRNMt/VyUiEvj1qt5cDLWJzwgkCVTS5fCQz8kNpw9mRz+UoNf4cs loG4gfVyhDYD1yUzb/jWNC4GGki/4hX3F6nql9eyYzQItrIawX6bxIpVJQR6LioE629B QgyA== X-Gm-Message-State: ALoCoQlOdt4R88Y7IUJLeLBFHbBQOwYhb5+fZRF7B5wOH0fjM0SOYailIzyQ9xGLBKdH3LTFn3tf X-Received: by 10.58.112.195 with SMTP id is3mr1915127veb.29.1386973584270; Fri, 13 Dec 2013 14:26:24 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.41.66 with SMTP id d2ls1260330qel.10.gmail; Fri, 13 Dec 2013 14:26:24 -0800 (PST) X-Received: by 10.52.188.202 with SMTP id gc10mr56628vdc.84.1386973584120; Fri, 13 Dec 2013 14:26:24 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id q19si1202006vea.25.2013.12.13.14.26.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:26:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 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.172; Received: by mail-ve0-f172.google.com with SMTP id jw12so1860092veb.3 for ; Fri, 13 Dec 2013 14:26:24 -0800 (PST) X-Received: by 10.221.23.72 with SMTP id qz8mr1107085vcb.66.1386973584045; Fri, 13 Dec 2013 14:26:24 -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 u4csp73458vcz; Fri, 13 Dec 2013 14:26:23 -0800 (PST) X-Received: by 10.66.140.40 with SMTP id rd8mr5983018pab.119.1386973583333; Fri, 13 Dec 2013 14:26:23 -0800 (PST) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by mx.google.com with ESMTPS id sl10si2502915pab.128.2013.12.13.14.26.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:26:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.177 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.192.177; Received: by mail-pd0-f177.google.com with SMTP id q10so3017204pdj.22 for ; Fri, 13 Dec 2013 14:26:23 -0800 (PST) X-Received: by 10.66.142.170 with SMTP id rx10mr5980401pab.117.1386973582958; Fri, 13 Dec 2013 14:26:22 -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.26.21 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:26:22 -0800 (PST) From: John Stultz To: LKML Cc: Greg KH , Android Kernel Team , Sumit Semwal , Jesse Barker , Colin Cross , Greg Hackmann , John Stultz Subject: [PATCH 011/115] gpu: ion: fill in buffer->{dev, size} before mapping new buffers Date: Fri, 13 Dec 2013 14:23:45 -0800 Message-Id: <1386973529-4884-12-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.172 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: Greg Hackmann At least one map_dma() implementation (EXYNOS_CONTIG) assumes the fields are filled in Signed-off-by: Greg Hackmann [jstultz: modified patch to apply to staging directory] Signed-off-by: John Stultz --- drivers/staging/android/ion/ion.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 7ff9983..552a86a 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -151,6 +151,9 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, return ERR_PTR(ret); } + buffer->dev = dev; + buffer->size = len; + table = buffer->heap->ops->map_dma(buffer->heap, buffer); if (IS_ERR_OR_NULL(table)) { heap->ops->free(buffer); @@ -159,8 +162,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, } buffer->sg_table = table; - buffer->dev = dev; - buffer->size = len; mutex_init(&buffer->lock); ion_buffer_add(dev, buffer); return buffer;