[PATCH 03/11] drm/i915: initialization/teardown for the aliasing ppgtt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 29, 2011 at 10:50:56AM -0800, Ben Widawsky wrote:
> On Mon, 28 Nov 2011 21:35:30 +0100
> Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> 
> > This just adds the setup and teardown code for the ppgtt PDE and the
> > last-level pagetables, which are fixed for the entire lifetime, at
> > least for the moment.
> > 
> > v2: Kill the stray debug printk noted by and improve the pte
> > definitions as suggested by Chris Wilson.
> > 
> > Signed-Off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> > ---
> >  drivers/gpu/drm/i915/i915_dma.c     |   14 +++-
> >  drivers/gpu/drm/i915/i915_drv.h     |   18 +++++
> >  drivers/gpu/drm/i915/i915_gem_gtt.c |  133 +++++++++++++++++++++++++++++++++++
> >  drivers/gpu/drm/i915/i915_reg.h     |   18 +++++
> >  4 files changed, 181 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> > index fd617fb..9d9a92c 100644
> > --- a/drivers/gpu/drm/i915/i915_dma.c
> > +++ b/drivers/gpu/drm/i915/i915_dma.c
> > @@ -1199,13 +1199,21 @@ static int i915_load_gem_init(struct drm_device *dev)
> >  	 * at the last page of the aperture.  One page should be enough to
> >  	 * keep any prefetching inside of the aperture.
> >  	 */
> > -	i915_gem_do_init(dev, 0, mappable_size, gtt_size - PAGE_SIZE);
> > +	i915_gem_do_init(dev, 0, mappable_size, gtt_size - PAGE_SIZE - 512*PAGE_SIZE);
> > +
> > +	if (HAS_ALIASING_PPGTT(dev)) {
> > +		ret = i915_gem_init_aliasing_ppgtt(dev);
> > +		if (ret)
> > +			return ret;
> > +	}
> 
> Not sure if you fixed this based on our IRC conversation. The size
> belongs in the HAS_ALIASING block. Also, I'd prefer NUM_PDEs or
> something similar. Finally, if you put the PDEs at the top, couldn't we
> get rid of the scratch page?

Well, yet another reason this is about the wost patch series I've
submitted in the last few months. You're totally right, I'll move this in.
I'll keep the guard page though even for the ppgtt case, I feel safer with
the more paranoid choice and it's just 4kb of almost 2GB of gtt.
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux