public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 02/25 v2] drm/i915: preliminary context support
Date: Tue, 5 Jun 2012 15:23:26 +0300	[thread overview]
Message-ID: <20120605122326.GV13065@intel.com> (raw)
In-Reply-To: <1338846185-10571-3-git-send-email-ben@bwidawsk.net>

On Mon, Jun 04, 2012 at 02:42:42PM -0700, Ben Widawsky wrote:
> Very basic code for context setup/destruction in the driver.
> 
> Adds the file i915_gem_context.c This file implements HW context
> support. On gen5+ a HW context consists of an opaque GPU object which is
> referenced at times of context saves and restores.  With RC6 enabled,
> the context is also referenced as the GPU enters and exists from RC6
> (GPU has it's own internal power context, except on gen5).  Though
> something like a context does exist for the media ring, the code only
> supports contexts for the render ring.
> 
> In software, there is a distinction between contexts created by the
> user, and the default HW context. The default HW context is used by GPU
> clients that do not request setup of their own hardware context. The
> default context's state is never restored to help prevent programming
> errors. This would happen if a client ran and piggy-backed off another
> clients GPU state.  The default context only exists to give the GPU some
> offset to load as the current to invoke a save of the context we
> actually care about. In fact, the code could likely be constructed,
> albeit in a more complicated fashion, to never use the default context,
> though that limits the driver's ability to swap out, and/or destroy
> other contexts.

I'm not actually familiar with the GPU state management in the driver
yet, but I assume that currently much of the state has to be uploaded
every time a client submits rendering commands to the GPU.

So would it make sense to have an implicit context created for each
client? That way each client could just pretend that it's the only user
of the GPU and wouldn't have to worry about someone else corrupting the
GPU state.

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2012-06-05 12:23 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 21:42 [PATCH 00/25] i915 HW context support Ben Widawsky
2012-06-04 21:42 ` [PATCH 01/25] drm/i915: CXT_SIZE register offsets added Ben Widawsky
2012-06-04 21:42 ` [PATCH 02/25 v2] drm/i915: preliminary context support Ben Widawsky
2012-06-05 12:23   ` Ville Syrjälä [this message]
2012-06-05 16:30     ` Ben Widawsky
2012-06-04 21:42 ` [PATCH 03/25 v2] drm/i915: context basic create & destroy Ben Widawsky
2012-06-13 23:27   ` Ben Widawsky
2012-06-04 21:42 ` [PATCH 04/25] drm/i915: add context information to objects Ben Widawsky
2012-06-13 22:01   ` Daniel Vetter
2012-06-13 23:26     ` Ben Widawsky
2012-06-04 21:42 ` [PATCH 05/25] drm/i915: always bind context objects immediately Ben Widawsky
2012-06-04 21:42 ` [PATCH 06/25 v3] drm/i915: context switch implementation Ben Widawsky
2012-06-04 21:42 ` [PATCH 07/25] drm/i915: context trace events Ben Widawsky
2012-06-13 22:23   ` Daniel Vetter
2012-06-13 23:27     ` Ben Widawsky
2012-06-04 21:42 ` [PATCH 08/25] drm/i915: Ivybridge MI_ARB_ON_OFF context w/a Ben Widawsky
2012-06-04 21:42 ` [PATCH 09/25] drm/i915: PIPE_CONTROL_TLB_INVALIDATE Ben Widawsky
2012-06-04 21:42 ` [PATCH 10/25 v2] drm/i915: possibly invalidate TLB before context switch Ben Widawsky
2012-06-04 21:42 ` [PATCH 11/25] drm/i915: use the default context Ben Widawsky
2012-06-04 21:42 ` [PATCH 12/25] drm/i915: add ccid to error state Ben Widawsky
2012-06-04 21:42 ` [PATCH 13/25 v3] drm/i915: switch to default context on idle Ben Widawsky
2012-06-04 21:42 ` [PATCH 14/25 v3] drm/i915/context: create & destroy ioctls Ben Widawsky
2012-06-04 21:42 ` [PATCH 15/25 v2] drm/i915/context: switch contexts with execbuf2 Ben Widawsky
2012-06-04 21:42 ` [PATCH 16/25] drm/i915: reset the GPU on context fini Ben Widawsky
2012-06-04 21:42 ` [PATCH 17/25] intel: wait render placeholder Ben Widawsky
2012-06-04 21:42 ` [PATCH 18/25] intel: Merge updated kernel header Ben Widawsky
2012-06-04 21:42 ` [PATCH 19/25] intel/context: Add drm_intel_context type Ben Widawsky
2012-06-04 21:43 ` [PATCH 20/25] intel/context: new execbuf interface for contexts Ben Widawsky
2012-06-04 21:43 ` [PATCH 21/25] intel: add decoding of MI_SET_CONTEXT Ben Widawsky
2012-06-04 21:43 ` [PATCH 22/25] context: libdrm wrappers Ben Widawsky
2012-06-04 21:43 ` [PATCH 23/25] context: update for new execbuf2 element Ben Widawsky
2012-06-04 21:43 ` [PATCH 24/25] contexts: basic test coverage Ben Widawsky
2012-06-13 23:30   ` Daniel Vetter
2012-06-14  3:13   ` [PATCH] " Ben Widawsky
2012-06-04 21:43 ` [PATCH 25/25] i965: hw context support Ben Widawsky
2012-06-04 23:01   ` Paul Berry
2012-06-04 23:10     ` [Intel-gfx] " Ben Widawsky
2012-06-05  5:53 ` [PATCH 00/25] i915 HW " Dave Airlie
2012-06-05  7:08   ` [Mesa-dev] " Kenneth Graunke
2012-06-05 16:32     ` Ben Widawsky
2012-06-05 23:37 ` Kenneth Graunke
2012-06-07 16:17   ` Ben Widawsky
2012-06-14 16:04 ` Daniel Vetter

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=20120605122326.GV13065@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox