From: Daniel Vetter <daniel@ffwll.ch>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, miku@iki.fi
Subject: Re: [PATCH 18/18] drm/i915/gtt: Reorder page alloc/free/init functions
Date: Fri, 26 Jun 2015 11:11:41 +0200 [thread overview]
Message-ID: <20150626091141.GA25769@phenom.ffwll.local> (raw)
In-Reply-To: <1435246520-14745-19-git-send-email-mika.kuoppala@intel.com>
On Thu, Jun 25, 2015 at 06:35:20PM +0300, Mika Kuoppala wrote:
> Maintain base page handling functions in order of
> alloc, free, init. No functional changes.
>
> v2: s/Introduce/Maintain (Michel)
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Conflicts since I didn't apply the scratch merging. Same comment about
adding _scratch to these functions (where it makes sense ofc). I merged
all the other reviewed patches to dinq.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 54 ++++++++++++++++++-------------------
> 1 file changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index dee25ad..b08f623 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -384,24 +384,6 @@ static void fill_page_dma_32(struct drm_device *dev, struct i915_page_dma *p,
> fill_page_dma(dev, p, v);
> }
>
> -static void free_pt(struct drm_device *dev, struct i915_page_table *pt)
> -{
> - cleanup_px(dev, pt);
> - kfree(pt->used_ptes);
> - kfree(pt);
> -}
> -
> -static void gen8_initialize_pt(struct i915_address_space *vm,
> - struct i915_page_table *pt)
> -{
> - gen8_pte_t scratch_pte;
> -
> - scratch_pte = gen8_pte_encode(px_dma(vm->scratch_page),
> - I915_CACHE_LLC, true);
> -
> - fill_px(vm->dev, pt, scratch_pte);
> -}
> -
> static struct i915_page_table *alloc_pt(struct drm_device *dev)
> {
> struct i915_page_table *pt;
> @@ -433,6 +415,24 @@ fail_bitmap:
> return ERR_PTR(ret);
> }
>
> +static void free_pt(struct drm_device *dev, struct i915_page_table *pt)
> +{
> + cleanup_px(dev, pt);
> + kfree(pt->used_ptes);
> + kfree(pt);
> +}
> +
> +static void gen8_initialize_pt(struct i915_address_space *vm,
> + struct i915_page_table *pt)
> +{
> + gen8_pte_t scratch_pte;
> +
> + scratch_pte = gen8_pte_encode(px_dma(vm->scratch_page),
> + I915_CACHE_LLC, true);
> +
> + fill_px(vm->dev, pt, scratch_pte);
> +}
> +
> static void gen6_initialize_pt(struct i915_address_space *vm,
> struct i915_page_table *pt)
> {
> @@ -444,15 +444,6 @@ static void gen6_initialize_pt(struct i915_address_space *vm,
> fill32_px(vm->dev, pt, scratch_pte);
> }
>
> -static void free_pd(struct drm_device *dev, struct i915_page_directory *pd)
> -{
> - if (px_page(pd)) {
> - cleanup_px(dev, pd);
> - kfree(pd->used_pdes);
> - kfree(pd);
> - }
> -}
> -
> static struct i915_page_directory *alloc_pd(struct drm_device *dev)
> {
> struct i915_page_directory *pd;
> @@ -481,6 +472,15 @@ fail_bitmap:
> return ERR_PTR(ret);
> }
>
> +static void free_pd(struct drm_device *dev, struct i915_page_directory *pd)
> +{
> + if (px_page(pd)) {
> + cleanup_px(dev, pd);
> + kfree(pd->used_pdes);
> + kfree(pd);
> + }
> +}
> +
> static void gen8_initialize_pd(struct i915_address_space *vm,
> struct i915_page_directory *pd)
> {
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-06-26 9:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 15:35 [PATCH 00/18] ppgtt cleanups / scratch merge (v3) Mika Kuoppala
2015-06-25 15:35 ` [PATCH 01/18] drm/i915/gtt: Mark TLBS dirty for gen8+ Mika Kuoppala
2015-06-25 15:35 ` [PATCH 02/18] drm/i915/gtt: Check va range against vm size Mika Kuoppala
2015-06-25 15:35 ` [PATCH 03/18] drm/i915/gtt: Allow >= 4GB sizes for vm Mika Kuoppala
2015-06-25 17:46 ` Michel Thierry
2015-06-26 8:48 ` Daniel Vetter
2015-06-25 15:35 ` [PATCH 04/18] drm/i915/gtt: Introduce i915_page_dir_dma_addr Mika Kuoppala
2015-06-25 15:35 ` [PATCH 05/18] drm/i915/gtt: Introduce struct i915_page_dma Mika Kuoppala
2015-06-25 15:35 ` [PATCH 06/18] drm/i915/gtt: Rename unmap_and_free_px to free_px Mika Kuoppala
2015-06-25 15:35 ` [PATCH 07/18] drm/i915/gtt: Remove superfluous free_pd with gen6/7 Mika Kuoppala
2015-06-25 15:35 ` [PATCH 08/18] drm/i915/gtt: Introduce fill_page_dma() Mika Kuoppala
2015-06-25 15:35 ` [PATCH 09/18] drm/i915/gtt: Introduce kmap|kunmap for dma page Mika Kuoppala
2015-06-25 15:35 ` [PATCH 10/18] drm/i915/gtt: Use macros to access dma mapped pages Mika Kuoppala
2015-06-25 15:35 ` [PATCH 11/18] drm/i915/gtt: Make scratch page i915_page_dma compatible Mika Kuoppala
2015-06-25 15:35 ` [PATCH 12/18] drm/i915/gtt: Fill scratch page Mika Kuoppala
2015-06-25 17:51 ` Chris Wilson
2015-06-26 17:31 ` Dave Gordon
2015-06-25 15:35 ` [PATCH 13/18] drm/i915/gtt: Pin vma during virtual address allocation Mika Kuoppala
2015-06-25 15:35 ` [PATCH 14/18] drm/i915/gtt: Cleanup page directory encoding Mika Kuoppala
2015-06-25 15:35 ` [PATCH 15/18] drm/i915/gtt: Move scratch_pd and scratch_pt into vm area Mika Kuoppala
2015-06-26 9:06 ` Daniel Vetter
2015-06-25 15:35 ` [PATCH 16/18] drm/i915/gtt: One instance of scratch page table/directory Mika Kuoppala
2015-06-26 9:10 ` Daniel Vetter
2015-06-26 12:05 ` Mika Kuoppala
2015-06-26 16:44 ` Daniel Vetter
2015-06-25 15:35 ` [PATCH 17/18] drm/i915/gtt: Use nonatomic bitmap ops Mika Kuoppala
2015-06-25 15:35 ` [PATCH 18/18] drm/i915/gtt: Reorder page alloc/free/init functions Mika Kuoppala
2015-06-26 9:11 ` Daniel Vetter [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=20150626091141.GA25769@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.intel.com \
--cc=miku@iki.fi \
/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