* [PATCH 1/2] Remove unused function drm_agp_bind_pages
@ 2018-05-21 23:35 Maya Rashish
2018-05-22 8:27 ` Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Maya Rashish @ 2018-05-21 23:35 UTC (permalink / raw)
To: dri-devel
---
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 737f0288..9000f0c4 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -458,46 +458,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 b05e4622..664e120b 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;
--
2.17.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] Remove unused function drm_agp_bind_pages
2018-05-21 23:35 [PATCH 1/2] Remove unused function drm_agp_bind_pages Maya Rashish
@ 2018-05-22 8:27 ` Jani Nikula
2018-05-22 9:45 ` [PATCH v2 1/2] drm/agp: " Maya Rashish
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2018-05-22 8:27 UTC (permalink / raw)
To: Maya Rashish, dri-devel
On Mon, 21 May 2018, Maya Rashish <coypu@sdf.org> wrote:
Please add a commit message and your Signed-off-by here.
Please prefix the subject with "drm/agp: " or "drm/agpsupport: ".
BR,
Jani.
> ---
> 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 737f0288..9000f0c4 100644
> --- a/drivers/gpu/drm/drm_agpsupport.c
> +++ b/drivers/gpu/drm/drm_agpsupport.c
> @@ -458,46 +458,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 b05e4622..664e120b 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;
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] drm/agp: Remove unused function drm_agp_bind_pages
2018-05-22 8:27 ` Jani Nikula
@ 2018-05-22 9:45 ` Maya Rashish
0 siblings, 0 replies; 3+ messages in thread
From: Maya Rashish @ 2018-05-22 9:45 UTC (permalink / raw)
To: dri-devel
This function has no callers anywhere within the kernel.
Signed-off-by: Maya Rashish <coypu@sdf.org>
---
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 737f0288..9000f0c4 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -458,46 +458,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 b05e4622..664e120b 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;
--
2.17.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-22 9:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-21 23:35 [PATCH 1/2] Remove unused function drm_agp_bind_pages Maya Rashish
2018-05-22 8:27 ` Jani Nikula
2018-05-22 9:45 ` [PATCH v2 1/2] drm/agp: " Maya Rashish
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.