Deleted Added
full compact
drm_drv.c (189563) drm_drv.c (189869)
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>
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_drv.c 189563 2009-03-09 07:55:18Z rnoland $");
32__FBSDID("$FreeBSD: head/sys/dev/drm/drm_drv.c 189869 2009-03-16 08:19:11Z rnoland $");
33
34/** @file drm_drv.c
35 * The catch-all file for DRM device support, including module setup/teardown,
36 * open/close, and ioctl dispatch.
37 */
38
39
40#include <sys/limits.h>

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

661 if (drm_lock_take(&dev->lock, DRM_KERNEL_CONTEXT)) {
662 dev->lock.file_priv = file_priv;
663 dev->lock.lock_time = jiffies;
664 atomic_inc(&dev->counts[_DRM_STAT_LOCKS]);
665 break; /* Got lock */
666 }
667 /* Contention */
668 retcode = mtx_sleep((void *)&dev->lock.lock_queue,
33
34/** @file drm_drv.c
35 * The catch-all file for DRM device support, including module setup/teardown,
36 * open/close, and ioctl dispatch.
37 */
38
39
40#include <sys/limits.h>

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

661 if (drm_lock_take(&dev->lock, DRM_KERNEL_CONTEXT)) {
662 dev->lock.file_priv = file_priv;
663 dev->lock.lock_time = jiffies;
664 atomic_inc(&dev->counts[_DRM_STAT_LOCKS]);
665 break; /* Got lock */
666 }
667 /* Contention */
668 retcode = mtx_sleep((void *)&dev->lock.lock_queue,
669 &dev->dev_lock, PZERO | PCATCH, "drmlk2", 0);
669 &dev->dev_lock, PCATCH, "drmlk2", 0);
670 if (retcode)
671 break;
672 }
673 if (retcode == 0) {
674 dev->driver->reclaim_buffers_locked(dev, file_priv);
675 drm_lock_free(&dev->lock, DRM_KERNEL_CONTEXT);
676 }
677 }

--- 161 unchanged lines hidden ---
670 if (retcode)
671 break;
672 }
673 if (retcode == 0) {
674 dev->driver->reclaim_buffers_locked(dev, file_priv);
675 drm_lock_free(&dev->lock, DRM_KERNEL_CONTEXT);
676 }
677 }

--- 161 unchanged lines hidden ---