lkml.org 
[lkml]   [2013]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 011/115] gpu: ion: fill in buffer->{dev,size} before mapping new buffers
Date
From: Greg Hackmann <ghackmann@google.com>

At least one map_dma() implementation (EXYNOS_CONTIG) assumes the fields
are filled in

Signed-off-by: Greg Hackmann <ghackmann@google.com>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
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;
--
1.8.3.2


\
 
 \ /
  Last update: 2013-12-14 00:21    [W:0.262 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site