Deleted Added
sdiff udiff text old ( 182080 ) new ( 182883 )
full compact
1/*-
2 * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
3 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation

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

24 *
25 * Authors:
26 * Rickard E. (Rik) Faith <faith@valinux.com>
27 * Gareth Hughes <gareth@valinux.com>
28 *
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/drm/drm_bufs.c 182080 2008-08-23 20:59:12Z rnoland $");
33
34/** @file drm_bufs.c
35 * Implementation of the ioctls for setup of DRM mappings and DMA buffers.
36 */
37
38#include "dev/pci/pcireg.h"
39
40#include "dev/drm/drmP.h"

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

593 dma->page_count + (count << page_order) );
594
595 entry->buf_size = size;
596 entry->page_order = page_order;
597 byte_count = 0;
598 page_count = 0;
599
600 while ( entry->buf_count < count ) {
601 drm_dma_handle_t *dmah = drm_pci_alloc(dev, size, alignment,
602 0xfffffffful);
603 if (dmah == NULL) {
604 /* Set count correctly so we free the proper amount. */
605 entry->buf_count = count;
606 entry->seg_count = count;
607 drm_cleanup_buf_error(dev, entry);
608 free(temp_pagelist, M_DRM);
609 return ENOMEM;
610 }

--- 523 unchanged lines hidden ---