Deleted Added
full compact
i915_gem_gtt.c (277487) i915_gem_gtt.c (280183)
1/*
2 * Copyright �� 2010 Daniel Vetter
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 9 unchanged lines hidden (view full) ---

18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 *
23 */
24
25#include <sys/cdefs.h>
1/*
2 * Copyright �� 2010 Daniel Vetter
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 9 unchanged lines hidden (view full) ---

18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 *
23 */
24
25#include <sys/cdefs.h>
26__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/i915_gem_gtt.c 277487 2015-01-21 16:10:37Z kib $");
26__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/i915_gem_gtt.c 280183 2015-03-17 18:50:33Z dumbbell $");
27
28#include <dev/drm2/drmP.h>
29#include <dev/drm2/drm.h>
30#include <dev/drm2/i915/i915_drm.h>
31#include <dev/drm2/i915/i915_drv.h>
32#include <dev/drm2/i915/intel_drv.h>
33#include <sys/sched.h>
34#include <sys/sf_buf.h>

--- 315 unchanged lines hidden (view full) ---

350 dev_priv->mm.gtt_start = start;
351 dev_priv->mm.gtt_mappable_end = mappable_end;
352 dev_priv->mm.gtt_end = end;
353 dev_priv->mm.gtt_total = end - start;
354 dev_priv->mm.mappable_gtt_total = mappable;
355
356 /* ... but ensure that we clear the entire range. */
357 intel_gtt_clear_range(start / PAGE_SIZE, (end-start) / PAGE_SIZE);
27
28#include <dev/drm2/drmP.h>
29#include <dev/drm2/drm.h>
30#include <dev/drm2/i915/i915_drm.h>
31#include <dev/drm2/i915/i915_drv.h>
32#include <dev/drm2/i915/intel_drv.h>
33#include <sys/sched.h>
34#include <sys/sf_buf.h>

--- 315 unchanged lines hidden (view full) ---

350 dev_priv->mm.gtt_start = start;
351 dev_priv->mm.gtt_mappable_end = mappable_end;
352 dev_priv->mm.gtt_end = end;
353 dev_priv->mm.gtt_total = end - start;
354 dev_priv->mm.mappable_gtt_total = mappable;
355
356 /* ... but ensure that we clear the entire range. */
357 intel_gtt_clear_range(start / PAGE_SIZE, (end-start) / PAGE_SIZE);
358 device_printf(dev->device,
358 device_printf(dev->dev,
359 "taking over the fictitious range 0x%lx-0x%lx\n",
360 dev->agp->base + start, dev->agp->base + start + mappable);
361 error = -vm_phys_fictitious_reg_range(dev->agp->base + start,
362 dev->agp->base + start + mappable, VM_MEMATTR_WRITE_COMBINING);
363 return (error);
364}
359 "taking over the fictitious range 0x%lx-0x%lx\n",
360 dev->agp->base + start, dev->agp->base + start + mappable);
361 error = -vm_phys_fictitious_reg_range(dev->agp->base + start,
362 dev->agp->base + start + mappable, VM_MEMATTR_WRITE_COMBINING);
363 return (error);
364}