summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/radeon_mem.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-07-29 22:23:52 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-07-29 22:23:52 +0000
commit4582fbbd361dbf42791fc2604c8557363ce51964 (patch)
tree3b2fda4eb39e539c596016017293e4fa57332f22 /sys/dev/pci/drm/radeon_mem.c
parent2877a0ec47f42bcbf0b8f3ee0dd6c2c9bb722c39 (diff)
Update to DRM git.
Some stability fixes for radeon. The most part of this diff is related to fixing up the VBLANK (vertical blank interrupt) handling. Now, if the X driver supports the DRM_IOCTL_MODESET_CTL ioctl, (to be used when changing the video modes), then allow the vblank to be disabled once that ioctl has been called. Otherwise, keep the interrupt enabled at all time, since disabling it otherwise will lead to problems. Tested by a few. "no problem" on API/ABI deraadt@.
Diffstat (limited to 'sys/dev/pci/drm/radeon_mem.c')
-rw-r--r--sys/dev/pci/drm/radeon_mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/radeon_mem.c b/sys/dev/pci/drm/radeon_mem.c
index fe4e7261a31..d5b4a339615 100644
--- a/sys/dev/pci/drm/radeon_mem.c
+++ b/sys/dev/pci/drm/radeon_mem.c
@@ -88,7 +88,7 @@ static struct mem_block *alloc_block(struct mem_block *heap, int size,
list_for_each(p, heap) {
int start = (p->start + mask) & ~mask;
- if (p->file_priv == 0 && start + size <= p->start + p->size)
+ if (p->file_priv == NULL && start + size <= p->start + p->size)
return split_block(p, start, size, file_priv);
}
@@ -113,7 +113,7 @@ static void free_block(struct mem_block *p)
/* Assumes a single contiguous range. Needs a special file_priv in
* 'heap' to stop it being subsumed.
*/
- if (p->next->file_priv == 0) {
+ if (p->next->file_priv == NULL) {
struct mem_block *q = p->next;
p->size += q->size;
p->next = q->next;
@@ -121,7 +121,7 @@ static void free_block(struct mem_block *p)
drm_free(q, sizeof(*q), DRM_MEM_BUFS);
}
- if (p->prev->file_priv == 0) {
+ if (p->prev->file_priv == NULL) {
struct mem_block *q = p->prev;
q->size += p->size;
q->next = p->next;
@@ -173,7 +173,7 @@ void radeon_mem_release(struct drm_file *file_priv, struct mem_block *heap)
* 'heap' to stop it being subsumed.
*/
list_for_each(p, heap) {
- while (p->file_priv == 0 && p->next->file_priv == 0) {
+ while (p->file_priv == NULL && p->next->file_priv == NULL) {
struct mem_block *q = p->next;
p->size += q->size;
p->next = q->next;