From patchwork Mon Aug 13 12:40:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 1312571 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id EF8BDDF223 for ; Mon, 13 Aug 2012 12:41:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC8159F649 for ; Mon, 13 Aug 2012 05:41:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f49.google.com (mail-yw0-f49.google.com [209.85.213.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A3F69EFC3 for ; Mon, 13 Aug 2012 05:41:11 -0700 (PDT) Received: by yhjj52 with SMTP id j52so3274754yhj.36 for ; Mon, 13 Aug 2012 05:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=ycKQFpEvBtjO++gX8dihWRM4Eq6bdOXg5E113OKjNXg=; b=D2Xlpc/NSUD/kw1tYyEw1hFFp8nsUgmy5nGYxtzub1IPY1xuWgO7oXxiBZwDjPBePV 25Tz1Tiqjn1A/c7VLoOjzoN+Ev0ZD1v/BriISL1/BXsbCDc3Pc9pwfbG3jmeuxJ/vQAW bmSeGnLM9LmikIhINUIzH2VQV5Yhzx7dnO3om35AqZacapbiW9ijsE8uz2933cWFrKIj HfIlv08Xk9VyByfCIEn81NLYDgD8xjv6oS8tfLv4xa6ksUyLGwlqculbA2Lb6asr8AZi VmwiFOyPD8gqP5PA+Tp32aJK31f/sU02R/Ghc/FL27XqvEfELZe8jj4MgCGHFs6qBHrz s3bg== Received: by 10.68.136.67 with SMTP id py3mr18541119pbb.156.1344861670071; Mon, 13 Aug 2012 05:41:10 -0700 (PDT) Received: from localhost.localdomain ([222.92.8.142]) by mx.google.com with ESMTPS id pn4sm5282611pbb.50.2012.08.13.05.41.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 05:41:09 -0700 (PDT) From: Huacai Chen To: David Airlie Subject: [PATCH V2] drm/radeon: Include swiotlb.h if SWIOTLB configured. Date: Mon, 13 Aug 2012 20:40:53 +0800 Message-Id: <1344861653-27261-1-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 1.7.7.3 Cc: =?UTF-8?q?Michel=20D=C3=A4nzer?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hongliang Tao , Fuxin Zhang , Huacai Chen , Hua Yan X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org When SWIOTLB is configured, if without this patch kernel compilation fails with such error messages: drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_tt_populate': drivers/gpu/drm/radeon/radeon_ttm.c:606:2: error: implicit declaration of function 'swiotlb_nr_tbl' drivers/gpu/drm/radeon/radeon_ttm.c:607:3: warning: passing argument 2 of 'ttm_dma_populate' from incompatible pointer type include/drm/ttm/ttm_page_alloc.h:81:12: note: expected 'struct device *' but argument is of type 'struct device *' drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_tt_unpopulate': drivers/gpu/drm/radeon/radeon_ttm.c:653:3: warning: passing argument 2 of 'ttm_dma_unpopulate' from incompatible pointer type include/drm/ttm/ttm_page_alloc.h:82:13: note: expected 'struct device *' but argument is of type 'struct device *' V2: 1, Add compilation error messages; 2, Make the From: address the same as Signed-off-by address. Signed-off-by: Huacai Chen Signed-off-by: Hongliang Tao Signed-off-by: Hua Yan Cc: dri-devel@lists.freedesktop.org Reviewed-by: Michel Dänzer --- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 5b71c71..fc3ac22 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -41,6 +41,10 @@ #include "radeon_reg.h" #include "radeon.h" +#ifdef CONFIG_SWIOTLB +#include +#endif + #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT) static int radeon_ttm_debugfs_init(struct radeon_device *rdev);