From patchwork Fri Aug 29 10:12:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 4809861 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0A3199F3B4 for ; Fri, 29 Aug 2014 10:13:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D1392012D for ; Fri, 29 Aug 2014 10:13:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2FAD420125 for ; Fri, 29 Aug 2014 10:13:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F36086E69D; Fri, 29 Aug 2014 03:13:31 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C8C06E2AF for ; Fri, 29 Aug 2014 03:13:29 -0700 (PDT) Received: by mail-wi0-f175.google.com with SMTP id ho1so8816276wib.14 for ; Fri, 29 Aug 2014 03:13:28 -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:in-reply-to:references; bh=iBEUKpL0/ZxYTdHEizr/370u+IRCA2WlaRpAB22FZug=; b=aPyeBQ6yXcmI89ew2ThA6meUs0TwEtct3Og86npoPaG8RxK0h7UrFnaElGfgFvkLZ1 aFCf5NhP3STXjsQKfpj81K2ksHguxzXyLjRqSJAU8K3Evv6EARMygbUsRPGkhWbvvsTD m5KRMBn5x/bAHy7+Foo263WV4+JNrmdnti+YayGpPbE/P58tShZJ+EeEl7qHGoPuX9Qv KePkj03rxxkP5IqWvf0x2oPspTyE+FEFweOPKyJdFkMCQ5e+nL77U6vbPZ7haWoLRD6s 8XGx3CjI/pPsH1KBI65vIa2iOjv2PLqInTwvlziC4tbeI+8GnnPBpKGCJewjgvZjaP3t hwpw== X-Received: by 10.180.36.75 with SMTP id o11mr1473665wij.33.1409307208540; Fri, 29 Aug 2014 03:13:28 -0700 (PDT) Received: from david-tp.localdomain (stgt-4d02e0c1.pool.mediaWays.net. [77.2.224.193]) by mx.google.com with ESMTPSA id la2sm17479347wjb.5.2014.08.29.03.13.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Aug 2014 03:13:27 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/20] drm: move AGP definitions harder Date: Fri, 29 Aug 2014 12:12:32 +0200 Message-Id: <1409307166-12396-7-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> References: <1409307166-12396-1-git-send-email-dh.herrmann@gmail.com> Cc: Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move drm_agp_head to drm_agpsupport.h and drm_agp_mem into drm_legacy.h. Unfortunately, drivers still heavily access drm_agp_head so we cannot move it to drm_legacy.h. However, at least it's no longer visible in drmP.h now (it's directly included from it, though). Signed-off-by: David Herrmann Reviewed-by: Thierry Reding --- drivers/gpu/drm/drm_agpsupport.c | 1 + drivers/gpu/drm/drm_legacy.h | 15 +++++++++++++++ drivers/gpu/drm/drm_memory.c | 1 + drivers/gpu/drm/drm_vm.c | 1 + include/drm/drmP.h | 30 +----------------------------- include/drm/drm_agpsupport.h | 13 +++++++++++++ 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index dde205c..4b2b4aa 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -34,6 +34,7 @@ #include #include #include +#include "drm_legacy.h" #if __OS_HAS_AGP diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h index 912fe81..d94c564 100644 --- a/drivers/gpu/drm/drm_legacy.h +++ b/drivers/gpu/drm/drm_legacy.h @@ -23,6 +23,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include + +struct agp_memory; struct drm_device; struct drm_file; @@ -63,4 +66,16 @@ int drm_legacy_freebufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_mapbufs(struct drm_device *d, void *v, struct drm_file *f); int drm_legacy_dma_ioctl(struct drm_device *d, void *v, struct drm_file *f); +/* + * AGP Support + */ + +struct drm_agp_mem { + unsigned long handle; + struct agp_memory *memory; + unsigned long bound; + int pages; + struct list_head head; +}; + #endif /* __DRM_LEGACY_H__ */ diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 00c67c0..7888dad 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c @@ -36,6 +36,7 @@ #include #include #include +#include "drm_legacy.h" #if __OS_HAS_AGP static void *agp_remap(unsigned long offset, unsigned long size, diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 352e339..be25174 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -40,6 +40,7 @@ #include #include #endif +#include "drm_legacy.h" struct drm_vma_entry { struct list_head head; diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 0bf66f9..7a3c73c 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -80,6 +80,7 @@ struct module; struct drm_file; struct drm_device; +struct drm_agp_head; struct device_node; struct videomode; @@ -440,35 +441,6 @@ struct drm_device_dma { }; /** - * AGP memory entry. Stored as a doubly linked list. - */ -struct drm_agp_mem { - unsigned long handle; /**< handle */ - struct agp_memory *memory; - unsigned long bound; /**< address */ - int pages; - struct list_head head; -}; - -/** - * AGP data. - * - * \sa drm_agp_init() and drm_device::agp. - */ -struct drm_agp_head { - struct agp_kern_info agp_info; /**< AGP device information */ - struct list_head memory; - unsigned long mode; /**< AGP mode */ - struct agp_bridge_data *bridge; - int enabled; /**< whether the AGP bus as been enabled */ - int acquired; /**< whether the AGP device has been acquired */ - unsigned long base; - int agp_mtrr; - int cant_use_aperture; - unsigned long page_mask; -}; - -/** * Scatter-gather memory. */ struct drm_sg_mem { diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index 86a0218..3bebeb4 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h @@ -8,6 +8,19 @@ #include #include +struct drm_agp_head { + struct agp_kern_info agp_info; + struct list_head memory; + unsigned long mode; + struct agp_bridge_data *bridge; + int enabled; + int acquired; + unsigned long base; + int agp_mtrr; + int cant_use_aperture; + unsigned long page_mask; +}; + #if __OS_HAS_AGP void drm_free_agp(struct agp_memory * handle, int pages);