drm_scatter.c (198697) | drm_scatter.c (207066) |
---|---|
1/*- 2 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 3 * All Rights Reserved. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, --- 14 unchanged lines hidden (view full) --- 23 * 24 * Authors: 25 * Gareth Hughes <gareth@valinux.com> 26 * Eric Anholt <anholt@FreeBSD.org> 27 * 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. 3 * All Rights Reserved. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, --- 14 unchanged lines hidden (view full) --- 23 * 24 * Authors: 25 * Gareth Hughes <gareth@valinux.com> 26 * Eric Anholt <anholt@FreeBSD.org> 27 * 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/drm/drm_scatter.c 198697 2009-10-30 18:30:13Z rnoland $"); | 31__FBSDID("$FreeBSD: head/sys/dev/drm/drm_scatter.c 207066 2010-04-22 18:21:25Z rnoland $"); |
32 33/** @file drm_scatter.c 34 * Allocation of memory for scatter-gather mappings by the graphics chip. 35 * 36 * The memory allocated here is then made into an aperture in the card 37 * by drm_ati_pcigart_init(). 38 */ 39 --- 55 unchanged lines hidden (view full) --- 95 if (dev->sg) { 96 DRM_UNLOCK(); 97 drm_sg_cleanup(entry); 98 return EINVAL; 99 } 100 dev->sg = entry; 101 DRM_UNLOCK(); 102 | 32 33/** @file drm_scatter.c 34 * Allocation of memory for scatter-gather mappings by the graphics chip. 35 * 36 * The memory allocated here is then made into an aperture in the card 37 * by drm_ati_pcigart_init(). 38 */ 39 --- 55 unchanged lines hidden (view full) --- 95 if (dev->sg) { 96 DRM_UNLOCK(); 97 drm_sg_cleanup(entry); 98 return EINVAL; 99 } 100 dev->sg = entry; 101 DRM_UNLOCK(); 102 |
103 DRM_DEBUG("handle=%08lx, kva=%p, contents=%08lx\n", entry->handle, 104 entry->virtual, *(unsigned long *)entry->virtual); | 103 pmap_change_attr((vm_offset_t)dmah->vaddr, request->size, 104 PAT_WRITE_COMBINING); |
105 106 request->handle = entry->handle; 107 | 105 106 request->handle = entry->handle; 107 |
108 DRM_DEBUG("handle=%08lx, kva=%p, contents=%08lx\n", entry->handle, 109 entry->virtual, *(unsigned long *)entry->virtual); 110 |
|
108 return 0; 109} 110 111static void 112drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) 113{ 114 struct drm_sg_mem *entry = arg; 115 int i; --- 58 unchanged lines hidden --- | 111 return 0; 112} 113 114static void 115drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) 116{ 117 struct drm_sg_mem *entry = arg; 118 int i; --- 58 unchanged lines hidden --- |