[PATCH v2 1/1] i915/gem: drop wbinvd_on_all_cpus usage

2022-04-14 Thread Michael Cheng
the pages for when the GPU wants to read from main memory. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c

[PATCH v2 0/1] Drop wbinvd_on_all_cpus usage

2022-04-14 Thread Michael Cheng
. [1]. https://lists.freedesktop.org/archives/dri-devel/2021-November/330928.html [2]. https://patchwork.freedesktop.org/patch/475752/?series=1=5 v2 (Michael Cheng) : Per feedback from Thomas and Tvrtko, this series should be split into two parts; First part

[PATCH v2 0/1]

2022-04-14 Thread Michael Cheng
. [1]. https://lists.freedesktop.org/archives/dri-devel/2021-November/330928.html [2]. https://patchwork.freedesktop.org/patch/475752/?series=1=5 v2 (Michael Cheng) : Per feedback from Thomas and Tvrtko, this series should be split into two parts; First part

[PATCH v2 1/1] i915/gem: drop wbinvd_on_all_cpus usage

2022-04-14 Thread Michael Cheng
the pages for when the GPU wants to read from main memory. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c

[PATCH v13 4/5] drm/i915/: Re-work clflush_write32

2022-03-21 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. v2(Michael Cheng): Use sizeof(*addr) instead of sizeof(addr) to get the actual size of the page. Thanks to Matt Roper for pointing

[PATCH v13 3/5] drm/i915/gt: Re-work reset_csb

2022-03-21 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. v4

[PATCH v13 5/5] drm/i915/gt: replace cache_clflush_range

2022-03-21 Thread Michael Cheng
Replace all occurrence of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt

[PATCH v13 2/5] drm/i915/gt: Drop invalidate_csb_entries

2022-03-21 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v13 1/5] drm/i915/gt: Re-work intel_write_status_page

2022-03-21 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9

[PATCH v13 0/5] Use drm_clflush* instead of clflush

2022-03-21 Thread Michael Cheng
additional clflush/clflushopt to use drm_clflush*. (Michael Cheng) v3: Drop invalidate_csb_entries and directly invoke drm_clflush_virt_ran v4: Remove extra memory barriers v5: s/cache_clflush_range/drm_clflush_virt_range v6: Fix up "Drop invalidate_csb_entries" to use correct parame

Re: [PATCH 1/4] i915/gem: drop wbinvd_on_all_cpus usage

2022-03-21 Thread Michael Cheng
On 2022-03-21 4:07 a.m., Thomas Hellström wrote: On 3/21/22 11:30, Tvrtko Ursulin wrote: On 19/03/2022 19:42, Michael Cheng wrote: Previous concern with using drm_clflush_sg was that we don't know what the sg_table is pointing to, thus the usage of wbinvd_on_all_cpus to flush everything

Re: [PATCH 1/4] i915/gem: drop wbinvd_on_all_cpus usage

2022-03-21 Thread Michael Cheng
On 2022-03-21 10:28 a.m., Tvrtko Ursulin wrote: On 21/03/2022 16:31, Michael Cheng wrote: On 2022-03-21 3:30 a.m., Tvrtko Ursulin wrote: On 19/03/2022 19:42, Michael Cheng wrote: Previous concern with using drm_clflush_sg was that we don't know what the sg_table is pointing to, thus

Re: [PATCH 1/4] i915/gem: drop wbinvd_on_all_cpus usage

2022-03-21 Thread Michael Cheng
On 2022-03-21 10:28 a.m., Tvrtko Ursulin wrote: On 21/03/2022 16:31, Michael Cheng wrote: On 2022-03-21 3:30 a.m., Tvrtko Ursulin wrote: On 19/03/2022 19:42, Michael Cheng wrote: Previous concern with using drm_clflush_sg was that we don't know what the sg_table is pointing to, thus

Re: [PATCH 1/4] i915/gem: drop wbinvd_on_all_cpus usage

2022-03-21 Thread Michael Cheng
On 2022-03-21 3:30 a.m., Tvrtko Ursulin wrote: On 19/03/2022 19:42, Michael Cheng wrote: Previous concern with using drm_clflush_sg was that we don't know what the sg_table is pointing to, thus the usage of wbinvd_on_all_cpus to flush everything at once to avoid paranoia. And now we know

[PATCH 4/4] drm/i915/gt: Revert ggtt_resume to previous logic

2022-03-19 Thread Michael Cheng
To avoid having to call wbinvd_on_all_cpus, revert i915_ggtt_resume and i915_ggtt_resume_vm to previous logic [1]. [1]. 64b95df91f44 drm/i915: Assume exclusive access to objects inside resume Suggested-by: Lucas De Marchi Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_ggtt.c

[PATCH 3/4] i915/gem: Revert i915_gem_freeze to previous logic

2022-03-19 Thread Michael Cheng
This patch reverts i915_gem_freeze to previous logic [1] to avoid using wbinvd_on_all_cpus. [1]. https://patchwork.freedesktop.org/patch/415007/?series=86058=2 Suggested-by: Lucas De Marchi Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 15 ++- 1 file

[PATCH 2/4] Revert "drm/i915/gem: Almagamate clflushes on suspend"

2022-03-19 Thread Michael Cheng
As we are making i915 more architecture-neutral, lets revert this commit to the previous logic [1] to avoid using wbinvd_on_all_cpus. [1]. ac05a22cd07a ("drm/i915/gem: Almagamate clflushes on suspend") Suggested-by: Lucas De Marchi Signed-off-by: Michael Cheng --- drivers/gpu/dr

[PATCH 1/4] i915/gem: drop wbinvd_on_all_cpus usage

2022-03-19 Thread Michael Cheng
the pages for when the GPU wants to read from main memory. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c

[PATCH 0/4] Drop wbinvd_on_all_cpus usage

2022-03-19 Thread Michael Cheng
://patchwork.freedesktop.org/patch/475752/?series=1=5 Michael Cheng (4): i915/gem: drop wbinvd_on_all_cpus usage Revert "drm/i915/gem: Almagamate clflushes on suspend" i915/gem: Revert i915_gem_freeze to previous logic drm/i915/gt: Revert ggtt_resume to previous logic drive

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus

2022-03-15 Thread Michael Cheng
+Daniel for additional feedback! On 2022-03-14 4:06 p.m., Michael Cheng wrote: On 2022-03-08 10:58 a.m., Lucas De Marchi wrote: On Tue, Feb 22, 2022 at 08:24:31PM +0100, Thomas Hellström (Intel) wrote: Hi, Michael, On 2/22/22 18:26, Michael Cheng wrote: This patch removes logic

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus

2022-03-14 Thread Michael Cheng
On 2022-03-08 10:58 a.m., Lucas De Marchi wrote: On Tue, Feb 22, 2022 at 08:24:31PM +0100, Thomas Hellström (Intel) wrote: Hi, Michael, On 2/22/22 18:26, Michael Cheng wrote: This patch removes logic for wbinvd_on_all_cpus and brings in drm_cache.h. This header has the logic that outputs

