[Intel-gfx] [PATCH i-g-t] Revert "lib/i915: request CPU_ACCESS for fb objects"

2022-07-07 Thread Matthew Auld
This reverts commit 3cf110f8dcd1f4f02cf84339664b413abdaebf7d. This is too big of a hammer it seems, since we can't really support flat-CCS with lmem + smem objects, and here adding the flag means we also attach the smem placement, which seems to break kms_ccs. Signed-off-by: Matthew Aul

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Grab the runtime pm in shrink_thp

2022-07-06 Thread Matthew Auld
On Wed, 6 Jul 2022 at 16:48, Matthew Auld wrote: > > From: Chris Wilson > > Since we are not holding a wakeref, shrinking a bound object is not > guaranteed. > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6370 > Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld

[Intel-gfx] [PATCH] drm/i915/selftests: Grab the runtime pm in shrink_thp

2022-07-06 Thread Matthew Auld
From: Chris Wilson Since we are not holding a wakeref, shrinking a bound object is not guaranteed. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6370 Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 7 ++- 1 file

[Intel-gfx] [PATCH i-g-t v2] tests/i915_query: tweak the unallocated tracking test

2022-07-06 Thread Matthew Auld
Make sure we always print the seed. Also make sure we use the correct helpers for the igt_assert when comparing values of type uint64. v2:(Nirmoy) - Fix broken conversion with s/lt/lte/ in a couple places. Signed-off-by: Matthew Auld Cc: Nirmoy Das --- tests/i915/i915_query.c | 36

[Intel-gfx] [PATCH i-g-t] tests/i915_query: tweak the unallocated tracking test

2022-07-05 Thread Matthew Auld
Make sure we always print the seed. Also make sure we use the correct helpers for the igt_assert when comparing values of type uint64. Signed-off-by: Matthew Auld Cc: Nirmoy Das --- tests/i915/i915_query.c | 36 +++- 1 file changed, 19 insertions(+), 17

[Intel-gfx] [PATCH i-g-t] tests/gem_exec_capture: adjust the pi subtest

2022-07-05 Thread Matthew Auld
This was broken by the kernel change: 71b1669ea9bd ("drm/i915/uapi: tweak error capture on recoverable contexts"). Update the test to use non-recoverable context if needed. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6350 Signed-off-by: Matthew Auld Cc: Nirmoy Das ---

Re: [Intel-gfx] [PATCH v6 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-07-01 Thread Matthew Auld
On 30/06/2022 17:23, Matthew Auld wrote: On 30/06/2022 16:34, Jason Ekstrand wrote: On Thu, Jun 30, 2022 at 10:14 AM Matthew Auld <mailto:matthew.a...@intel.com>> wrote:     On 30/06/2022 06:11, Jason Ekstrand wrote: > On Sat, Jun 25, 2022 at 8:49 PM Niranjana Vis

Re: [Intel-gfx] [PATCH v2] drm/i915: Fix vm use-after-free in vma destruction

2022-07-01 Thread Matthew Auld
org/drm/intel/-/issues/5944 > Fixes: e1a7ab4fca ("drm/i915: Remove the vm open count") > > Cc: Niranjana Vishwanathapura > Cc: Matthew Auld > Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH v6 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-30 Thread Matthew Auld
On 30/06/2022 16:34, Jason Ekstrand wrote: On Thu, Jun 30, 2022 at 10:14 AM Matthew Auld <mailto:matthew.a...@intel.com>> wrote: On 30/06/2022 06:11, Jason Ekstrand wrote: > On Sat, Jun 25, 2022 at 8:49 PM Niranjana Vishwanathapura > mailto:niranjana.vishwanath

Re: [Intel-gfx] [PATCH v6 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-30 Thread Matthew Auld
On 30/06/2022 06:11, Jason Ekstrand wrote: On Sat, Jun 25, 2022 at 8:49 PM Niranjana Vishwanathapura > wrote: VM_BIND and related uapi definitions v2: Reduce the scope to simple Mesa use case. v3: Expand VM_UNBIND documentation and add

Re: [Intel-gfx] [PATCH 2/3] drm/i915/ttm: don't overwrite cache_dirty after setting coherency

2022-06-30 Thread Matthew Auld
On Tue, 28 Jun 2022 at 22:11, Robert Beckett wrote: > > > > On 14/06/2022 18:55, Matthew Auld wrote: > > On Tue, 14 Jun 2022 at 02:14, Adrian Larumbe > > wrote: > >> > >> When i915_gem_object_set_cache_level sets the GEM object's cache_dirty to &g

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [CI,v4,01/13] drm/doc: add rfc section for small BAR uapi

2022-06-30 Thread Matthew Auld
On 30/06/2022 10:42, Patchwork wrote: *Patch Details* *Series:* series starting with [CI,v4,01/13] drm/doc: add rfc section for small BAR uapi *URL:* https://patchwork.freedesktop.org/series/105787/ *State:*failure *Details:* https://

[Intel-gfx] [PATCH i-g-t 9/9] lib/i915: request CPU_ACCESS for fb objects

2022-06-29 Thread Matthew Auld
e the mappable portion, if possible. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/ioctl_wrappers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 09eb3ce7..7713e78b 100644 --- a/lib/ioctl_wrapp

[Intel-gfx] [PATCH i-g-t 8/9] tests/i915/capture: handle uapi changes

2022-06-29 Thread Matthew Auld
skipped, for now at least. v2: try to make it backwards compat Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/gem_exec_capture.c | 176 -- 1 file changed, 169 insertions(+), 7 deletions(-) diff --git a/tests/i915

[Intel-gfx] [PATCH i-g-t 7/9] lib/i915/intel_memory_region: plumb through the cpu_size

2022-06-29 Thread Matthew Auld
Will be useful later. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/intel_memory_region.c | 2 ++ lib/i915/intel_memory_region.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c index

[Intel-gfx] [PATCH i-g-t 6/9] tests/i915/query: sanity check the unallocated tracking

2022-06-29 Thread Matthew Auld
Sanity both the unallocated_size & unallocated_cpu_visible_size tracking. v2(Petri): always use from_user_pointer() Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/i915_query.c | 274 +++- 1 file changed,

[Intel-gfx] [PATCH i-g-t 5/9] tests/i915/query: sanity check the probed_cpu_visible_size

2022-06-29 Thread Matthew Auld
Add some basic sanity checks for this, like checking if this falls within the probed_size. On older kernels the value reported here should be zero. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/i915_query.c | 19 --- 1 file changed

[Intel-gfx] [PATCH i-g-t 4/9] lib/i915: add gem_create_with_cpu_access_in_memory_regions

2022-06-29 Thread Matthew Auld
r. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/intel_memory_region.c | 10 +++-- lib/i915/intel_memory_region.h | 68 -- tests/i915/gem_eio.c | 1 + tests/i915/gem_lmem_swapping.c | 2 +- tests/i915/i91

[Intel-gfx] [PATCH i-g-t 3/9] tests/i915/gem_create: exercise NEEDS_CPU_ACCESS

2022-06-29 Thread Matthew Auld
Add some basic tests for this new flag. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/gem_create.c | 309 +++- 1 file changed, 308 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_create.c b/tests/i915

[Intel-gfx] [PATCH i-g-t 1/9] lib/i915_drm_local: Add I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS

2022-06-29 Thread Matthew Auld
For now dump into i915_drm_local.h. Once the uapi on the kernel side is merged, and is part of drm-next, we can sync the kernel headers and remove this. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/i915_drm_local.h | 21 + 1 file

[Intel-gfx] [PATCH i-g-t 2/9] lib/i915: wire up optional flags for gem_create_ext

2022-06-29 Thread Matthew Auld
For now limit to direct callers. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/gem_create.c | 9 ++--- lib/i915/gem_create.h | 5 +++-- lib/i915/intel_memory_region.c | 2 +- tests/i915/gem_create.c| 24

[Intel-gfx] [CI v4 12/13] drm/i915/ttm: disallow CPU fallback mode for ccs pages

2022-06-29 Thread Matthew Auld
s objects") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Cc: Ramalingam C --- drivers/gpu/drm/i915/gem/i915_gem_

[Intel-gfx] [CI v4 08/13] drm/i915/uapi: tweak error capture on recoverable contexts

2022-06-29 Thread Matthew Auld
integrated platforms, for capture buffer memory allocation purposes. v3 (Reported-by: kernel test robot ): - Fix build on !CONFIG_DRM_I915_CAPTURE_ERROR Testcase: igt@gem_exec_capture@capture-recoverable Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc

[Intel-gfx] [CI v4 03/13] drm/i915/uapi: expose the avail tracking

2022-06-29 Thread Matthew Auld
Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/i915_query.c | 10 +- drivers/g

[Intel-gfx] [CI v4 11/13] drm/i915/ttm: handle blitter failure on DG2

2022-06-29 Thread Matthew Auld
e ordering of the set_wedged, also add FIXME. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/dr

[Intel-gfx] [CI v4 09/13] drm/i915/selftests: skip the mman tests for stolen

2022-06-29 Thread Matthew Auld
It's not supported, and just skips later anyway. With small-BAR things get more complicated since all of stolen is likely not even CPU accessible, hence not passing I915_BO_ALLOC_GPU_ONLY just results in the object create failing. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: L

[Intel-gfx] [CI v4 10/13] drm/i915/selftests: ensure we reserve a fence slot

2022-06-29 Thread Matthew Auld
We should always be explicit and allocate a fence slot before adding a new fence. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas

[Intel-gfx] [CI v4 13/13] drm/i915: turn on small BAR support

2022-06-29 Thread Matthew Auld
With the uAPI in place we should now have enough in place to ensure a working system on small BAR configurations. v2: (Nirmoy & Thomas): - s/full BAR/Resizable BAR/ which is hopefully more easily understood by users. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwe

[Intel-gfx] [CI v4 02/13] drm/i915/uapi: add probed_cpu_visible_size

2022-06-29 Thread Matthew Auld
through to the region query. v2: Drop the ( -1 = unknown ) stuff, which is confusing since nothing can currently ever return such a value. Testcase: igt@i915_query@query-regions-sanity-check Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon

[Intel-gfx] [CI v4 07/13] drm/i915/error: skip non-mappable pages

2022-06-29 Thread Matthew Auld
Skip capturing any lmem pages that can't be copied using the CPU. This in now only best effort on platforms that have small BAR. Testcase: igt@gem-exec-capture@capture-invisible Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfiel

[Intel-gfx] [CI v4 06/13] drm/i915/uapi: add NEEDS_CPU_ACCESS hint

2022-06-29 Thread Matthew Auld
x27;t make space. Testcase: igt@gem-create@create-ext-cpu-access-sanity-check Testcase: igt@gem-create@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abod

[Intel-gfx] [CI v4 05/13] drm/i915/uapi: apply ALLOC_GPU_ONLY by default

2022-06-29 Thread Matthew Auld
eate@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_g

[Intel-gfx] [CI v4 04/13] drm/i915: remove intel_memory_region avail

2022-06-29 Thread Matthew Auld
No longer used. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/intel_memory_region.c | 4

[Intel-gfx] [CI v4 01/13] drm/doc: add rfc section for small BAR uapi

2022-06-29 Thread Matthew Auld
over. (Tvrtko) v5: - Include newer integrated platforms when applying the non-recoverable context and error capture restriction. (Thomas) Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Ken

Re: [Intel-gfx] [PATCH v3 09/13] drm/i915/selftests: skip the mman tests for stolen

2022-06-29 Thread Matthew Auld
On 29/06/2022 17:22, Thomas Hellström wrote: On 6/29/22 14:14, Matthew Auld wrote: It's not supported, and just skips later anyway. With small-BAR things get more complicated since all of stolen is likely not even CPU accessible, hence not passing I915_BO_ALLOC_GPU_ONLY just results i

Re: [Intel-gfx] [PATCH v3 11/13] drm/i915/ttm: handle blitter failure on DG2

2022-06-29 Thread Matthew Auld
On 29/06/2022 17:11, Thomas Hellström wrote: Hi, Matthew, On 6/29/22 14:14, Matthew Auld wrote: If the move or clear operation somehow fails, and the memory underneath is not cleared, like when moving to lmem, then we currently fallback to memcpy or memset. However with small-BAR systems this

[Intel-gfx] [PATCH v3 13/13] drm/i915: turn on small BAR support

2022-06-29 Thread Matthew Auld
With the uAPI in place we should now have enough in place to ensure a working system on small BAR configurations. v2: (Nirmoy & Thomas): - s/full BAR/Resizable BAR/ which is hopefully more easily understood by users. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwe

[Intel-gfx] [PATCH v3 12/13] drm/i915/ttm: disallow CPU fallback mode for ccs pages

2022-06-29 Thread Matthew Auld
s objects") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Cc: Ramalingam C --- drivers/gpu/drm/i915/gem/i915_gem_

[Intel-gfx] [PATCH v3 11/13] drm/i915/ttm: handle blitter failure on DG2

2022-06-29 Thread Matthew Auld
here. - Make sure we wedge each gt. (Thomas) - Peek at the unknown_state in io_reserve, that way we don't have to export or hand roll the fault_wait_for_idle. (Thomas) - Add the missing read-side barriers for the unknown_state. (Thomas) - Some kernel-doc fixes. (Thomas) Signed-off-by: Ma

[Intel-gfx] [PATCH v3 10/13] drm/i915/selftests: ensure we reserve a fence slot

2022-06-29 Thread Matthew Auld
We should always be explicit and allocate a fence slot before adding a new fence. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas

[Intel-gfx] [PATCH v3 09/13] drm/i915/selftests: skip the mman tests for stolen

2022-06-29 Thread Matthew Auld
It's not supported, and just skips later anyway. With small-BAR things get more complicated since all of stolen is likely not even CPU accessible, hence not passing I915_BO_ALLOC_GPU_ONLY just results in the object create failing. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: L

[Intel-gfx] [PATCH v3 07/13] drm/i915/error: skip non-mappable pages

2022-06-29 Thread Matthew Auld
Skip capturing any lmem pages that can't be copied using the CPU. This in now only best effort on platforms that have small BAR. Testcase: igt@gem-exec-capture@capture-invisible Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfiel

[Intel-gfx] [PATCH v3 05/13] drm/i915/uapi: apply ALLOC_GPU_ONLY by default

2022-06-29 Thread Matthew Auld
eate@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_g

[Intel-gfx] [PATCH v3 04/13] drm/i915: remove intel_memory_region avail

2022-06-29 Thread Matthew Auld
No longer used. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/intel_memory_region.c | 4

[Intel-gfx] [PATCH v3 06/13] drm/i915/uapi: add NEEDS_CPU_ACCESS hint

2022-06-29 Thread Matthew Auld
x27;t make space. Testcase: igt@gem-create@create-ext-cpu-access-sanity-check Testcase: igt@gem-create@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abod

[Intel-gfx] [PATCH v3 08/13] drm/i915/uapi: tweak error capture on recoverable contexts

2022-06-29 Thread Matthew Auld
integrated platforms, for capture buffer memory allocation purposes. v3 (Reported-by: kernel test robot ): - Fix build on !CONFIG_DRM_I915_CAPTURE_ERROR Testcase: igt@gem_exec_capture@capture-recoverable Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc

[Intel-gfx] [PATCH v3 02/13] drm/i915/uapi: add probed_cpu_visible_size

2022-06-29 Thread Matthew Auld
through to the region query. v2: Drop the ( -1 = unknown ) stuff, which is confusing since nothing can currently ever return such a value. Testcase: igt@i915_query@query-regions-sanity-check Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon

[Intel-gfx] [PATCH v3 03/13] drm/i915/uapi: expose the avail tracking

2022-06-29 Thread Matthew Auld
Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/i915_query.c | 10 +- drivers/g

[Intel-gfx] [PATCH v3 00/13] small BAR uapi bits

2022-06-29 Thread Matthew Auld
IGT: https://patchwork.freedesktop.org/series/104368/#rev2 Mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739 -- 2.36.1

[Intel-gfx] [PATCH v3 01/13] drm/doc: add rfc section for small BAR uapi

2022-06-29 Thread Matthew Auld
over. (Tvrtko) v5: - Include newer integrated platforms when applying the non-recoverable context and error capture restriction. (Thomas) Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Ken

[Intel-gfx] [PATCH i-g-t 3/3] tests/amdgpu/amdgpu_command_submission: fix uaf

2022-06-28 Thread Matthew Auld
dle); | ^~~~ ../lib/amdgpu/amd_command_submission.c:199:9: note: call to ‘free’ here 199 | free(ring_context); | ^~ Signed-off-by: Matthew Auld Cc: Petri Latvala --- lib/amdgpu/amd_command_submission.c

[Intel-gfx] [PATCH i-g-t 2/3] tests/kms_cursor_crc: fix truncated warning

2022-06-28 Thread Matthew Auld
73 |__va_arg_pack ()); |~~~~~ Signed-off-by: Matthew Auld Cc: Petri Latvala --- tests/kms_cursor_crc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 5

