<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Dec 27, 2012 at 4:27 PM, Inki Dae <span dir="ltr"><<a href="mailto:inki.dae@samsung.com" target="_blank">inki.dae@samsung.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This patch fixes gem buffer allocation type checking.<br>


EXYNOS_BO_CONTIG has 0 so the checking should be fixed<br>
to 'if (!(flags & EXYNOS_BO_NONCONTIG))'<br>
<br>
Signed-off-by: Inki Dae <<a href="mailto:inki.dae@samsung.com" target="_blank">inki.dae@samsung.com</a>><br>
Signed-off-by: Kyungmin Park <<a href="mailto:kyungmin.park@samsung.com" target="_blank">kyungmin.park@samsung.com</a>><br>
---<br>
 drivers/gpu/drm/exynos/exynos_drm_buf.c |    2 +-<br>
 1 files changed, 1 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c<br>
index 74592d1..911f7fd 100644<br>
--- a/drivers/gpu/drm/exynos/exynos_drm_buf.c<br>
+++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c<br>
@@ -38,7 +38,7 @@ static int lowlevel_buffer_allocate(struct drm_device *dev,<br>
         * region will be allocated else physically contiguous<br>
         * as possible.<br>
         */<br>
-       if (flags & EXYNOS_BO_CONTIG)<br>
+       if (!(flags & EXYNOS_BO_NONCONTIG))<br>
                dma_set_attr(DMA_ATTR_FORCE_CONTIGUOUS, &buf->dma_attrs);<br>
<br></blockquote><div><br></div><div>Hi Mr. Dae,</div><div><br></div><div>If iommu is supported, we would have called arm_iommu_attach_device.<br></div><div style>So dma_alloc_attrs will always call arm_iommu_alloc_attrs.</div>
<div style><br></div><div style>If iommu is not supported, dma_alloc_attrs will call arm_dma_alloc which will</div><div style>anyway allocate a contiguous buffer if possible.</div><div><br></div><div style>With this code, we are forcing the root framebuffer (fbdev) to be contiguous since fbdev<br>
</div><div style>allocation does not pass noncontig flag.</div><div><br></div><div>Why do we need to force the allocation of a contiguous buffer when iommu is supported?<br></div><div><br></div><div style>Regards,</div><div style>
Prathyush</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


        /*<br>
<span><font color="#888888">--<br>
1.7.4.1<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org" target="_blank">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</font></span></blockquote></div><br></div></div>