[Intel-gfx] [PATCH] intel: Fix bufmgr_gem->gen for gen > 4

Chad Versace chad.versace at linux.intel.com
Mon Jan 30 18:41:50 CET 2012


If the pci_device's actual gen was > 4, then we stupidly set
bufmgr_gem->gen = 6.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 intel/intel_bufmgr_gem.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 2b4fab1..26e3a5c 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2321,8 +2321,14 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 		bufmgr_gem->gen = 3;
 	else if (IS_GEN4(bufmgr_gem->pci_device))
 		bufmgr_gem->gen = 4;
-	else
+	else if (IS_GEN5(bufmgr_gem->pci_device))
+		bufmgr_gem->gen = 5;
+	else if (IS_GEN6(bufmgr_gem->pci_device))
 		bufmgr_gem->gen = 6;
+	else if (IS_GEN7(bufmgr_gem->pci_device))
+        	bufmgr_gem->gen = 7;
+	else
+        	assert(0);
 
 	if (IS_GEN3(bufmgr_gem->pci_device) &&
 	    bufmgr_gem->gtt_size > 256*1024*1024) {
-- 
1.7.7.5




More information about the Intel-gfx mailing list