[Intel-gfx] [PATCH i-g-t 1/3] lib/igt_device_scan: fix dangling pointer

2022-06-28 Thread Matthew Auld
p(v)); | ^ ../lib/igt_device_scan.c:351:22: note: ‘linkto’ declared here 351 | char linkto[PATH_MAX]; Signed-off-by: Matthew Auld Cc: Petri Latvala --- lib/igt_device_scan.c | 2 +- 1 file changed, 1 insertion(+)

Re: [Intel-gfx] [PATCH i-g-t 1/3] tests/i915/gem_eio: fix uaf

2022-06-28 Thread Matthew Auld
assume it's just a difference in compiler version or so. I have: gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1). Br, G.G. On 6/27/22 7:10 PM, Matthew Auld wrote: ../tests/i915/gem_eio.c:277:20: warning: pointer ‘ctx’ used after ‘free’ [-Wuse-after-free]    277 | igt_assert(igt_sy

Re: [Intel-gfx] [PATCH] drm/i915/gt: handle null ptr at sg traversing

2022-06-28 Thread Matthew Auld
On 27/06/2022 18:35, Ramalingam C wrote: When calculating the starting address for ccs data in smem scatterlist, handle the NULL pointer returned from sg_next, incase of scatterlist less than required size.. Do we have some more information on how we can hit this? Is this a programmer error? D

