summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-03-25 14:59:07 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-03-25 14:59:07 +1000
commit1e7d005aa0ccd86012194c8292fe55ca8534348b (patch)
treed5c72028abc83688f2e859532b7a359551bce4bf
parentf4cb7a7340e1954ed282efec94a62e816918bfa7 (diff)
nouveau: prevent fbcon notifier waits when unnecessary
It seems fbcon_sync will get called continually by something even while not at a console, so ignore the call unless we've previously rendered to the fbcon.
-rw-r--r--linux-core/nouveau_dma.h1
-rw-r--r--linux-core/nv50_fbcon.c4
-rw-r--r--shared-core/nouveau_drv.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/linux-core/nouveau_dma.h b/linux-core/nouveau_dma.h
index 66d567fb..085c506b 100644
--- a/linux-core/nouveau_dma.h
+++ b/linux-core/nouveau_dma.h
@@ -91,6 +91,7 @@ FIRE_RING(struct nouveau_channel *chan)
if (chan->dma.cur == chan->dma.put)
return;
+ chan->accel_done = true;
DRM_MEMORYBARRIER();
chan->dma.put = chan->dma.cur;
diff --git a/linux-core/nv50_fbcon.c b/linux-core/nv50_fbcon.c
index dfa14ae7..9e0625d6 100644
--- a/linux-core/nv50_fbcon.c
+++ b/linux-core/nv50_fbcon.c
@@ -12,7 +12,8 @@ nv50_fbcon_sync(struct fb_info *info)
struct nouveau_channel *chan = dev_priv->channel;
int ret, i;
- if (info->state != FBINFO_STATE_RUNNING ||
+ if (!chan->accel_done ||
+ info->state != FBINFO_STATE_RUNNING ||
info->flags & FBINFO_HWACCEL_DISABLED)
return 0;
@@ -44,6 +45,7 @@ nv50_fbcon_sync(struct fb_info *info)
return 0;
}
+ chan->accel_done = false;
return 0;
}
diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h
index 87ef8efa..0667c161 100644
--- a/shared-core/nouveau_drv.h
+++ b/shared-core/nouveau_drv.h
@@ -173,6 +173,7 @@ struct nouveau_channel
volatile uint32_t *m2mf_ntfy_map;
uint32_t vram_handle;
uint32_t gart_handle;
+ bool accel_done;
/* Push buffer state (only for drm's channel on !mm_enabled) */
struct {