* [PATCH] drm/i915: Replace open-coded memset_p()
@ 2018-02-12 13:31 Chris Wilson
2018-02-12 13:47 ` Matthew Auld
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Chris Wilson @ 2018-02-12 13:31 UTC (permalink / raw)
To: intel-gfx; +Cc: Mika Kuoppala, Matthew Auld
When initialising the page directories, we set the GTT entries and the
tree to the scratch page. We have already replaced the DMA fill with
memset64(), but we can similarly use memset_p() to set the pointer array.
References: 4dd504f7d98a ("drm/i915: Use memset64() to prefill the GTT page")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 0c0f1affddad..a44eccda7d48 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -673,27 +673,22 @@ static void free_pd(struct i915_address_space *vm,
static void gen8_initialize_pd(struct i915_address_space *vm,
struct i915_page_directory *pd)
{
- unsigned int i;
-
fill_px(vm, pd,
gen8_pde_encode(px_dma(vm->scratch_pt), I915_CACHE_LLC));
- for (i = 0; i < I915_PDES; i++)
- pd->page_table[i] = vm->scratch_pt;
+ memset_p((void **)pd->page_table, vm->scratch_pt, I915_PDES);
}
static int __pdp_init(struct i915_address_space *vm,
struct i915_page_directory_pointer *pdp)
{
const unsigned int pdpes = i915_pdpes_per_pdp(vm);
- unsigned int i;
pdp->page_directory = kmalloc_array(pdpes, sizeof(*pdp->page_directory),
GFP_KERNEL | __GFP_NOWARN);
if (unlikely(!pdp->page_directory))
return -ENOMEM;
- for (i = 0; i < pdpes; i++)
- pdp->page_directory[i] = vm->scratch_pd;
+ memset_p((void **)pdp->page_directory, vm->scratch_pd, pdpes);
return 0;
}
@@ -764,12 +759,9 @@ static void gen8_initialize_pdp(struct i915_address_space *vm,
static void gen8_initialize_pml4(struct i915_address_space *vm,
struct i915_pml4 *pml4)
{
- unsigned int i;
-
fill_px(vm, pml4,
gen8_pml4e_encode(px_dma(vm->scratch_pdp), I915_CACHE_LLC));
- for (i = 0; i < GEN8_PML4ES_PER_PML4; i++)
- pml4->pdps[i] = vm->scratch_pdp;
+ memset_p((void **)pml4->pdps, vm->scratch_pdp, GEN8_PML4ES_PER_PML4);
}
/* Broadwell Page Directory Pointer Descriptors */
--
2.16.1
_______________________________________________
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] drm/i915: Replace open-coded memset_p()
2018-02-12 13:31 [PATCH] drm/i915: Replace open-coded memset_p() Chris Wilson
@ 2018-02-12 13:47 ` Matthew Auld
2018-02-12 13:54 ` Mika Kuoppala
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Matthew Auld @ 2018-02-12 13:47 UTC (permalink / raw)
To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld, Mika Kuoppala
On 12 February 2018 at 13:31, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> When initialising the page directories, we set the GTT entries and the
> tree to the scratch page. We have already replaced the DMA fill with
> memset64(), but we can similarly use memset_p() to set the pointer array.
>
> References: 4dd504f7d98a ("drm/i915: Use memset64() to prefill the GTT page")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
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: [PATCH] drm/i915: Replace open-coded memset_p()
2018-02-12 13:31 [PATCH] drm/i915: Replace open-coded memset_p() Chris Wilson
2018-02-12 13:47 ` Matthew Auld
@ 2018-02-12 13:54 ` Mika Kuoppala
2018-02-12 15:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-12 17:19 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Mika Kuoppala @ 2018-02-12 13:54 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Matthew Auld
Chris Wilson <chris@chris-wilson.co.uk> writes:
> When initialising the page directories, we set the GTT entries and the
> tree to the scratch page. We have already replaced the DMA fill with
> memset64(), but we can similarly use memset_p() to set the pointer array.
>
> References: 4dd504f7d98a ("drm/i915: Use memset64() to prefill the GTT page")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 0c0f1affddad..a44eccda7d48 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -673,27 +673,22 @@ static void free_pd(struct i915_address_space *vm,
> static void gen8_initialize_pd(struct i915_address_space *vm,
> struct i915_page_directory *pd)
> {
> - unsigned int i;
> -
> fill_px(vm, pd,
> gen8_pde_encode(px_dma(vm->scratch_pt), I915_CACHE_LLC));
> - for (i = 0; i < I915_PDES; i++)
> - pd->page_table[i] = vm->scratch_pt;
> + memset_p((void **)pd->page_table, vm->scratch_pt, I915_PDES);
> }
>
> static int __pdp_init(struct i915_address_space *vm,
> struct i915_page_directory_pointer *pdp)
> {
> const unsigned int pdpes = i915_pdpes_per_pdp(vm);
> - unsigned int i;
>
> pdp->page_directory = kmalloc_array(pdpes, sizeof(*pdp->page_directory),
> GFP_KERNEL | __GFP_NOWARN);
> if (unlikely(!pdp->page_directory))
> return -ENOMEM;
>
> - for (i = 0; i < pdpes; i++)
> - pdp->page_directory[i] = vm->scratch_pd;
> + memset_p((void **)pdp->page_directory, vm->scratch_pd, pdpes);
>
> return 0;
> }
> @@ -764,12 +759,9 @@ static void gen8_initialize_pdp(struct i915_address_space *vm,
> static void gen8_initialize_pml4(struct i915_address_space *vm,
> struct i915_pml4 *pml4)
> {
> - unsigned int i;
> -
> fill_px(vm, pml4,
> gen8_pml4e_encode(px_dma(vm->scratch_pdp), I915_CACHE_LLC));
> - for (i = 0; i < GEN8_PML4ES_PER_PML4; i++)
> - pml4->pdps[i] = vm->scratch_pdp;
> + memset_p((void **)pml4->pdps, vm->scratch_pdp, GEN8_PML4ES_PER_PML4);
> }
>
> /* Broadwell Page Directory Pointer Descriptors */
> --
> 2.16.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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 drm/i915: Replace open-coded memset_p()
2018-02-12 13:31 [PATCH] drm/i915: Replace open-coded memset_p() Chris Wilson
2018-02-12 13:47 ` Matthew Auld
2018-02-12 13:54 ` Mika Kuoppala
@ 2018-02-12 15:19 ` Patchwork
2018-02-12 17:19 ` ✓ Fi.CI.IGT: " Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-02-12 15:19 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Replace open-coded memset_p()
URL : https://patchwork.freedesktop.org/series/38082/
State : success
== Summary ==
Series 38082v1 drm/i915: Replace open-coded memset_p()
https://patchwork.freedesktop.org/api/1.0/series/38082/revisions/1/mbox/
Test kms_chamelium:
Subgroup dp-edid-read:
pass -> FAIL (fi-kbl-7500u) fdo#102505
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-skl-6260u)
Test prime_vgem:
Subgroup basic-fence-flip:
fail -> PASS (fi-ilk-650)
fdo#102505 https://bugs.freedesktop.org/show_bug.cgi?id=102505
fi-bdw-5557u total:288 pass:265 dwarn:0 dfail:0 fail:2 skip:21 time:444s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:423s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:381s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:487s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:290s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:480s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:480s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:469s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:457s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:572s
fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:573s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:417s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:284s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:510s
fi-hsw-4770 total:288 pass:259 dwarn:0 dfail:0 fail:2 skip:27 time:417s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:411s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:456s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:414s
fi-kbl-7500u total:288 pass:262 dwarn:1 dfail:0 fail:1 skip:24 time:454s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:501s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:590s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:425s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:511s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:528s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:484s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:485s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:415s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:429s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:515s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:396s
Blacklisted hosts:
fi-glk-dsi total:117 pass:104 dwarn:0 dfail:0 fail:0 skip:12
817d13e99013266e1dc5e7fc056faa960e9a53dc drm-tip: 2018y-02m-12d-13h-34m-48s UTC integration manifest
69cf51ac5a10 drm/i915: Replace open-coded memset_p()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7980/issues.html
_______________________________________________
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.IGT: success for drm/i915: Replace open-coded memset_p()
2018-02-12 13:31 [PATCH] drm/i915: Replace open-coded memset_p() Chris Wilson
` (2 preceding siblings ...)
2018-02-12 15:19 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-02-12 17:19 ` Patchwork
2018-02-12 17:32 ` Chris Wilson
3 siblings, 1 reply; 6+ messages in thread
From: Patchwork @ 2018-02-12 17:19 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Replace open-coded memset_p()
URL : https://patchwork.freedesktop.org/series/38082/
State : success
== Summary ==
Test pm_rpm:
Subgroup gem-idle:
fail -> PASS (shard-hsw)
shard-apl total:3391 pass:1763 dwarn:1 dfail:0 fail:20 skip:1606 time:12502s
shard-hsw total:3444 pass:1718 dwarn:1 dfail:0 fail:54 skip:1670 time:11997s
shard-snb total:3444 pass:1351 dwarn:1 dfail:0 fail:10 skip:2082 time:6713s
Blacklisted hosts:
shard-kbl total:3444 pass:1913 dwarn:1 dfail:0 fail:22 skip:1508 time:9748s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7980/shards.html
_______________________________________________
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:[~2018-02-12 17:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 13:31 [PATCH] drm/i915: Replace open-coded memset_p() Chris Wilson
2018-02-12 13:47 ` Matthew Auld
2018-02-12 13:54 ` Mika Kuoppala
2018-02-12 15:19 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-12 17:19 ` ✓ Fi.CI.IGT: " Patchwork
2018-02-12 17:32 ` Chris Wilson
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.