Re: [PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-03-07 Thread Michael Cheng
Ah Thanks for the great feedback! @Lucas or @Matt, could you please chime in? Michael Cheng On 2022-03-02 11:10 a.m., Robin Murphy wrote: On 2022-03-02 15:55, Michael Cheng wrote: Thanks for the feedback Robin! Sorry my choices of word weren't that great, but what I meant is to understand

Re: [PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-03-02 Thread Michael Cheng
: On 2022-02-25 19:27, Michael Cheng wrote: Hi Robin, [ +arm64 maintainers for their awareness, which would have been a good thing to do from the start ]   * Thanks for adding the arm64 maintainer and sorry I didn't rope them     in sooner. Why does i915 need to ensure the CPU's instruction cache

Re: [PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-25 Thread Michael Cheng
wrote: [ +arm64 maintainers for their awareness, which would have been a good thing to do from the start ] On 2022-02-25 03:24, Michael Cheng wrote: Add arm64 support for drm_clflush_virt_range. caches_clean_inval_pou performs a flush by first performing a clean, follow by an invalidation

Re: [PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-25 Thread Michael Cheng
/2022 17:40, Michael Cheng wrote: Ah, thanks for pointing that out, when I do include it though, it causes a few warning other systems such as h8300 and s390. Errors look like? I haven't heard that kernel code is not allowed to include something from linux/ on some arch yet. Since it is already

Re: [PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-25 Thread Michael Cheng
-25 9:33 a.m., Tvrtko Ursulin wrote: On 25/02/2022 16:52, Michael Cheng wrote: Hi Tvrtko, It seems without cacheflush.h being included, when I build for arm64 or x86, it stills pulls in cacheflush.h: ./.drm_cache.o.cmd:838: include/linux/cacheflush.h \ ./.drm_cache.o.cmd:839: arch/x86/include

Re: [PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-25 Thread Michael Cheng
to build the kernel per specific architecture, but please correct if I am wrong,as I am still trying to understand how things works! Michael Cheng On 2022-02-25 8:28 a.m., Tvrtko Ursulin wrote: On 25/02/2022 03:24, Michael Cheng wrote: Add arm64 support for drm_clflush_virt_range. caches_clean_inval_pou

[PATCH v12 6/6] drm/i915/gt: replace cache_clflush_range

2022-02-24 Thread Michael Cheng
Replace all occurrence of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt

[PATCH v12 5/6] drm/i915/: Re-work clflush_write32

2022-02-24 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. v2(Michael Cheng): Use sizeof(*addr) instead of sizeof(addr) to get the actual size of the page. Thanks to Matt Roper for pointing

[PATCH v12 4/6] drm/i915/gt: Re-work reset_csb

2022-02-24 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. v4

[PATCH v12 0/6] Use drm_clflush* instead of clflush

2022-02-24 Thread Michael Cheng
additional clflush/clflushopt to use drm_clflush*. (Michael Cheng) v3: Drop invalidate_csb_entries and directly invoke drm_clflush_virt_ran v4: Remove extra memory barriers v5: s/cache_clflush_range/drm_clflush_virt_range v6: Fix up "Drop invalidate_csb_entries" to use correct parame

[PATCH v12 3/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-24 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v12 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-24 Thread Michael Cheng
Add arm64 support for drm_clflush_virt_range. caches_clean_inval_pou performs a flush by first performing a clean, follow by an invalidation operation. v2 (Michael Cheng): Use correct macro for cleaning and invalidation the dcache. Thanks Tvrtko for the suggestion. v3

[PATCH v12 2/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-24 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9

[PATCH v11 4/6] drm/i915/gt: Re-work reset_csb

2022-02-22 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. v4

[PATCH v11 6/6] drm/i915/gt: replace cache_clflush_range

2022-02-22 Thread Michael Cheng
Replace all occurrence of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt

[PATCH v11 5/6] drm/i915/: Re-work clflush_write32

2022-02-22 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. v2(Michael Cheng): Use sizeof(*addr) instead of sizeof(addr) to get the actual size of the page. Thanks to Matt Roper for pointing

[PATCH v11 0/6] Use drm_clflush* instead of clflush

2022-02-22 Thread Michael Cheng
additional clflush/clflushopt to use drm_clflush*. (Michael Cheng) v3: Drop invalidate_csb_entries and directly invoke drm_clflush_virt_ran v4: Remove extra memory barriers v5: s/cache_clflush_range/drm_clflush_virt_range v6: Fix up "Drop invalidate_csb_entries" to use correct parame

[PATCH v11 3/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-22 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v11 2/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-22 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9

[PATCH v11 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-22 Thread Michael Cheng
Add arm64 support for drm_clflush_virt_range. dcache_clean_inval_poc performs a flush by first performing a clean, follow by an invalidation operation. v2 (Michael Cheng): Use correct macro for cleaning and invalidation the dcache. Thanks Tvrtko for the suggestion. v3

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus

2022-02-22 Thread Michael Cheng
Thanks for letting me know! I will try for a different solution. On 2022-02-22 11:24 a.m., Thomas Hellström (Intel) wrote: Hi, Michael, On 2/22/22 18:26, Michael Cheng wrote: This patch removes logic for wbinvd_on_all_cpus and brings in drm_cache.h. This header has the logic that outputs

[PATCH v3 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus

2022-02-22 Thread Michael Cheng
This patch removes logic for wbinvd_on_all_cpus and brings in drm_cache.h. This header has the logic that outputs a warning when wbinvd_on_all_cpus when its being used on a non-x86 platform. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 7 +-- 1 file changed, 1

[PATCH v3 3/3] drm/i915/: Add drm_cache.h

2022-02-22 Thread Michael Cheng
Add drm_cache.h to additionals files that calls wbinvd_on_all_cpus and remove un-needed header files. This will prevent compile errors when building for non-x86 platforms, as well as output a warning when wbinvd_on_all_cpus is being called incorrectly. Signed-off-by: Michael Cheng --- drivers

[PATCH v3 1/3] drm_cache: Add logic for wbvind_on_all_cpus

2022-02-22 Thread Michael Cheng
Add logic for wbvind_on_all_cpus for non-x86 platforms. v2(Michael Cheng): Change logic to if platform is not x86, then we add pr_warn for calling wbvind_on_all_cpus. Signed-off-by: Michael Cheng --- drivers/gpu/drm/drm_cache.c | 2 -- include/drm/drm_cache.h | 6

[PATCH v3 0/3] Move #define wbvind_on_all_cpus

2022-02-22 Thread Michael Cheng
This series moves the logic for wbvind_on_all_cpus to drm_cache. The logic changes a little here, if platform is not x86 then we throw out a warning for when wbvind_on_all_cpus is being called. v2(Michael Cheng): Move and redo logic for wbvind_on_all_cpus. Also add drm_cache.h

[PATCH v2 1/3] drm_cache: Add logic for wbvind_on_all_cpus

2022-02-17 Thread Michael Cheng
Add logic for wbvind_on_all_cpus for non-x86 platforms. v2(Michael Cheng): Change logic to if platform is not x86, then we add pr_warn for calling wbvind_on_all_cpus. Signed-off-by: Michael Cheng --- drivers/gpu/drm/drm_cache.c | 2 -- include/drm/drm_cache.h | 6

[PATCH v2 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus

2022-02-17 Thread Michael Cheng
drm_cache.h now handles calls to wbinvd_on_all_cpus. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c index

[PATCH v2 3/3] drm/i915/: Add drm_cache.h

2022-02-17 Thread Michael Cheng
Add drm_cache.h to additionals files that calls wbinvd_on_all_cpus and remove un-needed header files. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 2 +- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2 0/3] Move #define wbvind_on_all_cpus

2022-02-17 Thread Michael Cheng
This series moves the logic for wbvind_on_all_cpus to drm_cache. The logic changes a little here, if platform is not x86 then we throw out a warning for when wbvind_on_all_cpus is being called. v2(Michael Cheng): Move and redo logic for wbvind_on_all_cpus. Also add

[PATCH v1 1/1] drm/i915/gt: Move wbvind_on_all_cpus #define

2022-02-10 Thread Michael Cheng
Move wbvind_on_all_cpus to intel_gt.h. This will allow other wbind_on_all_cpus calls to benefit from the #define logic, and prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_pm.c | 7 --- drivers/gpu/drm/i915

[PATCH v1 0/1] Move #define wbvind_on_all_cpus

2022-02-10 Thread Michael Cheng
This series moves the #define wbvind_on_all_cpus logic to intel_gt.h. This way all calls to wbvind_on_all_cpus benefit from the logic, and fixes compile errors on non-x86 platforms. Michael Cheng (1): drm/i915/gt: Move wbvind_on_all_cpus #define drivers/gpu/drm/i915/gem/i915_gem_pm.c | 7

[PATCH v10 3/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-10 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v10 5/6] drm/i915/: Re-work clflush_write32

2022-02-10 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v10 0/6] Use drm_clflush* instead of clflush

2022-02-10 Thread Michael Cheng
. v2: s/PAGE_SIZE/sizeof(value) for Re-work intel_write_status_page and added more patches to convert additional clflush/clflushopt to use drm_clflush*. (Michael Cheng

[PATCH v10 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-10 Thread Michael Cheng
Add arm64 support for drm_clflush_virt_range. dcache_clean_inval_poc performs a flush by first performing a clean, follow by an invalidation operation. v2 (Michael Cheng): Use correct macro for cleaning and invalidation the dcache. v3 (Michael Cheng): Remove ifdef for asm

[PATCH v10 2/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-10 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH v10 6/6] drm/i915/gt: replace cache_clflush_range

2022-02-10 Thread Michael Cheng
Replace all occurrence of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2

[PATCH v10 4/6] drm/i915/gt: Re-work reset_csb

2022-02-10 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v9 6/6] drm/i915/gt: replace cache_clflush_range

2022-02-09 Thread Michael Cheng
Replace all occurance of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2

[PATCH v9 3/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-09 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v9 4/6] drm/i915/gt: Re-work reset_csb

2022-02-09 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v9 5/6] drm/i915/: Re-work clflush_write32

2022-02-09 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v9 0/6] Use drm_clflush* instead of clflush

2022-02-09 Thread Michael Cheng
. v2: s/PAGE_SIZE/sizeof(value) for Re-work intel_write_status_page and added more patches to convert additional clflush/clflushopt to use drm_clflush*. (Michael Cheng

[PATCH v9 2/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-09 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH v9 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-09 Thread Michael Cheng
Add arm64 support for drm_clflush_virt_range. dcache_clean_inval_poc performs a flush by first performing a clean, follow by an invalidation operation. v2 (Michael Cheng): Use correct macro for cleaning and invalidation the dcache. v3 (Michael Cheng): Remove ifdef for asm

[PATCH v8 3/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-09 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v8 5/6] drm/i915/: Re-work clflush_write32

2022-02-09 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v8 4/6] drm/i915/gt: Re-work reset_csb

2022-02-09 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v8 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-09 Thread Michael Cheng
Add arm64 support for drm_clflush_virt_range. dcache_clean_inval_poc performs a flush by first performing a clean, follow by an invalidation operation. v2 (Michael Cheng): Use correct macro for cleaning and invalidation the dcache. v3 (Michael Cheng): Remove ifdef for asm

[PATCH v8 6/6] drm/i915/gt: replace cache_clflush_range

2022-02-09 Thread Michael Cheng
Replace all occurance of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2

[PATCH v8 2/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-09 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH v8 0/6] Use drm_clflush* instead of clflush

2022-02-09 Thread Michael Cheng
. v2: s/PAGE_SIZE/sizeof(value) for Re-work intel_write_status_page and added more patches to convert additional clflush/clflushopt to use drm_clflush*. (Michael Cheng

[PATCH v7 6/6] drm/i915/gt: replace cache_clflush_range

2022-02-08 Thread Michael Cheng
Replace all occurance of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2

[PATCH v7 5/6] drm/i915/: Re-work clflush_write32

2022-02-08 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v7 0/6] Use drm_clflush* instead of clflush

2022-02-08 Thread Michael Cheng
. v2: s/PAGE_SIZE/sizeof(value) for Re-work intel_write_status_page and added more patches to convert additional clflush/clflushopt to use drm_clflush*. (Michael Cheng

[PATCH v7 3/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-08 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v7 4/6] drm/i915/gt: Re-work reset_csb

2022-02-08 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v7 2/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-08 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH v7 1/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-08 Thread Michael Cheng
Add arm64 support for drm_clflush_virt_range. dcache_clean_inval_poc performs a flush by first performing a clean, follow by an invalidation operation. v2 (Michael Cheng): Use correct macro for cleaning and invalidation the dcache. Signed-off-by: Michael Cheng --- drivers

Re: [PATCH v6 6/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-08 Thread Michael Cheng
Ah, thanks for asking this question. It seems like I was not thinking correctly. We are trying to flush dcache lines within this function and not the tlb. On 2022-02-08 2:20 a.m., Tvrtko Ursulin wrote: On 07/02/2022 20:11, Michael Cheng wrote: Use flush_tlb_kernel_range when invoking

[PATCH v6 3/6] drm/i915/gt: Re-work reset_csb

2022-02-07 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v6 4/6] drm/i915/: Re-work clflush_write32

2022-02-07 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v6 5/6] drm/i915/gt: replace cache_clflush_range

2022-02-07 Thread Michael Cheng
Replace all occurance of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2

[PATCH v6 6/6] drm: Add arch arm64 for drm_clflush_virt_range

2022-02-07 Thread Michael Cheng
Use flush_tlb_kernel_range when invoking drm_clflush_virt_range on arm64 platforms. Using flush_tlb_kernel_range will: 1. Make sure prior page-table updates have been completed 2. Invalidate the TLB 3. Check if the TLB invalidation has been completed Signed-off-by: Michael Cheng --- drivers

[PATCH v6 2/6] drm/i915/gt: Drop invalidate_csb_entries

2022-02-07 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v6 0/6] Use drm_clflush* instead of clflush

2022-02-07 Thread Michael Cheng
. v2: s/PAGE_SIZE/sizeof(value) for Re-work intel_write_status_page and added more patches to convert additional clflush/clflushopt to use drm_clflush*. (Michael Cheng

[PATCH v6 1/6] drm/i915/gt: Re-work intel_write_status_page

2022-02-07 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v5 2/5] drm/i915/gt: Drop invalidate_csb_entries

2022-02-07 Thread Michael Cheng
Ah, sorry thanks for pointing that out. We did discuss previously. I will go ahead and change it. On 2022-02-07 3:57 a.m., Tvrtko Ursulin wrote: On 04/02/2022 16:37, Michael Cheng wrote: Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function

[PATCH v5 1/5] drm/i915/gt: Re-work intel_write_status_page

2022-02-04 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH v5 0/5] Use drm_clflush* instead of clflush

2022-02-04 Thread Michael Cheng
additional clflush/clflushopt to use drm_clflush*. (Michael Cheng) v3: Drop invalidate_csb_entries and directly invoke drm_clflush_virt_ran v4: Remove extra memory barriers v5: s/cache_clflush_range/drm_clflush_virt_range Michael Cheng (5): drm/i915/gt: Re-work intel_write_status_page drm/i915

[PATCH v5 4/5] drm/i915/: Re-work clflush_write32

2022-02-04 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v5 3/5] drm/i915/gt: Re-work reset_csb

2022-02-04 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v5 5/5] drm/i915/gt: replace cache_clflush_range

2022-02-04 Thread Michael Cheng
Replace all occurance of cache_clflush_range with drm_clflush_virt_range. This will prevent compile errors on non-x86 platforms. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2

[PATCH v5 2/5] drm/i915/gt: Drop invalidate_csb_entries

2022-02-04 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v4 2/4] drm/i915/gt: Drop invalidate_csb_entries

2022-02-03 Thread Michael Cheng
Drop invalidate_csb_entries and directly call drm_clflush_virt_range. This allows for one less function call, and prevent complier errors when building for non-x86 architectures. v2(Michael Cheng): Drop invalidate_csb_entries function and directly invoke drm_clflush_virt_range

[PATCH v4 4/4] drm/i915/: Re-work clflush_write32

2022-02-03 Thread Michael Cheng
Use drm_clflush_virt_range instead of clflushopt and remove the memory barrier, since drm_clflush_virt_range takes care of that. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v4 3/4] drm/i915/gt: Re-work reset_csb

2022-02-03 Thread Michael Cheng
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. Signed

[PATCH v4 0/4] Use drm_clflush* instead of clflush

2022-02-03 Thread Michael Cheng
additional clflush/clflushopt to use drm_clflush*. (Michael Cheng) v3: Drop invalidate_csb_entries and directly invoke drm_clflush_virt_ran v4: Remove extra memory barriers Michael Cheng (4): drm/i915/gt: Re-work intel_write_status_page drm/i915/gt: Drop invalidate_csb_entries drm/i915/gt: Re

[PATCH v4 1/4] drm/i915/gt: Re-work intel_write_status_page

2022-02-03 Thread Michael Cheng
Re-work intel_write_status_page to use drm_clflush_virt_range. This will prevent compiler errors when building for non-x86 architectures. Signed-off-by: Michael Cheng --- drivers/gpu/drm/i915/gt/intel_engine.h | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

  1   2   >