Really revert 312923 this time
This commit is contained in:
parent
b4b4b5304b
commit
b7a1807568
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312928
@ -35,7 +35,6 @@
|
|||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <dev/drm2/drmP.h>
|
#include <dev/drm2/drmP.h>
|
||||||
#include <linux/slab.h>
|
|
||||||
|
|
||||||
#if __OS_HAS_AGP
|
#if __OS_HAS_AGP
|
||||||
|
|
||||||
@ -209,13 +208,15 @@ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
|
|||||||
|
|
||||||
if (!dev->agp || !dev->agp->acquired)
|
if (!dev->agp || !dev->agp->acquired)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL)))
|
if (!(entry = malloc(sizeof(*entry), DRM_MEM_AGPLISTS, M_NOWAIT)))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
memset(entry, 0, sizeof(*entry));
|
||||||
|
|
||||||
pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE;
|
pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE;
|
||||||
type = (u32) request->type;
|
type = (u32) request->type;
|
||||||
if (!(memory = agp_alloc_memory(dev->agp->bridge, type, pages << PAGE_SHIFT))) {
|
if (!(memory = agp_alloc_memory(dev->agp->bridge, type, pages << PAGE_SHIFT))) {
|
||||||
kfree(entry);
|
free(entry, DRM_MEM_AGPLISTS);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,7 +376,7 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
|
|||||||
list_del(&entry->head);
|
list_del(&entry->head);
|
||||||
|
|
||||||
drm_free_agp(entry->memory, entry->pages);
|
drm_free_agp(entry->memory, entry->pages);
|
||||||
kfree(entry);
|
free(entry, DRM_MEM_AGPLISTS);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(drm_agp_free);
|
EXPORT_SYMBOL(drm_agp_free);
|
||||||
@ -403,11 +404,12 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
|
|||||||
{
|
{
|
||||||
struct drm_agp_head *head = NULL;
|
struct drm_agp_head *head = NULL;
|
||||||
|
|
||||||
if (!(head = kzalloc(sizeof(*head), GFP_KERNEL)))
|
if (!(head = malloc(sizeof(*head), DRM_MEM_AGPLISTS, M_NOWAIT)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
memset((void *)head, 0, sizeof(*head));
|
||||||
head->bridge = agp_find_device();
|
head->bridge = agp_find_device();
|
||||||
if (!head->bridge) {
|
if (!head->bridge) {
|
||||||
kfree(head);
|
free(head, DRM_MEM_AGPLISTS);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
agp_get_info(head->bridge, &head->agp_info);
|
agp_get_info(head->bridge, &head->agp_info);
|
||||||
|
@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <sys/sysent.h>
|
#include <sys/sysent.h>
|
||||||
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <dev/drm2/drmP.h>
|
#include <dev/drm2/drmP.h>
|
||||||
#include <dev/drm2/drm_core.h>
|
#include <dev/drm2/drm_core.h>
|
||||||
#include <dev/drm2/drm_global.h>
|
#include <dev/drm2/drm_global.h>
|
||||||
@ -212,7 +211,7 @@ int drm_lastclose(struct drm_device * dev)
|
|||||||
if (entry->bound)
|
if (entry->bound)
|
||||||
drm_unbind_agp(entry->memory);
|
drm_unbind_agp(entry->memory);
|
||||||
drm_free_agp(entry->memory, entry->pages);
|
drm_free_agp(entry->memory, entry->pages);
|
||||||
kfree(entry);
|
free(entry, DRM_MEM_AGPLISTS);
|
||||||
}
|
}
|
||||||
INIT_LIST_HEAD(&dev->agp->memory);
|
INIT_LIST_HEAD(&dev->agp->memory);
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ MALLOC_DEFINE(DRM_MEM_QUEUES, "drm_queues", "DRM QUEUE Data Structures");
|
|||||||
MALLOC_DEFINE(DRM_MEM_CMDS, "drm_cmds", "DRM COMMAND Data Structures");
|
MALLOC_DEFINE(DRM_MEM_CMDS, "drm_cmds", "DRM COMMAND Data Structures");
|
||||||
MALLOC_DEFINE(DRM_MEM_MAPPINGS, "drm_mapping", "DRM MAPPING Data Structures");
|
MALLOC_DEFINE(DRM_MEM_MAPPINGS, "drm_mapping", "DRM MAPPING Data Structures");
|
||||||
MALLOC_DEFINE(DRM_MEM_BUFLISTS, "drm_buflists", "DRM BUFLISTS Data Structures");
|
MALLOC_DEFINE(DRM_MEM_BUFLISTS, "drm_buflists", "DRM BUFLISTS Data Structures");
|
||||||
|
MALLOC_DEFINE(DRM_MEM_AGPLISTS, "drm_agplists", "DRM AGPLISTS Data Structures");
|
||||||
MALLOC_DEFINE(DRM_MEM_CTXBITMAP, "drm_ctxbitmap",
|
MALLOC_DEFINE(DRM_MEM_CTXBITMAP, "drm_ctxbitmap",
|
||||||
"DRM CTXBITMAP Data Structures");
|
"DRM CTXBITMAP Data Structures");
|
||||||
MALLOC_DEFINE(DRM_MEM_SGLISTS, "drm_sglists", "DRM SGLISTS Data Structures");
|
MALLOC_DEFINE(DRM_MEM_SGLISTS, "drm_sglists", "DRM SGLISTS Data Structures");
|
||||||
@ -495,5 +496,4 @@ MODULE_VERSION(drmn, 1);
|
|||||||
MODULE_DEPEND(drmn, agp, 1, 1, 1);
|
MODULE_DEPEND(drmn, agp, 1, 1, 1);
|
||||||
MODULE_DEPEND(drmn, pci, 1, 1, 1);
|
MODULE_DEPEND(drmn, pci, 1, 1, 1);
|
||||||
MODULE_DEPEND(drmn, mem, 1, 1, 1);
|
MODULE_DEPEND(drmn, mem, 1, 1, 1);
|
||||||
MODULE_DEPEND(drmn, linuxkpi, 1, 1, 1);
|
|
||||||
MODULE_DEPEND(drmn, iicbus, 1, 1, 1);
|
MODULE_DEPEND(drmn, iicbus, 1, 1, 1);
|
||||||
|
@ -552,6 +552,7 @@ MALLOC_DECLARE(DRM_MEM_QUEUES);
|
|||||||
MALLOC_DECLARE(DRM_MEM_CMDS);
|
MALLOC_DECLARE(DRM_MEM_CMDS);
|
||||||
MALLOC_DECLARE(DRM_MEM_MAPPINGS);
|
MALLOC_DECLARE(DRM_MEM_MAPPINGS);
|
||||||
MALLOC_DECLARE(DRM_MEM_BUFLISTS);
|
MALLOC_DECLARE(DRM_MEM_BUFLISTS);
|
||||||
|
MALLOC_DECLARE(DRM_MEM_AGPLISTS);
|
||||||
MALLOC_DECLARE(DRM_MEM_CTXBITMAP);
|
MALLOC_DECLARE(DRM_MEM_CTXBITMAP);
|
||||||
MALLOC_DECLARE(DRM_MEM_SGLISTS);
|
MALLOC_DECLARE(DRM_MEM_SGLISTS);
|
||||||
MALLOC_DECLARE(DRM_MEM_MM);
|
MALLOC_DECLARE(DRM_MEM_MM);
|
||||||
|
@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <dev/drm2/drmP.h>
|
#include <dev/drm2/drmP.h>
|
||||||
#include <dev/drm2/drm_core.h>
|
#include <dev/drm2/drm_core.h>
|
||||||
#include <linux/slab.h>
|
|
||||||
|
|
||||||
#ifdef DRM_DEBUG_DEFAULT_ON
|
#ifdef DRM_DEBUG_DEFAULT_ON
|
||||||
unsigned int drm_debug = (DRM_DEBUGBITS_DEBUG | DRM_DEBUGBITS_KMS |
|
unsigned int drm_debug = (DRM_DEBUGBITS_DEBUG | DRM_DEBUGBITS_KMS |
|
||||||
@ -316,7 +315,7 @@ void drm_cancel_fill_in_dev(struct drm_device *dev)
|
|||||||
DRM_MTRR_WC);
|
DRM_MTRR_WC);
|
||||||
DRM_DEBUG("mtrr_del=%d\n", retval);
|
DRM_DEBUG("mtrr_del=%d\n", retval);
|
||||||
}
|
}
|
||||||
kfree(dev->agp);
|
free(dev->agp, DRM_MEM_AGPLISTS);
|
||||||
dev->agp = NULL;
|
dev->agp = NULL;
|
||||||
|
|
||||||
drm_ht_remove(&dev->map_hash);
|
drm_ht_remove(&dev->map_hash);
|
||||||
@ -468,7 +467,7 @@ void drm_put_dev(struct drm_device *dev)
|
|||||||
drm_sysctl_cleanup(dev);
|
drm_sysctl_cleanup(dev);
|
||||||
|
|
||||||
if (drm_core_has_AGP(dev) && dev->agp) {
|
if (drm_core_has_AGP(dev) && dev->agp) {
|
||||||
kfree(dev->agp);
|
free(dev->agp, DRM_MEM_AGPLISTS);
|
||||||
dev->agp = NULL;
|
dev->agp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ SRCS = \
|
|||||||
ati_pcigart.c
|
ati_pcigart.c
|
||||||
#ttm_page_alloc_dma.c
|
#ttm_page_alloc_dma.c
|
||||||
|
|
||||||
CFLAGS+= -I${.CURDIR}/../../../compat/linuxkpi/common/include
|
|
||||||
|
|
||||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64"
|
||||||
SRCS += drm_ioc32.c
|
SRCS += drm_ioc32.c
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
Reference in New Issue
Block a user