[Intel-gfx] [PATCH 2/2] drm/i915: Try to allocate more memory for FBC on pre-GM45 chips

Zhenyu Wang zhenyuw at linux.intel.com
Tue Mar 23 04:12:33 CET 2010


From: Zhao Yakui <yakui.zhao at intel.com>

On pre-GM45 chips, the framebuffer can support up to 1536 lines and 2048 pixels,
which means that it will can support up to 12M memory space of framebuffer. So
try to allocate more memory for FBC from the stolen memory if possible.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_dma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 61fb967..1cb5299 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1461,7 +1461,9 @@ static int i915_load_modeset_init(struct drm_device *dev,
 					cfb_size = 12 * 1024 * 1024;
 				else
 					cfb_size = 8 * 1024 * 1024;
-			} else
+			} else if (prealloc_size >= (16 * 1024 * 1024))
+				cfb_size = 12 * 1024 * 1024;
+			else
 				cfb_size = 8*1024*1024;
 		} else /* fall back to 7/8 of the stolen space */
 			cfb_size = prealloc_size * 7 / 8;
-- 
1.6.3.3




More information about the Intel-gfx mailing list