[Intel-gfx] [PATCH i-g-t 2/3] tests/i915/kms_mmap_write_crc: handle missing gem_get_caching()

2022-06-27 Thread Matthew Auld
from lmem, which can only be mapped as WC and so should always be coherent for scanout. Adjust the test and ensure it still passes as expected. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5303 Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun --- tests/i915/kms_mmap_write_crc.c

[Intel-gfx] [PATCH i-g-t 3/3] tests/i915: adapt __copy_ccs for discrete

2022-06-27 Thread Matthew Auld
We can't explicitly control the mmap caching type for discrete, but using mmap_device_coherent should be good enough here on such devices. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4842 Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun --- lib/intel_bufops.c

[Intel-gfx] [PATCH i-g-t 1/3] tests/i915/gem_eio: fix uaf

2022-06-27 Thread Matthew Auld
{ if (!(expr)) \ |^~~~ ../tests/i915/gem_eio.c:274:9: note: call to ‘free’ here 274 | free(ctx); Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun --- tests/i915/gem_eio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c i

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: tweak the ordering in cpu_write_needs_clflush

2022-06-27 Thread Matthew Auld
On Mon, 27 Jun 2022 at 12:49, Patchwork wrote: > > Patch Details > Series:drm/i915: tweak the ordering in cpu_write_needs_clflush > URL:https://patchwork.freedesktop.org/series/105503/ > State:failure > Details:https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105503v1/index.html > > CI Bug Log -

Re: [Intel-gfx] [PATCH v2 10/12] drm/i915/ttm: handle blitter failure on DG2

2022-06-27 Thread Matthew Auld
On Thu, 23 Jun 2022 at 16:31, Matthew Auld wrote: > > On 23/06/2022 15:52, Christian König wrote: > > Am 23.06.22 um 16:13 schrieb Matthew Auld: > >> [SNIP] > >>>> TTM_BO_VM_NUM_PREFAULT); > >>>> + /* > >>>> +

Re: [Intel-gfx] [PATCH v2 10/12] drm/i915/ttm: handle blitter failure on DG2

2022-06-23 Thread Matthew Auld
On 23/06/2022 15:52, Christian König wrote: Am 23.06.22 um 16:13 schrieb Matthew Auld: [SNIP] TTM_BO_VM_NUM_PREFAULT); +   /* +    * Ensure we check for any fatal errors if we had to move/clear +    * the object. The device should already be wedged if we hit

Re: [Intel-gfx] [PATCH v2 10/12] drm/i915/ttm: handle blitter failure on DG2

2022-06-23 Thread Matthew Auld
On 23/06/2022 08:00, Thomas Hellström wrote: On Tue, 2022-06-21 at 11:44 +0100, Matthew Auld wrote: If the move or clear operation somehow fails, and the memory underneath is not cleared, like when moving to lmem, then we currently fallback to memcpy or memset. However with small-BAR systems

[Intel-gfx] [PATCH] drm/i915: tweak the ordering in cpu_write_needs_clflush

2022-06-22 Thread Matthew Auld
: Fix prime_mmap to work when using LMEM") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5266 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Gwan-gyeong Mun --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Increase timeout for live_parallel_switch

2022-06-22 Thread Matthew Auld
On Wed, 22 Jun 2022 at 15:11, Matthew Auld wrote: > > From: Akeem G Abodunrin > > With GuC submission, it takes a little bit longer switching contexts > among all available engines simultaneously, when running > live_parallel_switch subtest. Increase the timeout.

[Intel-gfx] [PATCH] drm/i915/selftests: Increase timeout for live_parallel_switch

2022-06-22 Thread Matthew Auld
Abodunrin Cc: Matthew Brost Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c index

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix i915_vma_pin_iomap()

2022-06-22 Thread Matthew Auld
On Tue, 21 Jun 2022 at 19:38, Juha-Pekka Heikkila wrote: > > On 21.6.2022 13.53, Matthew Auld wrote: > > On Mon, 20 Jun 2022 at 10:38, Juha-Pekka Heikkila > > wrote: > >> > >> On 10.6.2022 20.43, Matthew Auld wrote: > >>> On Fri, 10 Jun 2022 at 15

Re: [Intel-gfx] [PATCH i-g-t 1/2] drm/i915: Add support for LMEM PCIe resizable bar

2022-06-22 Thread Matthew Auld
gt; > Cc: Michael J Ruhl > > Cc: Prathap Kumar Valsan > > Signed-off-by: Priyanka Dandamudi > > Reviewed-by: Matthew Auld > > --- > > drivers/gpu/drm/i915/i915_driver.c | 92 ++ > > 1 file changed, 92 insertions(+) > >

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t v2 6/9] tests/i915/query: sanity check the unallocated tracking

2022-06-21 Thread Matthew Auld
On 21/06/2022 13:41, Petri Latvala wrote: On Tue, Jun 21, 2022 at 11:29:58AM +0100, Matthew Auld wrote: Sanity both the unallocated_size & unallocated_cpu_visible_size tracking. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/i915_query.c |

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix i915_vma_pin_iomap()

2022-06-21 Thread Matthew Auld
On Mon, 20 Jun 2022 at 10:38, Juha-Pekka Heikkila wrote: > > On 10.6.2022 20.43, Matthew Auld wrote: > > On Fri, 10 Jun 2022 at 15:53, Matthew Auld > > wrote: > >> > >> On Fri, 10 Jun 2022 at 13:12, Juha-Pekka Heikkila > >> wrote: > >>>

[Intel-gfx] [PATCH v2 12/12] HAX: force small BAR on dg2

2022-06-21 Thread Matthew Auld
Just for CI. Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c index 82c3d2d0f0e0..62c3f8185852 100644 --- a/drivers/gpu

[Intel-gfx] [PATCH v2 11/12] drm/i915: turn on small BAR support

2022-06-21 Thread Matthew Auld
With the uAPI in place we should now have enough in place to ensure a working system on small BAR configurations. v2: (Nirmoy & Thomas): - s/full BAR/Resizable BAR/ which is hopefully more easily understood by users. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwe

[Intel-gfx] [PATCH v2 09/12] drm/i915/selftests: ensure we reserve a fence slot

2022-06-21 Thread Matthew Auld
We should always be explicit and allocate a fence slot before adding a new fence. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin --- drivers/gpu

[Intel-gfx] [PATCH v2 10/12] drm/i915/ttm: handle blitter failure on DG2

2022-06-21 Thread Matthew Auld
encounter such a scenario, and mark the object as borked to plug any holes where access to the memory underneath can happen. Add some basic selftests to exercise this. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc

[Intel-gfx] [PATCH v2 08/12] drm/i915/uapi: tweak error capture on recoverable contexts

2022-06-21 Thread Matthew Auld
platforms, for capture buffer memory allocation purposes. Testcase: igt@gem_exec_capture@capture-recoverable Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G

[Intel-gfx] [PATCH v2 07/12] drm/i915/error: skip non-mappable pages

2022-06-21 Thread Matthew Auld
Skip capturing any lmem pages that can't be copied using the CPU. This in now only best effort on platforms that have small BAR. Testcase: igt@gem-exec-capture@capture-invisible Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfiel

[Intel-gfx] [PATCH v2 06/12] drm/i915/uapi: add NEEDS_CPU_ACCESS hint

2022-06-21 Thread Matthew Auld
x27;t make space. Testcase: igt@gem-create@create-ext-cpu-access-sanity-check Testcase: igt@gem-create@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abod

[Intel-gfx] [PATCH v2 05/12] drm/i915/uapi: apply ALLOC_GPU_ONLY by default

2022-06-21 Thread Matthew Auld
eate@create-ext-cpu-access-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_g

[Intel-gfx] [PATCH v2 04/12] drm/i915: remove intel_memory_region avail

2022-06-21 Thread Matthew Auld
No longer used. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/intel_memory_region.c | 4

[Intel-gfx] [PATCH v2 03/12] drm/i915/uapi: expose the avail tracking

2022-06-21 Thread Matthew Auld
Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin --- drivers/gpu/drm/i915/i915_query.c | 10 +- drivers/gpu/drm/i915/i915_ttm_buddy_man

[Intel-gfx] [PATCH v2 02/12] drm/i915/uapi: add probed_cpu_visible_size

2022-06-21 Thread Matthew Auld
through to the region query. v2: Drop the ( -1 = unknown ) stuff, which is confusing since nothing can currently ever return such a value. Testcase: igt@i915_query@query-regions-sanity-check Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon

[Intel-gfx] [PATCH v2 01/12] drm/doc: add rfc section for small BAR uapi

2022-06-21 Thread Matthew Auld
over. (Tvrtko) v5: - Include newer integrated platforms when applying the non-recoverable context and error capture restriction. (Thomas) Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Ken

[Intel-gfx] [PATCH v2 00/12] small BAR uapi bits

2022-06-21 Thread Matthew Auld
Test-with: 20220621103001.184373-1-matthew.a...@intel.com IGT: https://patchwork.freedesktop.org/series/104368/#rev2 Mesa: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739 (WIP) -- 2.36.1

[Intel-gfx] [PATCH i-g-t v2 9/9] lib/i915: request CPU_ACCESS for fb objects

2022-06-21 Thread Matthew Auld
e the mappable portion, if possible. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/ioctl_wrappers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 09eb3ce7..7713e78b 100644 --- a/lib/ioctl_wrapp

[Intel-gfx] [PATCH i-g-t v2 7/9] lib/i915/intel_memory_region: plumb through the cpu_size

2022-06-21 Thread Matthew Auld
Will be useful later. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/intel_memory_region.c | 2 ++ lib/i915/intel_memory_region.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/i915/intel_memory_region.c b/lib/i915/intel_memory_region.c index

[Intel-gfx] [PATCH i-g-t v2 5/9] tests/i915/query: sanity check the probed_cpu_visible_size

2022-06-21 Thread Matthew Auld
Add some basic sanity checks for this, like checking if this falls within the probed_size. On older kernels the value reported here should be zero. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/i915_query.c | 19 --- 1 file changed

[Intel-gfx] [PATCH i-g-t v2 8/9] tests/i915/capture: handle uapi changes

2022-06-21 Thread Matthew Auld
skipped, for now at least. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/gem_exec_capture.c | 145 -- 1 file changed, 138 insertions(+), 7 deletions(-) diff --git a/tests/i915/gem_exec_capture.c b/tests/i915

[Intel-gfx] [PATCH i-g-t v2 6/9] tests/i915/query: sanity check the unallocated tracking

2022-06-21 Thread Matthew Auld
Sanity both the unallocated_size & unallocated_cpu_visible_size tracking. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/i915_query.c | 274 +++- 1 file changed, 273 insertions(+), 1 deletion(-) diff --git a/t

[Intel-gfx] [PATCH i-g-t v2 4/9] lib/i915: add gem_create_with_cpu_access_in_memory_regions

2022-06-21 Thread Matthew Auld
r. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/intel_memory_region.c | 10 +++-- lib/i915/intel_memory_region.h | 68 -- tests/i915/gem_eio.c | 1 + tests/i915/gem_lmem_swapping.c | 2 +- tests/i915/i91

[Intel-gfx] [PATCH i-g-t v2 2/9] lib/i915: wire up optional flags for gem_create_ext

2022-06-21 Thread Matthew Auld
For now limit to direct callers. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/gem_create.c | 9 ++--- lib/i915/gem_create.h | 5 +++-- lib/i915/intel_memory_region.c | 2 +- tests/i915/gem_create.c| 24

[Intel-gfx] [PATCH i-g-t v2 3/9] tests/i915/gem_create: exercise NEEDS_CPU_ACCESS

2022-06-21 Thread Matthew Auld
Add some basic tests for this new flag. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- tests/i915/gem_create.c | 309 +++- 1 file changed, 308 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_create.c b/tests/i915

[Intel-gfx] [PATCH i-g-t v2 1/9] lib/i915_drm_local: Add I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS

2022-06-21 Thread Matthew Auld
For now dump into i915_drm_local.h. Once the uapi on the kernel side is merged, and is part of drm-next, we can sync the kernel headers and remove this. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das --- lib/i915/i915_drm_local.h | 21 + 1 file

[Intel-gfx] [PATCH i-g-t v2 0/9] small BAR uapi bits

2022-06-21 Thread Matthew Auld
-- 2.36.1

Re: [Intel-gfx] [PATCH 09/10] drm/i915: turn on small BAR support

2022-06-21 Thread Matthew Auld
On 17/06/2022 13:33, Thomas Hellström wrote: On 5/25/22 20:43, Matthew Auld wrote: With the uAPI in place we should now have enough in place to ensure a working system on small BAR configurations. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc

Re: [Intel-gfx] Access to Intel-gfx

2022-06-17 Thread Matthew Auld
On Fri, 17 Jun 2022 at 11:15, Golani, Mitulkumar Ajitkumar wrote: > > Hi Team, > > This is Mitul Golani from OSGC bangalore team. Please add me to intel-gfx > mailing list to see/post message to all the list members. You should be able to subscribe here: https://lists.freedesktop.org/mailman/lis

Re: [Intel-gfx] [PATCH] drm/i915: Improve on suspend / resume time with VT-d enabled

2022-06-17 Thread Matthew Auld
_lost = val; +} diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h b/drivers/gpu/drm/i915/gt/intel_gtt.h index 4529b5e9f6e6..7561672c4f17 100644 --- a/drivers/gpu/drm/i915/gt/intel_gtt.h +++ b/drivers/gpu/drm/i915/gt/intel_gtt.h @@ -345,6 +345,15 @@ struct i915_ggtt { bool do_idle_maps; + /*

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add support for LMEM PCIe resizable bar

2022-06-15 Thread Matthew Auld
t amdgpu is already doing with their bar resizing stuff, Reviewed-by: Matthew Auld + * + * This function will attempt to resize LMEM bar to make all memory accessible. + * Whether it will be successful depends on both device and platform + * capabilities. Any errors are non-critical, even if resi

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add lmem_bar_size modparam

2022-06-15 Thread Matthew Auld
e etc) with all the potential lmem_bar sizes that we might expect see in the wild." ? Cc: Matthew Auld Signed-off-by: Priyanka Dandamudi --- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 3 +++ drivers/gpu/drm/i915/i915_driver.c | 25 - drivers/gp

Re: [Intel-gfx] [PATCH 2/3] drm/i915/ttm: don't overwrite cache_dirty after setting coherency

2022-06-14 Thread Matthew Auld
On Tue, 14 Jun 2022 at 02:14, Adrian Larumbe wrote: > > When i915_gem_object_set_cache_level sets the GEM object's cache_dirty to > true, in the case of TTM that will sometimes be overwritten when getting > the object's pages, more specifically for shmem-placed objects for which > its ttm structur

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix i915_vma_pin_iomap()

2022-06-10 Thread Matthew Auld
On Fri, 10 Jun 2022 at 15:53, Matthew Auld wrote: > > On Fri, 10 Jun 2022 at 13:12, Juha-Pekka Heikkila > wrote: > > > > From: CQ Tang > > > > Display might allocate a smem object and call > > i915_vma_pin_iomap(), the existing code will fail. > >

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix i915_vma_pin_iomap()

2022-06-10 Thread Matthew Auld
n_map_unlocked(). > > v2 (jheikkil): Change i915_gem_object_pin_map_unlocked to >i915_gem_object_pin_map > > Signed-off-by: CQ Tang > Signed-off-by: Juha-Pekka Heikkila > Cc: Chris Wilson > Cc: Jari Tahvanainen Reviewed-by: Matthew Auld

<    1   2   3   4   5   6   7   8   9   10   >