gpu: ion: DRA7: ensure TILER 2d mappings are shared device
authorSundar Raman <a0393242@ti.com>
Thu, 25 Jul 2013 13:43:29 +0000 (08:43 -0500)
committerSundar Raman <a0393242@ti.com>
Fri, 26 Jul 2013 21:00:49 +0000 (16:00 -0500)
Write combined mappings are not supported for TILER 2D on DRA7
similar  to OMAP5 due to h/w issue. So, shared mappings should
be used. Added the check which was missing for DRA7.

Change-Id: I8ba9bd676f2942dd6a8bd5737bab8e25c8f1cbd3
Signed-off-by: Sundar Raman <a0393242@ti.com>
drivers/gpu/ion/omap/omap_tiler_heap.c

index c3ac4f169c3dcb347a33fdd647e6e2661eeaa6b5..cbd16cf6c522b436f07c12f32ea1b572a14f373f 100644 (file)
@@ -75,7 +75,7 @@ static int omap_tiler_heap_allocate(struct ion_heap *heap,
                  */
                info = (struct omap_tiler_info *) flags;
                if (!info)
                  */
                info = (struct omap_tiler_info *) flags;
                if (!info)
-                       pr_err("%s: flags argument is not setup\n", __func__);
+                       pr_err("%s: flags argument is not setupg\n", __func__);
                buffer->priv_virt = info;
                /* Re-update correct flags inside buffer */
                buffer->flags = info->flags;
                buffer->priv_virt = info;
                /* Re-update correct flags inside buffer */
                buffer->flags = info->flags;
@@ -339,9 +339,9 @@ static int omap_tiler_heap_map_user(struct ion_heap *heap,
        int i, ret = 0;
        pgprot_t vm_page_prot;
 
        int i, ret = 0;
        pgprot_t vm_page_prot;
 
-       /* Use writecombined mappings unless on OMAP5.  If OMAP5, use
+       /* Use writecombined mappings unless on OMAP5 or DRA7.  If OMAP5 or DRA7, use
        shared device due to h/w issue. */
        shared device due to h/w issue. */
-       if (soc_is_omap54xx())
+       if (soc_is_omap54xx() || soc_is_dra7xx())
                vm_page_prot = __pgprot_modify(vma->vm_page_prot, L_PTE_MT_MASK,
                                                L_PTE_MT_DEV_SHARED);
        else
                vm_page_prot = __pgprot_modify(vma->vm_page_prot, L_PTE_MT_MASK,
                                                L_PTE_MT_DEV_SHARED);
        else