* [PATCH 1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/
@ 2016-12-13 16:05 Matthew Auld
2016-12-13 16:05 ` [PATCH 2/3] drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ Matthew Auld
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Matthew Auld @ 2016-12-13 16:05 UTC (permalink / raw)
To: intel-gfx
The function name gen8_setup_page_directory is misleading, and only
serves to confuse the reader, it's not setting up a pd, but rather
encoding a specific pdpe with a given pd.
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index ef00d36680c9..62b6a6b69efe 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -626,10 +626,10 @@ static void gen8_initialize_pml4(struct i915_address_space *vm,
}
static void
-gen8_setup_page_directory(struct i915_hw_ppgtt *ppgtt,
- struct i915_page_directory_pointer *pdp,
- struct i915_page_directory *pd,
- int index)
+gen8_setup_pdpe(struct i915_hw_ppgtt *ppgtt,
+ struct i915_page_directory_pointer *pdp,
+ struct i915_page_directory *pd,
+ int index)
{
gen8_ppgtt_pdpe_t *page_directorypo;
@@ -1375,7 +1375,7 @@ static int gen8_alloc_va_range_3lvl(struct i915_address_space *vm,
kunmap_px(ppgtt, page_directory);
__set_bit(pdpe, pdp->used_pdpes);
- gen8_setup_page_directory(ppgtt, pdp, pd, pdpe);
+ gen8_setup_pdpe(ppgtt, pdp, pd, pdpe);
}
free_gen8_temp_bitmaps(new_page_dirs, new_page_tables);
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ 2016-12-13 16:05 [PATCH 1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Matthew Auld @ 2016-12-13 16:05 ` Matthew Auld 2016-12-13 16:05 ` [PATCH 3/3] drm/i915: don't open code the pdpe/pml4e clearing Matthew Auld 2016-12-13 19:15 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Patchwork 2 siblings, 0 replies; 6+ messages in thread From: Matthew Auld @ 2016-12-13 16:05 UTC (permalink / raw) To: intel-gfx The function name gen8_setup_page_directory_pointer is misleading, and only serves to confuse the reader, it's not setting up a pdp, but rather encoding a specific pml4e with a given pdp. Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 62b6a6b69efe..e7931ab03dec 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -642,10 +642,10 @@ gen8_setup_pdpe(struct i915_hw_ppgtt *ppgtt, } static void -gen8_setup_page_directory_pointer(struct i915_hw_ppgtt *ppgtt, - struct i915_pml4 *pml4, - struct i915_page_directory_pointer *pdp, - int index) +gen8_setup_pml4e(struct i915_hw_ppgtt *ppgtt, + struct i915_pml4 *pml4, + struct i915_page_directory_pointer *pdp, + int index) { gen8_ppgtt_pml4e_t *pagemap = kmap_px(pml4); @@ -1434,7 +1434,7 @@ static int gen8_alloc_va_range_4lvl(struct i915_address_space *vm, if (ret) goto err_out; - gen8_setup_page_directory_pointer(ppgtt, pml4, pdp, pml4e); + gen8_setup_pml4e(ppgtt, pml4, pdp, pml4e); } bitmap_or(pml4->used_pml4es, new_pdps, pml4->used_pml4es, -- 2.9.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/i915: don't open code the pdpe/pml4e clearing 2016-12-13 16:05 [PATCH 1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Matthew Auld 2016-12-13 16:05 ` [PATCH 2/3] drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ Matthew Auld @ 2016-12-13 16:05 ` Matthew Auld 2016-12-13 18:14 ` Michał Winiarski 2016-12-13 19:15 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Patchwork 2 siblings, 1 reply; 6+ messages in thread From: Matthew Auld @ 2016-12-13 16:05 UTC (permalink / raw) To: intel-gfx Now that it's obvious what the helpers do, we can simplify the code somewhat by using them when clearing the pdpe/pml4e with the relevant scratch entry. Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Matthew Auld <matthew.auld@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index e7931ab03dec..f7ab3c4f64b2 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -793,9 +793,6 @@ static bool gen8_ppgtt_clear_pdp(struct i915_address_space *vm, struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); struct i915_page_directory *pd; uint64_t pdpe; - gen8_ppgtt_pdpe_t *pdpe_vaddr; - gen8_ppgtt_pdpe_t scratch_pdpe = - gen8_pdpe_encode(px_dma(vm->scratch_pd), I915_CACHE_LLC); gen8_for_each_pdpe(pd, pdp, start, length, pdpe) { if (WARN_ON(!pdp->page_directory[pdpe])) @@ -803,11 +800,7 @@ static bool gen8_ppgtt_clear_pdp(struct i915_address_space *vm, if (gen8_ppgtt_clear_pd(vm, pd, start, length)) { __clear_bit(pdpe, pdp->used_pdpes); - if (USES_FULL_48BIT_PPGTT(dev_priv)) { - pdpe_vaddr = kmap_px(pdp); - pdpe_vaddr[pdpe] = scratch_pdpe; - kunmap_px(ppgtt, pdpe_vaddr); - } + gen8_setup_pdpe(ppgtt, pdp, vm->scratch_pd, pdpe); free_pd(vm->i915, pd); } } @@ -832,9 +825,6 @@ static void gen8_ppgtt_clear_pml4(struct i915_address_space *vm, struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); struct i915_page_directory_pointer *pdp; uint64_t pml4e; - gen8_ppgtt_pml4e_t *pml4e_vaddr; - gen8_ppgtt_pml4e_t scratch_pml4e = - gen8_pml4e_encode(px_dma(vm->scratch_pdp), I915_CACHE_LLC); GEM_BUG_ON(!USES_FULL_48BIT_PPGTT(vm->i915)); @@ -844,9 +834,7 @@ static void gen8_ppgtt_clear_pml4(struct i915_address_space *vm, if (gen8_ppgtt_clear_pdp(vm, pdp, start, length)) { __clear_bit(pml4e, pml4->used_pml4es); - pml4e_vaddr = kmap_px(pml4); - pml4e_vaddr[pml4e] = scratch_pml4e; - kunmap_px(ppgtt, pml4e_vaddr); + gen8_setup_pml4e(ppgtt, pml4, vm->scratch_pdp, pml4e); free_pdp(vm->i915, pdp); } } -- 2.9.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3] drm/i915: don't open code the pdpe/pml4e clearing 2016-12-13 16:05 ` [PATCH 3/3] drm/i915: don't open code the pdpe/pml4e clearing Matthew Auld @ 2016-12-13 18:14 ` Michał Winiarski 0 siblings, 0 replies; 6+ messages in thread From: Michał Winiarski @ 2016-12-13 18:14 UTC (permalink / raw) To: Matthew Auld; +Cc: intel-gfx On Tue, Dec 13, 2016 at 04:05:12PM +0000, Matthew Auld wrote: > Now that it's obvious what the helpers do, we can simplify the code > somewhat by using them when clearing the pdpe/pml4e with the relevant > scratch entry. > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> -Michał > Signed-off-by: Matthew Auld <matthew.auld@intel.com> > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ 2016-12-13 16:05 [PATCH 1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Matthew Auld 2016-12-13 16:05 ` [PATCH 2/3] drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ Matthew Auld 2016-12-13 16:05 ` [PATCH 3/3] drm/i915: don't open code the pdpe/pml4e clearing Matthew Auld @ 2016-12-13 19:15 ` Patchwork 2017-01-09 14:50 ` Joonas Lahtinen 2 siblings, 1 reply; 6+ messages in thread From: Patchwork @ 2016-12-13 19:15 UTC (permalink / raw) To: Matthew Auld; +Cc: intel-gfx == Series Details == Series: series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ URL : https://patchwork.freedesktop.org/series/16751/ State : success == Summary == Series 16751v1 Series without cover letter https://patchwork.freedesktop.org/api/1.0/series/16751/revisions/1/mbox/ fi-bdw-5557u total:247 pass:233 dwarn:0 dfail:0 fail:0 skip:14 fi-bsw-n3050 total:247 pass:208 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-t5700 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-j1900 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-hsw-4770r total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-ilk-650 total:247 pass:195 dwarn:0 dfail:0 fail:0 skip:52 fi-ivb-3520m total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-ivb-3770 total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6260u total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-skl-6700hq total:247 pass:227 dwarn:0 dfail:0 fail:0 skip:20 fi-skl-6700k total:247 pass:224 dwarn:3 dfail:0 fail:0 skip:20 fi-skl-6770hq total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-snb-2520m total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-snb-2600 total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32 57b72b4a6d7b787aedeb7b776ab35c3b2d7f58e9 drm-tip: 2016y-12m-13d-17h-59m-26s UTC integration manifest 20b99c9 drm/i915: don't open code the pdpe/pml4e clearing 3e31f0b drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ c6c77b9 drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ == Logs == For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3279/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ 2016-12-13 19:15 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Patchwork @ 2017-01-09 14:50 ` Joonas Lahtinen 0 siblings, 0 replies; 6+ messages in thread From: Joonas Lahtinen @ 2017-01-09 14:50 UTC (permalink / raw) To: intel-gfx, Matthew Auld On ti, 2016-12-13 at 19:15 +0000, Patchwork wrote: > == Series Details == > > Series: series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ > URL : https://patchwork.freedesktop.org/series/16751/ > State : success > Merged the series. Thanks for the patches and review. Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-09 14:50 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-13 16:05 [PATCH 1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Matthew Auld 2016-12-13 16:05 ` [PATCH 2/3] drm/i915: s/gen8_setup_page_directory_pointer/gen8_setup_pml4e/ Matthew Auld 2016-12-13 16:05 ` [PATCH 3/3] drm/i915: don't open code the pdpe/pml4e clearing Matthew Auld 2016-12-13 18:14 ` Michał Winiarski 2016-12-13 19:15 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: s/gen8_setup_page_directory/gen8_setup_pdpe/ Patchwork 2017-01-09 14:50 ` Joonas Lahtinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).