From patchwork Mon Aug 13 09:26:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 1311481 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 700F33FC71 for ; Mon, 13 Aug 2012 09:29:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 306BD9EFC0 for ; Mon, 13 Aug 2012 02:29:58 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pb0-f49.google.com (mail-pb0-f49.google.com [209.85.160.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DB1D9EFC0 for ; Mon, 13 Aug 2012 02:26:25 -0700 (PDT) Received: by pbbrq8 with SMTP id rq8so6036340pbb.36 for ; Mon, 13 Aug 2012 02:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=88dxT+jtrNP3QxUO9xC+1yLmBmuTb5ZDX5QriBj2aH8=; b=cg4a9fm/1/iVfA63khJGDLska5WgR5fvI+olfTL8W1zUnZaPxEmVHraYu13xtrt7Zs ny/UNdZQuymjLfYBYLh2jvb4ntmyQEV3sUgYdIRav5VD0hw5tRKHdCwPwbEXqpfwwlME aNJvvEEGVDCYA9lL5hb+tGVsRJ1pqEQL/UfHJgoCB0VK0oK3DOKw9d1zi/Cw8r84m1W3 tqFh1mlQfQ82chkG4QtJhG3t2ojPOR3d2Y8PRIygBHNqnok4Hb31qKI3q3lUogOxMHwi NNllSAX7Y7oc3NYtWTnKykwT7JkWN7PTPf1fFOigRULUYhNNP0pEer0xmQc6vJ8kPMO5 Lcrg== Received: by 10.68.197.202 with SMTP id iw10mr17864457pbc.161.1344849985413; Mon, 13 Aug 2012 02:26:25 -0700 (PDT) Received: from localhost.localdomain ([222.92.8.142]) by mx.google.com with ESMTPS id oj8sm5085313pbb.54.2012.08.13.02.26.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 13 Aug 2012 02:26:24 -0700 (PDT) From: Huacai Chen To: Huacai Chen Subject: [PATCH] drm/radeon: Include swiotlb.h if SWIOTLB configured. Date: Mon, 13 Aug 2012 17:26:03 +0800 Message-Id: <1344849963-22836-1-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 1.7.7.3 Cc: Huacai Chen , Hua Yan , dri-devel@lists.freedesktop.org, Hongliang Tao 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 *' Signed-off-by: Huacai Chen Signed-off-by: Hongliang Tao Signed-off-by: Hua Yan Cc: dri-devel@lists.freedesktop.org Reviewed-by: Konrad Rzeszutek Wilk --- 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);