Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chad Versace <chad.versace@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel: Fix bufmgr_gem->gen for gen > 4
Date: Mon, 30 Jan 2012 09:41:50 -0800	[thread overview]
Message-ID: <1327945310-24565-1-git-send-email-chad.versace@linux.intel.com> (raw)

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

Signed-off-by: Chad Versace <chad.versace@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

             reply	other threads:[~2012-01-30 17:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 17:41 Chad Versace [this message]
2012-01-30 18:01 ` [PATCH] intel: Fix bufmgr_gem->gen for gen > 4 Eugeni Dodonov
2012-01-30 19:14 ` Eric Anholt
2012-01-30 21:10   ` Chad Versace
2012-01-31  1:23   ` Ben Widawsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327945310-24565-1-git-send-email-chad.versace@linux.intel.com \
    --to=chad.versace@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox