From patchwork Fri Oct 5 12:45:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 1552841 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 00D943FE80 for ; Fri, 5 Oct 2012 12:46:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58FF8A0AF4 for ; Fri, 5 Oct 2012 05:46:32 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id E28799E90F for ; Fri, 5 Oct 2012 05:46:21 -0700 (PDT) Received: by mail-pa0-f49.google.com with SMTP id bi5so1837568pad.36 for ; Fri, 05 Oct 2012 05:46:21 -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:mime-version :content-type:content-transfer-encoding; bh=L8GNMsgYBdfixX7oMWk4sMCVJRVgPHbvsEVlBYXS0tE=; b=jQxfz6xOswaJGLxDVImPCbnsUZdqcWXPuNE8nLHqKX7UifcjBBx1SrA6jjGvC9+/Cr d8yarxB5TnuLvUKjMBnSgCnpTTuWHILhh3ht/GIyEx7I5OG1exwOH338C48jrIWmtkiY rxn6+B5pFEt+cVYu9zkDVZHpT1T2sM+4X34pEOPZspSVWexL93yahw9Rco1yaEDiwaXP sS6Stt3WPVDYl+/rO2g7F2NXhHt64v74rXR/4kdGyhf74Io5pfBsVnQEYklfc99JtzEc 755p+K2wGyhELraBzjrPT6qpmNnm+oLQWj+3yyVUUsd3ITB1aT9sYPf/KP+u9RWoVkJk QX/Q== Received: by 10.68.190.233 with SMTP id gt9mr30186831pbc.137.1349441181676; Fri, 05 Oct 2012 05:46:21 -0700 (PDT) Received: from localhost.localdomain ([222.92.8.142]) by mx.google.com with ESMTPS id vw4sm4803996pbc.26.2012.10.05.05.46.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 05:46:20 -0700 (PDT) From: Huacai Chen To: Alex Deucher Subject: =?UTF-8?q?=5BPATCH=20V3=5D=20drm/radeon=3A=20Include=20swiotlb=2Eh=20if=20SWIOTLB=20configured?= Date: Fri, 5 Oct 2012 20:45:56 +0800 Message-Id: <1349441156-30936-1-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 1.7.7.3 MIME-Version: 1.0 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: , 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. V3: 1, Send to Alex Deucher since this is radeon specific; 2, Add Reviewed-by email addresses. Signed-off-by: Huacai Chen Signed-off-by: Hongliang Tao Signed-off-by: Hua Yan Reviewed-by: Michel Dänzer Reviewed-by: Konrad Rzeszutek Wilk Cc: dri-devel@lists.freedesktop.org --- 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);