aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSundar Raman2013-04-23 15:13:33 -0500
committerSundar Raman2013-07-26 15:58:27 -0500
commitcbccd93a17b1a1c1ddf89bc322c35322440dad2c (patch)
tree41dd78995e191bb3e97a144f62b2c131c1916b1d
parentf1473afaa439e7650885475172c9007e3ed060b1 (diff)
downloadkernel-video-cbccd93a17b1a1c1ddf89bc322c35322440dad2c.tar.gz
kernel-video-cbccd93a17b1a1c1ddf89bc322c35322440dad2c.tar.xz
kernel-video-cbccd93a17b1a1c1ddf89bc322c35322440dad2c.zip
gpu: ion: omap: re-populate flags parameters into buffer
Since the flags function param of omap_tiler_heap_allocate is used to pass the omap_tiler_info struct, pass the actual flags param from the client inside omap_tiler_info struct and re-populate it into the buffer struct. Change-Id: I06f3b6125c2760f7b4bcc7f174458139d80ec000 Signed-off-by: Sundar Raman <a0393242@ti.com>
-rw-r--r--drivers/gpu/ion/omap/omap_tiler_heap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/ion/omap/omap_tiler_heap.c b/drivers/gpu/ion/omap/omap_tiler_heap.c
index af4988ad212..c3ac4f169c3 100644
--- a/drivers/gpu/ion/omap/omap_tiler_heap.c
+++ b/drivers/gpu/ion/omap/omap_tiler_heap.c
@@ -55,6 +55,7 @@ struct omap_tiler_info {
55 u32 vsize; /* virtual stride of buffer */ 55 u32 vsize; /* virtual stride of buffer */
56 u32 vstride; /* virtual size of buffer */ 56 u32 vstride; /* virtual size of buffer */
57 u32 phys_stride; /* Physical stride of the buffer */ 57 u32 phys_stride; /* Physical stride of the buffer */
58 u32 flags; /* Flags specifying cached or not */
58}; 59};
59 60
60static int omap_tiler_heap_allocate(struct ion_heap *heap, 61static int omap_tiler_heap_allocate(struct ion_heap *heap,
@@ -62,6 +63,8 @@ static int omap_tiler_heap_allocate(struct ion_heap *heap,
62 unsigned long size, unsigned long align, 63 unsigned long size, unsigned long align,
63 unsigned long flags) 64 unsigned long flags)
64{ 65{
66 struct omap_tiler_info *info;
67
65 /* This means the buffer is already allocated and populated, we're getting here because 68 /* This means the buffer is already allocated and populated, we're getting here because
66 * of dummy handle creation, so simply return*/ 69 * of dummy handle creation, so simply return*/
67 if (size == 0) { 70 if (size == 0) {
@@ -70,7 +73,12 @@ static int omap_tiler_heap_allocate(struct ion_heap *heap,
70 * This will be used later on inside map_dma function to create 73 * This will be used later on inside map_dma function to create
71 * the sg list for tiler buffer 74 * the sg list for tiler buffer
72 */ 75 */
73 buffer->priv_virt = (void *)flags; 76 info = (struct omap_tiler_info *) flags;
77 if (!info)
78 pr_err("%s: flags argument is not setup\n", __func__);
79 buffer->priv_virt = info;
80 /* Re-update correct flags inside buffer */
81 buffer->flags = info->flags;
74 return 0; 82 return 0;
75 } 83 }
76 84
@@ -174,6 +182,7 @@ int omap_tiler_alloc(struct ion_heap *heap,
174 info->phys_addrs = (u32 *)(info + 1); 182 info->phys_addrs = (u32 *)(info + 1);
175 info->tiler_addrs = info->phys_addrs + n_phys_pages; 183 info->tiler_addrs = info->phys_addrs + n_phys_pages;
176 info->fmt = data->fmt; 184 info->fmt = data->fmt;
185 info->flags = data->flags;
177 186
178 /* Allocate tiler space 187 /* Allocate tiler space
179 FIXME: we only support PAGE_SIZE alignment right now. */ 188 FIXME: we only support PAGE_SIZE alignment right now. */