Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/agp: Remove unused function drm_agp_bind_pages

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Maya Rashish <coypu@sdf.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190710161725.GA5042@SDF.ORG

authored by

Maya Rashish and committed by
Sam Ravnborg
c3bbb48e 94eb1e10

-57
-43
drivers/gpu/drm/drm_agpsupport.c
··· 465 465 dev->agp->acquired = 0; 466 466 dev->agp->enabled = 0; 467 467 } 468 - 469 - /** 470 - * Binds a collection of pages into AGP memory at the given offset, returning 471 - * the AGP memory structure containing them. 472 - * 473 - * No reference is held on the pages during this time -- it is up to the 474 - * caller to handle that. 475 - */ 476 - struct agp_memory * 477 - drm_agp_bind_pages(struct drm_device *dev, 478 - struct page **pages, 479 - unsigned long num_pages, 480 - uint32_t gtt_offset, 481 - u32 type) 482 - { 483 - struct agp_memory *mem; 484 - int ret, i; 485 - 486 - DRM_DEBUG("\n"); 487 - 488 - mem = agp_allocate_memory(dev->agp->bridge, num_pages, 489 - type); 490 - if (mem == NULL) { 491 - DRM_ERROR("Failed to allocate memory for %ld pages\n", 492 - num_pages); 493 - return NULL; 494 - } 495 - 496 - for (i = 0; i < num_pages; i++) 497 - mem->pages[i] = pages[i]; 498 - mem->page_count = num_pages; 499 - 500 - mem->is_flushed = true; 501 - ret = agp_bind_memory(mem, gtt_offset / PAGE_SIZE); 502 - if (ret != 0) { 503 - DRM_ERROR("Failed to bind AGP memory: %d\n", ret); 504 - agp_free_memory(mem); 505 - return NULL; 506 - } 507 - 508 - return mem; 509 - } 510 - EXPORT_SYMBOL(drm_agp_bind_pages);
-14
include/drm/drm_agpsupport.h
··· 31 31 void drm_free_agp(struct agp_memory * handle, int pages); 32 32 int drm_bind_agp(struct agp_memory * handle, unsigned int start); 33 33 int drm_unbind_agp(struct agp_memory * handle); 34 - struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, 35 - struct page **pages, 36 - unsigned long num_pages, 37 - uint32_t gtt_offset, 38 - uint32_t type); 39 34 40 35 struct drm_agp_head *drm_agp_init(struct drm_device *dev); 41 36 void drm_legacy_agp_clear(struct drm_device *dev); ··· 73 78 static inline int drm_unbind_agp(struct agp_memory * handle) 74 79 { 75 80 return -ENODEV; 76 - } 77 - 78 - static inline struct agp_memory *drm_agp_bind_pages(struct drm_device *dev, 79 - struct page **pages, 80 - unsigned long num_pages, 81 - uint32_t gtt_offset, 82 - uint32_t type) 83 - { 84 - return NULL; 85 81 } 86 82 87 83 static inline struct drm_agp_head *drm_agp_init(struct drm_device *dev)