All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: "Rogovin, Kevin" <kevin.rogovin@intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] i965: check scratch page in a locked fashion on each ioctl
Date: Tue, 05 Dec 2017 15:59:18 +0200	[thread overview]
Message-ID: <1512482358.12422.10.camel@linux.intel.com> (raw)
In-Reply-To: <5F28323D36A617439F1B0EC48B5E0D356AF0843A@irsmsx111.ger.corp.intel.com>

On Tue, 2017-12-05 at 10:41 +0000, Rogovin, Kevin wrote:
> Thanks, I will make a v2 and post it shortly to correct for my
> terribly embarrassing omission caused by even more terribly
> embarrassing ignorance.

To avoid v3, do concept the code around suggested existing
I915_GEM_CONTEXT_GETPARAM and I915_GEM_CONTEXT_SETPARAM ioctls. Just
add a new parameter I915_CONTEXT_PARAM_SCRATCH_PAGE. The interface
should become pretty bullet-proof that way.

Regards, Joonas

> 
> -Kevin
> 
> -----Original Message-----
> From: Chris Wilson [mailto:chris@chris-wilson.co.uk] 
> Sent: Tuesday, December 5, 2017 12:39 PM
> To: Rogovin, Kevin <kevin.rogovin@intel.com>; intel-gfx@lists.freedes
> ktop.org
> Subject: RE: [Intel-gfx] [PATCH 3/3] i965: check scratch page in a
> locked fashion on each ioctl
> 
> Quoting Rogovin, Kevin (2017-12-05 10:30:04)
> > Hi,
> > 
> > > Per context, then you can remove the locking. It's fitting since
> > > the scratch page is per-context anyway.
> > 
> >  The scratch page is per context? This I did not know, I thought it
> > was per PPGTT. If that is the case, then my proposed interface to
> > get/set the scratch page contents is wrong because it does not pass
> > the HW context id.
> 
> Yes, it per-vm, which is per-ctx on everything you want to
> investigate on. gen4-7 it is a global GTT with a global scratch, and
> just a mutex inside one process is not going to give you atomicity.
> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2017-12-05 13:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05  7:48 [PATCH 0/3] RFC: Scratch page checking kevin.rogovin
2017-12-05  7:48 ` [PATCH 1/3] drm-uapi: define interface to kernel for scratch page read kevin.rogovin
2017-12-05  7:57   ` Rogovin, Kevin
2017-12-05  7:48 ` [PATCH 2/3] i965: define stuff for scratch page checking in intel_screen kevin.rogovin
2017-12-05  7:58   ` Rogovin, Kevin
2017-12-05  7:48 ` [PATCH 3/3] i965: check scratch page in a locked fashion on each ioctl kevin.rogovin
2017-12-05 10:07   ` Chris Wilson
2017-12-05 10:30     ` Rogovin, Kevin
2017-12-05 10:39       ` Chris Wilson
2017-12-05 10:41         ` Rogovin, Kevin
2017-12-05 13:59           ` Joonas Lahtinen [this message]

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=1512482358.12422.10.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kevin.rogovin@intel.com \
    /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.