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: [PATCH 1/9] drm/i915/gtt: No need to zero the table for page dirs
Date: Tue, 11 Jun 2019 20:37:22 +0100	[thread overview]
Message-ID: <156028184240.2193.2874395865745040687@skylake-alporthouse-com> (raw)
In-Reply-To: <20190611172731.19174-1-mika.kuoppala@linux.intel.com>

Quoting Mika Kuoppala (2019-06-11 18:27:23)
> We set them to scratch right after allocation so prevent
> useless zeroing before.
> 
> v2: atomic_t
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index e70675bfb51d..07f86d474fa2 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -687,7 +687,7 @@ static struct i915_page_directory *alloc_pd(struct i915_address_space *vm)
>  {
>         struct i915_page_directory *pd;
>  
> -       pd = kzalloc(sizeof(*pd), I915_GFP_ALLOW_FAIL);
> +       pd = kmalloc(sizeof(*pd), I915_GFP_ALLOW_FAIL);
>         if (unlikely(!pd))
>                 return ERR_PTR(-ENOMEM);
>  
> @@ -747,7 +747,7 @@ alloc_pdp(struct i915_address_space *vm)
>  
>         GEM_BUG_ON(!i915_vm_is_4lvl(vm));
>  
> -       pdp = kzalloc(sizeof(*pdp), GFP_KERNEL);
> +       pdp = kmalloc(sizeof(*pdp), GFP_KERNEL);

While you are here, this too can be I915_GFP_ALLOW_FAIL

>         if (!pdp)
>                 return ERR_PTR(-ENOMEM);

Because we immediately propagate the error and can gracefully handle
failures.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-06-11 19:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 17:27 [PATCH 1/9] drm/i915/gtt: No need to zero the table for page dirs Mika Kuoppala
2019-06-11 17:27 ` [PATCH 2/9] drm/i915/gtt: Use a common type for page directories Mika Kuoppala
2019-06-11 19:41   ` Chris Wilson
2019-06-11 19:52     ` Chris Wilson
2019-06-11 19:43   ` Chris Wilson
2019-06-11 17:27 ` [PATCH 3/9] drm/i915/gtt: Introduce init_pd_with_page Mika Kuoppala
2019-06-11 19:45   ` Chris Wilson
2019-06-11 17:27 ` [PATCH 4/9] drm/i915/gtt: Introduce init_pd Mika Kuoppala
2019-06-11 17:27 ` [PATCH 5/9] drm/i915/gtt: Generalize alloc_pd Mika Kuoppala
2019-06-11 17:27 ` [PATCH 6/9] drm/i915/gtt: pde entry encoding is identical Mika Kuoppala
2019-06-11 17:27 ` [PATCH 7/9] drm/i915/gtt: Check for physical page for pd entry always Mika Kuoppala
2019-06-11 17:27 ` [PATCH 8/9] drm/i915/gtt: Make swapping the pd entry generic Mika Kuoppala
2019-06-11 19:50   ` Chris Wilson
2019-06-11 21:46     ` Chris Wilson
2019-06-11 17:27 ` [PATCH 9/9] drm/i915/gtt: Tear down setup and cleanup macros for page dma Mika Kuoppala
2019-06-11 17:53 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915/gtt: No need to zero the table for page dirs Patchwork
2019-06-11 17:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-11 18:18 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-11 19:37 ` Chris Wilson [this message]
2019-06-12 21:32 ` ✗ Fi.CI.IGT: 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=156028184240.2193.2874395865745040687@skylake-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.