diff options
author | Keith Packard <keithp@keithp.com> | 2009-05-11 13:52:00 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-05-15 17:29:13 -0700 |
commit | 87332a7cc16af82aa47e07fbf90da3635b071dbf (patch) | |
tree | 385c8367b8bce4d48a8c2c5d67c7cbd550496191 /src/i830_memory.c | |
parent | ebe05200df381c0e6ee636f0f83440bfedea9bcb (diff) |
Use drm_intel_bo_disable_reuse API to flag scanout and cursor buffers
Buffers referenced by the kernel for scanout or cursor display should not be
reused by the driver. Use the new drm API to disable reuse of these buffers.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r-- | src/i830_memory.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c index 892c26e9..2a697a7d 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -799,6 +799,9 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name, } } + if (flags & DISABLE_REUSE) + drm_intel_bo_disable_reuse(mem->bo); + /* Insert new allocation into the list */ mem->prev = NULL; mem->next = pI830->bo_list; @@ -1076,7 +1079,7 @@ i830_allocate_framebuffer(ScrnInfoPtr pScrn) i830_memory *front_buffer = NULL; enum tile_format tile_format = TILE_NONE; - flags = ALLOW_SHARING; + flags = ALLOW_SHARING|DISABLE_REUSE; /* We'll allocate the fb such that the root window will fit regardless of * rotation. @@ -1142,6 +1145,8 @@ i830_allocate_cursor_buffers(ScrnInfoPtr pScrn) flags = pI830->CursorNeedsPhysical ? NEED_PHYSICAL_ADDR : 0; + flags |= DISABLE_REUSE; + /* Try to allocate one big blob for our cursor memory. This works * around a limitation in the FreeBSD AGP driver that allows only one * physical allocation larger than a page, and could allow us |