From patchwork Thu Aug 1 11:19:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas C Sajjan X-Patchwork-Id: 18722 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5AEBA238F9 for ; Thu, 1 Aug 2013 11:19:45 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf2437980ves.6 for ; Thu, 01 Aug 2013 04:19:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-removed-original-auth:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=185x51dJslGVRsw4slrn0FL62nlB4RZwHhFlMWp4XzY=; b=Xpl9NnNYkRlZtoyDOXm6u1eY9nHYQJkgqCNkqU+NO9HBOxfNQr+dHT2klJCsTyi5hm 8/jCtY2LE9v2WHIqCi8BUryfGBaFyFD0svtsHqc3NLIzJppyd/feYXAjsqg23D24vThp cx/O3ChpDcNIjdFmbmCP/YwZHODCyRm6HEae7HPWL78nCBOnHotP1zwVkdLNsoNfRqgz J/7kI3Wn4wbnSxzByGvhWjVEzZDVAVDp1DmO2vu6zn2bc/IEnIwS33lwz1b5j9g7OKe6 mBjltAB7qDIKt4Wh8XteHqZZ7VGqnTN+05u5e1H1yYgYx1n0+7f0cKSJpRsp09N8ggPv 6B/g== X-Received: by 10.236.125.200 with SMTP id z48mr370207yhh.55.1375355984856; Thu, 01 Aug 2013 04:19:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.37.229 with SMTP id b5ls1084100qek.18.gmail; Thu, 01 Aug 2013 04:19:44 -0700 (PDT) X-Received: by 10.52.106.166 with SMTP id gv6mr265579vdb.31.1375355984719; Thu, 01 Aug 2013 04:19:44 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id f5si504568vcy.120.2013.08.01.04.19.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 04:19:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so1904730vbg.39 for ; Thu, 01 Aug 2013 04:19:44 -0700 (PDT) X-Received: by 10.220.164.138 with SMTP id e10mr314900vcy.27.1375355984573; Thu, 01 Aug 2013 04:19:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp291449vcb; Thu, 1 Aug 2013 04:19:43 -0700 (PDT) X-Received: by 10.66.164.199 with SMTP id ys7mr3430080pab.104.1375355983495; Thu, 01 Aug 2013 04:19:43 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id qf5si2228482pac.298.2013.08.01.04.19.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 04:19:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of vikas.sajjan@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id lj1so2028685pab.29 for ; Thu, 01 Aug 2013 04:19:43 -0700 (PDT) X-Received: by 10.66.120.145 with SMTP id lc17mr3315937pab.182.1375355982989; Thu, 01 Aug 2013 04:19:42 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id eq5sm3502220pbc.15.2013.08.01.04.19.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Aug 2013 04:19:41 -0700 (PDT) From: Vikas Sajjan 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, arun.kk@samsung.com, patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH] drm/exynos: Add check for IOMMU while passing physically continous memory flag Date: Thu, 1 Aug 2013 16:49:32 +0530 Message-Id: <1375355972-25276-1-git-send-email-vikas.sajjan@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmu5cY/qk5Zokvu3VZ9kQbwBHu8m+0fXGyJRowM8oghKCWeru7FpHvhxZtcMO5dR1CWq1ka X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vikas.sajjan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 This patch fixes the issue by adding a check for IOMMU. Signed-off-by: Vikas Sajjan Signed-off-by: Arun Kumar --- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index 8e60bd6..2a86666 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "exynos_drm_drv.h" #include "exynos_drm_fb.h" @@ -143,6 +144,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, struct platform_device *pdev = dev->platformdev; unsigned long size; int ret; + unsigned int flag; DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d\n", sizes->surface_width, sizes->surface_height, @@ -166,7 +168,12 @@ 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); + if (!is_drm_iommu_supported(dev)) + flag = 0; + else + flag = EXYNOS_BO_NONCONTIG; + + exynos_gem_obj = exynos_drm_gem_create(dev, flag, size); if (IS_ERR(exynos_gem_obj)) { ret = PTR_ERR(exynos_gem_obj); goto err_release_framebuffer;