All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/7] drm/i915/gt: Allocate i915_fence_reg array
Date: Mon, 16 Mar 2020 10:23:39 +0000	[thread overview]
Message-ID: <158435421969.18059.12014303062772100478@build.alporthouse.com> (raw)
In-Reply-To: <87pndczrj3.fsf@gaia.fi.intel.com>

Quoting Mika Kuoppala (2020-03-16 07:29:36)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Since the number of fence regs can vary dramactically between platforms,
> > allocate the array on demand so we don't waste as much space.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/gt/intel_ggtt.c         |  6 ++++--
> >  drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 10 ++++++++++
> >  drivers/gpu/drm/i915/gt/intel_ggtt_fencing.h |  1 +
> >  drivers/gpu/drm/i915/gt/intel_gtt.h          |  5 +++--
> >  drivers/gpu/drm/i915/i915_vma.h              |  1 +
> >  5 files changed, 19 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
> > index bde4f64a41f7..8fcf14372d7a 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
> > @@ -698,11 +698,13 @@ static void ggtt_cleanup_hw(struct i915_ggtt *ggtt)
> >   */
> >  void i915_ggtt_driver_release(struct drm_i915_private *i915)
> >  {
> > +     struct i915_ggtt *ggtt = &i915->ggtt;
> >       struct pagevec *pvec;
> >  
> > -     fini_aliasing_ppgtt(&i915->ggtt);
> > +     fini_aliasing_ppgtt(ggtt);
> >  
> > -     ggtt_cleanup_hw(&i915->ggtt);
> > +     intel_ggtt_fini_fences(ggtt);
> > +     ggtt_cleanup_hw(ggtt);
> >  
> >       pvec = &i915->mm.wc_stash.pvec;
> >       if (pvec->nr) {
> > diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c b/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
> > index 94af75673a58..b6ba68c42546 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
> > @@ -857,6 +857,11 @@ void intel_ggtt_init_fences(struct i915_ggtt *ggtt)
> >       if (intel_vgpu_active(i915))
> >               num_fences = intel_uncore_read(uncore,
> >                                              vgtif_reg(avail_rs.fence_num));
> > +     ggtt->fence_regs = kcalloc(num_fences,
> > +                                sizeof(*ggtt->fence_regs),
> > +                                GFP_KERNEL);
> > +     if (!ggtt->fence_regs)
> > +             num_fences = 0;
> 
> So unlikely and easily shown in other debug flow that does
> not warrant an err?

Yeah, we get a warn already and it /should/ not be fatal. We should be
able to bring the display up.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-16 10:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-14 12:20 [Intel-gfx] [PATCH 1/7] drm/i915: Move GGTT fence registers under gt/ Chris Wilson
2020-03-14 12:20 ` [Intel-gfx] [PATCH 2/7] drm/i915/gt: Pull restoration of GGTT fences underneath the GT Chris Wilson
2020-03-14 12:20 ` [Intel-gfx] [PATCH 3/7] drm/i915: Remove manual save/resume of fence register state Chris Wilson
2020-03-16  7:14   ` Mika Kuoppala
2020-03-14 12:20 ` [Intel-gfx] [PATCH 4/7] drm/i915/gt: Allocate i915_fence_reg array Chris Wilson
2020-03-16  7:29   ` Mika Kuoppala
2020-03-16 10:23     ` Chris Wilson [this message]
2020-03-16 11:20   ` Mika Kuoppala
2020-03-14 12:20 ` [Intel-gfx] [PATCH 5/7] drm/i915/gt: Store the fence details on the fence Chris Wilson
2020-03-14 12:20 ` [Intel-gfx] [PATCH 6/7] drm/i915/gt: Only wait for GPU activity before unbinding a GGTT fence Chris Wilson
2020-03-14 12:20 ` [Intel-gfx] [PATCH 7/7] drm/i915/gt: Make fence revocation unequivocal Chris Wilson
2020-03-16  7:02 ` [Intel-gfx] [PATCH 1/7] drm/i915: Move GGTT fence registers under gt/ Mika Kuoppala
2020-03-16 15:47 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] " Patchwork
2020-03-16 16:06 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2020-03-16 16:17 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

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=158435421969.18059.12014303062772100478@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.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.