Message ID | 1375766604-15455-1-git-send-email-vikas.sajjan@linaro.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1V6ZkF-0008Jh-1P; Tue, 06 Aug 2013 07:23:43 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-5) with esmtp id 1V6ZkD-0003il-6z; Tue, 06 Aug 2013 07:23:42 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042Ab3HFFXi (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 6 Aug 2013 01:23:38 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:42953 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816Ab3HFFXh (ORCPT <rfc822; linux-media@vger.kernel.org>); Tue, 6 Aug 2013 01:23:37 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa1so246281pad.33 for <linux-media@vger.kernel.org>; Mon, 05 Aug 2013 22:23:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=U+zJqdZoqXEfPGrtNKRXjQIhssUuxYQd+BsA+ZpQXXI=; b=d36PA+FIHU/TMO4fthYXCT5LYjkJTrMv2XR5LRPuu3wCB6GAu+vI0xRIHxxy1IQTvC TmB6ea4Fptyy44GZhIOR1bYbPii0bjMn3CUN7b2/jDLJ+r74ciBYjK3ML6WZMKDVN38u +o5uiy1mGQf6UT4k7F7seJ6Ra81WNsoOB07qC2dgNeJkLf3Hfo26pbGPgsIpnJc4c8/8 pqTLiTb9NJZNlqAFwcoyLiZV8N2c61CL4sQDlLigB1x+FD0bNSTcdjwuRnKmC8p6ha+k U8BYRBU76OZS7vNZ7UIXU6WR3GJEefpmO/0HYVm9q4i9F0TlbpizALQW280SYww6CXid 3BTA== X-Received: by 10.68.34.97 with SMTP id y1mr26141464pbi.198.1375766617432; Mon, 05 Aug 2013 22:23:37 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id qv4sm2879045pbc.16.2013.08.05.22.23.30 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Aug 2013 22:23:36 -0700 (PDT) From: Vikas Sajjan <vikas.sajjan@linaro.org> To: linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org, kgene.kim@samsung.com, inki.dae@samsung.com, s.nawrocki@samsung.com, m.szyprowski@samsung.com, tomasz.figa@gmail.com, robdclark@gmail.com, arun.kk@samsung.com, patches@linaro.org, linaro-kernel@lists.linaro.org, joshi@samsung.com Subject: [PATCH v3] drm/exynos: Add fallback option to get non physically continous memory for fb Date: Tue, 6 Aug 2013 10:53:24 +0530 Message-Id: <1375766604-15455-1-git-send-email-vikas.sajjan@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmuOXeReC6oeHDlbtJCtA66cNdj00xiPBLpouw5NSNV9XtsiuJKuEv3eiVP4KvCK/nktEMg Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.8.6.45517 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Commit Message
Vikas Sajjan
Aug. 6, 2013, 5:23 a.m. UTC
While trying to get boot-logo up on exynos5420 SMDK which has eDP panel connected with resolution 2560x1600, following error occured even with IOMMU enabled: [0.880000] [drm:lowlevel_buffer_allocate] *ERROR* failed to allocate buffer. [0.890000] [drm] Initialized exynos 1.0.0 20110530 on minor 0 To address the cases where physically continous memory MAY NOT be a mandatory requirement for fb, the patch adds a feature to get non physically continous memory for fb if IOMMU is supported and if CONTIG memory allocation fails. Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Signed-off-by: Arun Kumar <arun.kk@samsung.com> Reviewed-by: Rob Clark <robdclark@gmail.com> --- changes since v2: - addressed comments given by Tomasz Figa <tomasz.figa@gmail.com>. changes since v1: - Modified to add the fallback patch if CONTIG alloc fails as suggested by Rob Clark robdclark@gmail.com and Tomasz Figa <tomasz.figa@gmail.com>. - changed the commit message. --- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
Comments
Hi Vikas, On 6 August 2013 10:53, Vikas Sajjan <vikas.sajjan@linaro.org> wrote: > While trying to get boot-logo up on exynos5420 SMDK which has eDP panel > connected with resolution 2560x1600, following error occured even with > IOMMU enabled: > [0.880000] [drm:lowlevel_buffer_allocate] *ERROR* failed to allocate buffer. > [0.890000] [drm] Initialized exynos 1.0.0 20110530 on minor 0 > > To address the cases where physically continous memory MAY NOT be a > mandatory requirement for fb, the patch adds a feature to get non physically > continous memory for fb if IOMMU is supported and if CONTIG memory allocation > fails. The patch looks fine. Just a small nit. Please use the word contiguous instead of continuous to refer to memory locations consistently in this patch. > > Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> > Signed-off-by: Arun Kumar <arun.kk@samsung.com> > Reviewed-by: Rob Clark <robdclark@gmail.com> > --- > changes since v2: > - addressed comments given by Tomasz Figa <tomasz.figa@gmail.com>. > > changes since v1: > - Modified to add the fallback patch if CONTIG alloc fails as suggested > by Rob Clark robdclark@gmail.com and Tomasz Figa <tomasz.figa@gmail.com>. > > - changed the commit message. > --- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > index 8e60bd6..faec77e 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > @@ -16,6 +16,7 @@ > #include <drm/drm_crtc.h> > #include <drm/drm_fb_helper.h> > #include <drm/drm_crtc_helper.h> > +#include <drm/exynos_drm.h> > > #include "exynos_drm_drv.h" > #include "exynos_drm_fb.h" > @@ -165,8 +166,17 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, > > size = mode_cmd.pitches[0] * mode_cmd.height; > > - /* 0 means to allocate physically continuous memory */ > - exynos_gem_obj = exynos_drm_gem_create(dev, 0, size); > + exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size); > + /* > + * If IOMMU is supported then try to get buffer from non physically > + * continous memory area. > + */ To make this more clear, you could say, "If physically contiguous memory allocation fails and if IOMMU is supported, try to ....." > + if (IS_ERR(exynos_gem_obj) && is_drm_iommu_supported(dev)) { > + dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n"); > + exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG, > + size); > + } > + > if (IS_ERR(exynos_gem_obj)) { > ret = PTR_ERR(exynos_gem_obj); > goto err_release_framebuffer; > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
Vikas, On 08/06/2013 07:23 AM, Vikas Sajjan wrote: > While trying to get boot-logo up on exynos5420 SMDK which has eDP panel > connected with resolution 2560x1600, following error occured even with > IOMMU enabled: > [0.880000] [drm:lowlevel_buffer_allocate] *ERROR* failed to allocate buffer. > [0.890000] [drm] Initialized exynos 1.0.0 20110530 on minor 0 > > To address the cases where physically continous memory MAY NOT be a > mandatory requirement for fb, the patch adds a feature to get non physically > continous memory for fb if IOMMU is supported and if CONTIG memory allocation > fails. > > Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> > Signed-off-by: Arun Kumar <arun.kk@samsung.com> > Reviewed-by: Rob Clark <robdclark@gmail.com> > --- > changes since v2: > - addressed comments given by Tomasz Figa <tomasz.figa@gmail.com>. > > changes since v1: > - Modified to add the fallback patch if CONTIG alloc fails as suggested > by Rob Clark robdclark@gmail.com and Tomasz Figa <tomasz.figa@gmail.com>. > > - changed the commit message. > --- > drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > index 8e60bd6..faec77e 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c > @@ -16,6 +16,7 @@ > #include <drm/drm_crtc.h> > #include <drm/drm_fb_helper.h> > #include <drm/drm_crtc_helper.h> > +#include <drm/exynos_drm.h> > > #include "exynos_drm_drv.h" > #include "exynos_drm_fb.h" > @@ -165,8 +166,17 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, > > size = mode_cmd.pitches[0] * mode_cmd.height; > > - /* 0 means to allocate physically continuous memory */ > - exynos_gem_obj = exynos_drm_gem_create(dev, 0, size); > + exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size); > + /* > + * If IOMMU is supported then try to get buffer from non physically > + * continous memory area. s/continous/continuous or better s/continous/contiguous Otherwise the patch looks good. But please note it has nothing to do with linux-media@vger.kernel.org, please drop this mailing list from Cc as I need to be constantly marking those patches as Non applicable in the patchwork. Thanks! Sylwester > + */ > + if (IS_ERR(exynos_gem_obj) && is_drm_iommu_supported(dev)) { > + dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n"); > + exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG, > + size); > + } > + > if (IS_ERR(exynos_gem_obj)) { > ret = PTR_ERR(exynos_gem_obj); > goto err_release_framebuffer; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index 8e60bd6..faec77e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -16,6 +16,7 @@ #include <drm/drm_crtc.h> #include <drm/drm_fb_helper.h> #include <drm/drm_crtc_helper.h> +#include <drm/exynos_drm.h> #include "exynos_drm_drv.h" #include "exynos_drm_fb.h" @@ -165,8 +166,17 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, size = mode_cmd.pitches[0] * mode_cmd.height; - /* 0 means to allocate physically continuous memory */ - exynos_gem_obj = exynos_drm_gem_create(dev, 0, size); + exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size); + /* + * If IOMMU is supported then try to get buffer from non physically + * continous memory area. + */ + if (IS_ERR(exynos_gem_obj) && is_drm_iommu_supported(dev)) { + dev_warn(&pdev->dev, "contiguous FB allocation failed, falling back to non-contiguous\n"); + exynos_gem_obj = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG, + size); + } + if (IS_ERR(exynos_gem_obj)) { ret = PTR_ERR(exynos_gem_obj); goto err_release_framebuffer;