From 080a547d4d42d42e08a525aca9a62b5ece7616d5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 5 Feb 2005 08:00:14 +0000 Subject: - Implement drm_initmap, and extend it with the resource number to help FreeBSD. Add drm_get_resource_{start|len} so linux-specific stuff doesn't need to be in shared code. - Fix mach64 build by using __DECONST to work around passing a const pointer to useracc, which is unfortunately not marked const. - Get rid of a lot of maplist code by not having dev->maplist be a pointer, and by sticking the link entries directly in drm_local_map_t rather than having a separate structure for the linked list. - Factor out map uninit and removal into its own routine, rather than duplicating in both drm_takedown() and drm_rmmap(). - Hook up more driver functions, and correct FreeBSD-specific bits of radeon_cp.c, making radeon work. - Baby steps towards using bus_space as we should. --- bsd-core/drm_sysctl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bsd-core/drm_sysctl.c') diff --git a/bsd-core/drm_sysctl.c b/bsd-core/drm_sysctl.c index 220559d9..e4e336b4 100644 --- a/bsd-core/drm_sysctl.c +++ b/bsd-core/drm_sysctl.c @@ -150,7 +150,6 @@ static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS { drm_device_t *dev = arg1; drm_local_map_t *map, *tempmaps; - drm_map_list_entry_t *listentry; const char *types[] = { "FB", "REG", "SHM", "AGP", "SG" }; const char *type, *yesno; int i, mapcount; @@ -163,7 +162,7 @@ static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS DRM_LOCK(); mapcount = 0; - TAILQ_FOREACH(listentry, dev->maplist, link) + TAILQ_FOREACH(map, &dev->maplist, link) mapcount++; tempmaps = malloc(sizeof(drm_local_map_t) * mapcount, M_DRM, M_NOWAIT); @@ -173,8 +172,8 @@ static int drm_vm_info DRM_SYSCTL_HANDLER_ARGS } i = 0; - TAILQ_FOREACH(listentry, dev->maplist, link) - tempmaps[i++] = *listentry->map; + TAILQ_FOREACH(map, &dev->maplist, link) + tempmaps[i++] = *map; DRM_UNLOCK(); -- cgit v1.2.3