From patchwork Wed Jul 10 16:17:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maya Rashish X-Patchwork-Id: 11039393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 426166C5 for ; Thu, 11 Jul 2019 07:24:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2946928A46 for ; Thu, 11 Jul 2019 07:24:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D91F28A49; Thu, 11 Jul 2019 07:24:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 53D6D28A47 for ; Thu, 11 Jul 2019 07:24:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27BEA6E0E5; Thu, 11 Jul 2019 07:23:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx.sdf.org (mx.sdf.org [205.166.94.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3EBB86E10F for ; Wed, 10 Jul 2019 16:17:28 +0000 (UTC) Received: from sdf.org (IDENT:coypu@otaku.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id x6AGHPrS028566 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO) for ; Wed, 10 Jul 2019 16:17:26 GMT Received: (from coypu@localhost) by sdf.org (8.15.2/8.12.8/Submit) id x6AGHPY6021740 for dri-devel@lists.freedesktop.org; Wed, 10 Jul 2019 16:17:25 GMT Date: Wed, 10 Jul 2019 16:17:25 +0000 From: Maya Rashish To: dri-devel@lists.freedesktop.org Subject: [PATCH v3] drm/agp: Remove unused function drm_agp_bind_pages Message-ID: <20190710161725.GA5042@SDF.ORG> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-Mailman-Approved-At: Thu, 11 Jul 2019 07:23:58 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Sam Ravnborg Signed-off-by: Maya Rashish --- drivers/gpu/drm/drm_agpsupport.c | 43 ---------------------------------------- include/drm/drm_agpsupport.h | 14 ------------- 2 files changed, 57 deletions(-) diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index 117b8ee98243..8b4e7b1d82e4 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -465,46 +465,3 @@ void drm_legacy_agp_clear(struct drm_device *dev) dev->agp->acquired = 0; dev->agp->enabled = 0; } - -/** - * Binds a collection of pages into AGP memory at the given offset, returning - * the AGP memory structure containing them. - * - * No reference is held on the pages during this time -- it is up to the - * caller to handle that. - */ -struct agp_memory * -drm_agp_bind_pages(struct drm_device *dev, - struct page **pages, - unsigned long num_pages, - uint32_t gtt_offset, - u32 type) -{ - struct agp_memory *mem; - int ret, i; - - DRM_DEBUG("\n"); - - mem = agp_allocate_memory(dev->agp->bridge, num_pages, - type); - if (mem == NULL) { - DRM_ERROR("Failed to allocate memory for %ld pages\n", - num_pages); - return NULL; - } - - for (i = 0; i < num_pages; i++) - mem->pages[i] = pages[i]; - mem->page_count = num_pages; - - mem->is_flushed = true; - ret = agp_bind_memory(mem, gtt_offset / PAGE_SIZE); - if (ret != 0) { - DRM_ERROR("Failed to bind AGP memory: %d\n", ret); - agp_free_memory(mem); - return NULL; - } - - return mem; -} -EXPORT_SYMBOL(drm_agp_bind_pages); diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h index b05e462276d5..664e120b93e6 100644 --- a/include/drm/drm_agpsupport.h +++ b/include/drm/drm_agpsupport.h @@ -31,11 +31,6 @@ struct drm_agp_head { void drm_free_agp(struct agp_memory * handle, int pages); int drm_bind_agp(struct agp_memory * handle, unsigned int start); int drm_unbind_agp(struct agp_memory * handle); -struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, - struct page **pages, - unsigned long num_pages, - uint32_t gtt_offset, - uint32_t type); struct drm_agp_head *drm_agp_init(struct drm_device *dev); void drm_legacy_agp_clear(struct drm_device *dev); @@ -80,15 +75,6 @@ static inline int drm_unbind_agp(struct agp_memory * handle) return -ENODEV; } -static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, - struct page **pages, - unsigned long num_pages, - uint32_t gtt_offset, - uint32_t type) -{ - return NULL; -} - static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev) { return NULL;