All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH] i965: Gen5: Use HW contexts on Ironlake
Date: Sun, 14 Jul 2013 09:22:54 -0700	[thread overview]
Message-ID: <1373818974-23102-11-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1373818974-23102-1-git-send-email-ben@bwidawsk.net>

NOTE: The error messages might need updating if the patches don't make
3.11.

NOTE2: I'm not sure if mesa devs want to make HW contexts a hard
requirement on GEN5, as it is on GEN6+. I think letting the patches soak
for a few releases first, won't be a bad idea.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 src/mesa/drivers/dri/i965/brw_context.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index a72e226..4a0a6ad 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -311,7 +311,7 @@ brwCreateContext(int api,
    /* Reinitialize the context point state.  It depends on ctx->Const values. */
    _mesa_init_point(ctx);
 
-   if (brw->gen >= 6) {
+   if (brw->gen >= 5) {
       /* Create a new hardware context.  Using a hardware context means that
        * our GPU state will be saved/restored on context switch, allowing us
        * to assume that the GPU is in the same state we left it in.
@@ -322,7 +322,10 @@ brwCreateContext(int api,
       brw->hw_ctx = drm_intel_gem_context_create(brw->bufmgr);
 
       if (!brw->hw_ctx) {
-         fprintf(stderr, "Gen6+ requires Kernel 3.6 or later.\n");
+	 if (brw->gen == 5)
+	    fprintf(stderr, "Gen5 requires Kernel 3.11 or later.\n");
+	 else
+	    fprintf(stderr, "Gen6+ requires Kernel 3.6 or later.\n");
          ralloc_free(brw);
          return false;
       }
-- 
1.8.3.2

  parent reply	other threads:[~2013-07-14 16:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-14 16:22 [PATCH 0/9] HW contest support for Ironlake Ben Widawsky
2013-07-14 16:22 ` [PATCH 1/9] drm/i915: move ilk rc6 context setup Ben Widawsky
2013-07-14 16:22 ` [PATCH 2/9] drm/i915: Convert renderctx to a regular context Ben Widawsky
2013-07-15 10:24   ` Chris Wilson
2013-07-15 18:04     ` [PATCH 2/9] [v2] " Ben Widawsky
2013-07-14 16:22 ` [PATCH 3/9] drm/i915: Make ILK context objects more like others Ben Widawsky
2013-07-14 19:10   ` [PATCH 3/9] [v2] " Ben Widawsky
2013-07-14 16:22 ` [PATCH 4/9] drm/i915: Add gen5 support to mi_set_context Ben Widawsky
2013-07-14 16:22 ` [PATCH 5/9] drm/i915: Use do_switch for ILK renderctx Ben Widawsky
2013-07-14 16:22 ` [PATCH 6/9] drm/i915: HW contexts for ILK Ben Widawsky
2013-07-14 16:22 ` [PATCH 7/9] drm/i915: Use only the default context " Ben Widawsky
2013-07-14 16:22 ` [PATCH 8/9] drm/i915: Restore ILK powerctx pin attributes Ben Widawsky
2013-07-15 10:30   ` Chris Wilson
2013-07-15 17:58     ` Ben Widawsky
2013-07-15 22:12       ` Chris Wilson
2013-07-14 16:22 ` [PATCH 9/9] drm/i915: Re-enable rc6 on ILK (again^5) Ben Widawsky
2013-07-14 18:35   ` Daniel Vetter
2013-07-14 19:09   ` [PATCH 9/9] [v2] drm/i915: enable rc6 on ILK again^5 Ben Widawsky
2013-07-14 16:22 ` Ben Widawsky [this message]
2013-07-14 16:24 ` [PATCH 0/9] HW contest support for Ironlake Ben Widawsky
2013-07-14 17:38   ` [PATCH 0/9] HW context support for Ironlake (was: Re: [PATCH 0/9] HW contest support for Ironlake) Ben Widawsky
2013-07-15 10:32 ` [PATCH 0/9] HW contest support for Ironlake Chris Wilson
2013-07-15 12:44 ` Chris Wilson
2013-07-15 17:24   ` Ben Widawsky
2013-07-15 18:52     ` Chris Wilson
2013-07-16 18:21   ` 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=1373818974-23102-11-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.