From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v6
Date: Tue, 7 May 2013 16:23:06 -0700 [thread overview]
Message-ID: <20130507162306.284a9a91@jbarnes-desktop> (raw)
In-Reply-To: <20130507221440.GB22739@cantiga.alporthouse.com>
On Tue, 7 May 2013 23:14:40 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Tue, May 07, 2013 at 03:08:42PM -0700, Jesse Barnes wrote:
> > On Tue, 7 May 2013 22:57:37 +0100
> > Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >
> > > On Tue, May 07, 2013 at 02:34:31PM -0700, Jesse Barnes wrote:
> > > > +static void valleyview_setup_pctx(struct drm_device *dev)
> > > > +{
> > > > + struct drm_i915_private *dev_priv = dev->dev_private;
> > > > + struct drm_i915_gem_object *pctx;
> > > > + unsigned long pctx_paddr;
> > > > + u32 pcbr;
> > > > + int pctx_size = 24*1024;
> > > > +
> > > > + pcbr = I915_READ(VLV_PCBR);
> > > > + if (pcbr) {
> > > > + /* BIOS set it up already, grab the pre-alloc'd space */
> > > > + int pcbr_offset;
> > > > +
> > > > + pcbr_offset = (pcbr & (~4095)) - dev_priv->mm.stolen_base;
> > > > + pctx = i915_gem_object_create_stolen_for_preallocated(dev_priv->dev,
> > > > + pcbr_offset,
> > > > + pcbr_offset,
> > > > + pctx_size);
> > >
> > > We're reserving global GTT space here for someting that just looks like
> > > it requires contiguous physical memory. This may cause issues if
> > > something else is already bound to that GTT range. I think we want to
> > > extend the interface to not reserve GTT space if gtt_offset == -1.
> >
> > I should have added a comment for this too. The physical range for the
> > power context must reside in stolen space. So while it needs
> > contiguous physical memory, it also has a relationship to the stolen
> > handling. I'd prefer to see a failure here than to try to do something
> > fancy with funky GTT vs stolen setups... (Still waiting on the BIOS
> > guys to promise the identity map going forward.)
>
> Hmm, I am not understanding exactly what you need here. The register you
> are reading looks to be a physical address - so why do we need to also
> reserve a virtual address with the same offset? And if that is required,
> shouldn't the else branch also reserve the corresponding virtual
> address for its stolen allocation?
Ok ok I'm sold, at least until we find otherwise or Alan's team reports
back that the GTT space is needed.
Extending the interface to not reserve GTT space makes sense; I can do
that as a follow up, if you're ok with the existing code.
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-05-07 23:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 18:50 [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v3 Jesse Barnes
2013-05-07 19:34 ` [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v4 Jesse Barnes
2013-05-07 19:50 ` Chris Wilson
2013-05-07 20:37 ` [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v5 Jesse Barnes
2013-05-07 21:34 ` [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v6 Jesse Barnes
2013-05-07 21:57 ` Chris Wilson
2013-05-07 22:08 ` Jesse Barnes
2013-05-07 22:14 ` Chris Wilson
2013-05-07 22:32 ` Jesse Barnes
2013-05-07 23:23 ` Jesse Barnes [this message]
2013-05-08 13:28 ` Chris Wilson
2013-05-07 23:18 ` Jesse Barnes
2013-05-08 2:56 ` Teres Alexis, Alan Previn
2013-05-07 19:45 ` [PATCH] drm/i915: BIOS and power context stolen mem handling for VLV v3 Chris Wilson
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=20130507162306.284a9a91@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=chris@chris-wilson.co.uk \
--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