Re: [PATCH 05/16] drm/i915/vm_bind: Implement bind and unbind of object

2022-09-28 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Add uapi and implement support for bind and unbind of an object at the specified GPU virtual addresses. The vm_bind mode is not supported in legacy execbuf2 ioctl. It will be supported only in the newer execbuf3 ioctl. Signed-off-by:

Re: [PATCH 03/16] drm/i915/vm_bind: Expose i915_gem_object_max_page_size()

2022-09-28 Thread Matthew Auld
;max of the min_page_size, or I915_GTT_PAGE_SIZE_4K if zero placements." Acked-by: Matthew Auld + */ +u32 i915_gem_object_max_page_size(struct intel_memory_region **placements, + unsigned int n_placements) { - u32 max_page_size = 0; + u32 max_page_size = I915_G

Re: [PATCH 02/16] drm/i915/vm_bind: Add __i915_sw_fence_await_reservation()

2022-09-28 Thread Matthew Auld
in jiffies + * @gfp: allocation mode + * + * Setup the @fence to asynchronously wait on dma-resv object @resv for usage + * @usage to complete before signaling. s/usage @usage/@usage/ ? + * + * Returns 0 if there is nothing to wait on, -ve upon error and >0 upon What does "-ve"

Re: [PATCH 01/16] drm/i915/vm_bind: Expose vm lookup function

2022-09-28 Thread Matthew Auld
On 28/09/2022 07:19, Niranjana Vishwanathapura wrote: Make i915_gem_vm_lookup() function non-static as it will be used by the vm_bind feature. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Andi Shyti Acked-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11

[PATCH v2 2/2] drm/i915/uapi: expose GTT alignment

2022-09-27 Thread Matthew Auld
@i915_query@query-regions-sanity-check Suggested-by: Lionel Landwerlin Signed-off-by: Matthew Auld Cc: Michal Mrozek Cc: Thomas Hellström Cc: Stuart Summers Cc: Jordan Justen Cc: Yang A Shi Cc: Nirmoy Das --- drivers/gpu/drm/i915/i915_query.c | 1 + include/uapi/drm/i915_drm.h | 29

[PATCH v2 1/2] drm/i915: enable PS64 support for DG2

2022-09-27 Thread Matthew Auld
restrictions, as documented in: commit caa574ffc4aaf4f29b890223878c63e2e7772f62 Author: Matthew Auld Date: Sat Feb 19 00:17:49 2022 +0530 drm/i915/uapi: document behaviour for DG2 64K support On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing

[PATCH] drm/i915: enable PS64 support for DG2

2022-09-26 Thread Matthew Auld
restrictions, as documented in: commit caa574ffc4aaf4f29b890223878c63e2e7772f62 Author: Matthew Auld Date: Sat Feb 19 00:17:49 2022 +0530 drm/i915/uapi: document behaviour for DG2 64K support On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing

Re: [PATCH] drm/i915: Improve debug print in vm_fault_ttm

2022-09-22 Thread Matthew Auld
that bug the object is just too large for the mappable part of lmem, so this just gives -2big or similar on small-bar systems. I presume that the test needs to be updated to account for the cpu_size or so. With the kernel test robot warning fixed: Acked-by: Matthew Auld I looked at the GEM_BUG_O

Re: [Intel-gfx] [RFC v4 03/14] drm/i915/vm_bind: Expose i915_gem_object_max_page_size()

2022-09-22 Thread Matthew Auld
On 22/09/2022 09:09, Tvrtko Ursulin wrote: On 21/09/2022 19:00, Niranjana Vishwanathapura wrote: On Wed, Sep 21, 2022 at 10:13:12AM +0100, Tvrtko Ursulin wrote: On 21/09/2022 08:09, Niranjana Vishwanathapura wrote: Expose i915_gem_object_max_page_size() function non-static which will be

Re: [PATCH] drm/i915: Do not cleanup obj with NULL bo->resource

2022-09-20 Thread Matthew Auld
drm/intel/-/issues/6850 Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld Christian, as per above it looks like ttm calls into the delete_mem_notify() hook twice if the object ends up on the delayed destroy list, is that expected/normal? --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c

Re: [PATCH] drm/ttm: cleanup the resource of ghost objects after locking them

2022-09-08 Thread Matthew Auld
On Wed, 7 Sept 2022 at 11:26, Matthew Auld wrote: > > On Wed, 7 Sept 2022 at 11:00, Christian König > wrote: > > > > Otherwise lockdep will complain about cleaning up the bulk_move. > > > > Not even compile tested. > > > > Signed-off-by: Christian

Re: [PATCH] drm/ttm: cleanup the resource of ghost objects after locking them

2022-09-07 Thread Matthew Auld
On Wed, 7 Sept 2022 at 11:00, Christian König wrote: > > Otherwise lockdep will complain about cleaning up the bulk_move. > > Not even compile tested. > > Signed-off-by: Christian König Looks reasonable to me, Reviewed-by: Matthew Auld > --- > drivers/gpu/dr

Re: [PATCH] drm/ttm: cleanup the resource of ghost objects after locking them

2022-09-07 Thread Matthew Auld
On Wed, 7 Sept 2022 at 11:00, Christian König wrote: > > Otherwise lockdep will complain about cleaning up the bulk_move. > > Not even compile tested. > > Signed-off-by: Christian König Can we quickly resend with --cc=intel-...@lists.freedesktop.org to trigger a CI run? It will even compile

Re: [PATCH v2] drm/ttm: update bulk move object of ghost BO

2022-09-07 Thread Matthew Auld
On Tue, 6 Sept 2022 at 09:54, Christian König wrote: > > Am 06.09.22 um 10:46 schrieb ZhenGuo Yin: > > [Why] > > Ghost BO is released with non-empty bulk move object. There is a > > warning trace: > > WARNING: CPU: 19 PID: 1582 at ttm/ttm_bo.c:366 ttm_bo_release+0x2e1/0x2f0 > > [amdttm] > > Call

[PATCH] drm/i915: consider HAS_FLAT_CCS() in needs_ccs_pages

2022-09-05 Thread Matthew Auld
/i915/ttm: disallow CPU fallback mode for ccs pages") Signed-off-by: Matthew Auld Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +++ drivers/gpu/drm/i915/gem/i915_gem_ttm.c| 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/dr

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-09-01 Thread Matthew Auld
On 01/09/2022 09:00, Christian König wrote: Am 31.08.22 um 18:32 schrieb Matthew Auld: On 31/08/2022 15:53, Matthew Auld wrote: On 31/08/2022 14:34, Christian König wrote: Am 31.08.22 um 14:50 schrieb Matthew Auld: On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 15:53, Matthew Auld wrote: On 31/08/2022 14:34, Christian König wrote: Am 31.08.22 um 14:50 schrieb Matthew Auld: On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb

Re: [PATCH] drm/i915/ttm: Abort suspend on i915_ttm_backup failure

2022-08-31 Thread Matthew Auld
/-/issues/6529 Does this fix it? Does CI not complain about the drm_err? Also do we know what the actual error was? Suggested-by: Chris P Wilson Signed-off-by: Nirmoy Das Passing the error along seems reasonable to me, Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gem

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 14:34, Christian König wrote: Am 31.08.22 um 14:50 schrieb Matthew Auld: On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping out shmem ttm_tt and is calling

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping out shmem ttm_tt and is calling ttm_bo_validate() with empty placements to force the pipeline-gutting path, which importantly

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 10:38, Christian König wrote: Am 31.08.22 um 11:26 schrieb Matthew Auld: On 31/08/2022 09:16, Christian König wrote: Hi Matthew, Am 30.08.22 um 12:45 schrieb Matthew Auld: Hi, On 30/08/2022 08:33, Christian König wrote: Hi guys, can we get an rb/acked-by for this i915 change

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 09:16, Christian König wrote: Hi Matthew, Am 30.08.22 um 12:45 schrieb Matthew Auld: Hi, On 30/08/2022 08:33, Christian König wrote: Hi guys, can we get an rb/acked-by for this i915 change? Basically we are just making sure that the driver doesn't crash when bo->resou

Re: [RFC PATCH v3 04/17] drm/i915: Implement bind and unbind of object

2022-08-30 Thread Matthew Auld
On 27/08/2022 20:43, Andi Shyti wrote: From: Niranjana Vishwanathapura Implement the bind and unbind of an object at the specified GPU virtual addresses. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Prathap Kumar Valsan Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti ---

Re: [RFC PATCH v3 04/17] drm/i915: Implement bind and unbind of object

2022-08-30 Thread Matthew Auld
On 27/08/2022 20:43, Andi Shyti wrote: From: Niranjana Vishwanathapura Implement the bind and unbind of an object at the specified GPU virtual addresses. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Prathap Kumar Valsan Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti ---

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-30 Thread Matthew Auld
Hi, On 30/08/2022 08:33, Christian König wrote: Hi guys, can we get an rb/acked-by for this i915 change? Basically we are just making sure that the driver doesn't crash when bo->resource is NULL and a bo doesn't have any backing store assigned to it. The Intel CI seems to be happy with

[PATCH 1/2] drm/i915/ttm: remove calc_ctrl_surf_instr_size

2022-08-05 Thread Matthew Auld
We only ever need to emit one ccs block copy command. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Ramalingam C --- drivers/gpu/drm/i915/gt/intel_migrate.c | 35 +++-- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/i915/gt

[PATCH 2/2] drm/i915/ttm: fix CCS handling

2022-08-05 Thread Matthew Auld
Z) is currently broken on DG2. Fixes: da0595ae91da ("drm/i915/migrate: Evict and restore the flatccs capable lmem obj") Testcase: igt@gem_lmem_swapping@basic-big Testcase: igt@gem_lmem_swapping@verify-ccs-big Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Ramalingam C ---

Re: [PATCH v4 4/6] drm/i915: Implement intersect/compatible functions

2022-08-05 Thread Matthew Auld
lace->fpfn && !place->lpfn) + return true; + + GEM_BUG_ON(!place->lpfn); + + /* +* If we just want something mappable then we can quickly check +* if the current victim resource is using any of the CP Nit: s/CP/CPU/ Reviewed-by:

Re: [PATCH v3 6/6] drm/ttm: Switch to using the new res callback

2022-07-28 Thread Matthew Auld
On 28/07/2022 15:33, Arunpravin Paneer Selvam wrote: Apply new intersect and compatible callback instead of having a generic placement range verfications. v2: Added a separate callback for compatiblilty checks (Christian) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer

Re: [PATCH v3 4/6] drm/i915: Implement intersect/compatible functions

2022-07-28 Thread Matthew Auld
On 28/07/2022 15:33, Arunpravin Paneer Selvam wrote: Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v2: move the bits that are specific to buddy_man (Matthew) Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam

Re: [PATCH] drm/i915/ttm: don't leak the ccs state

2022-07-28 Thread Matthew Auld
The kernel only manages the ccs state with lmem-only objects, however the kernel should still take care not to leak the CCS state from the previous user. Fixes: 48760ffe923a ("drm/i915/gt: Clear compress metadata for Flat-ccs objects") Signed-off-by: Matthew Auld Cc: Thomas Hel

[PATCH] drm/i915/ttm: don't leak the ccs state

2022-07-27 Thread Matthew Auld
The kernel only manages the ccs state with lmem-only objects, however the kernel should still take care not to leak the CCS state from the previous user. Fixes: 48760ffe923a ("drm/i915/gt: Clear compress metadata for Flat-ccs objects") Signed-off-by: Matthew Auld Cc: Thomas Hel

Re: [PATCH 1/2] drm/i915/gem: Avoid taking runtime-pm under the shrinker

2022-07-26 Thread Matthew Auld
o: <4> [437.542716]CPU0CPU1 <4> [437.542719] <4> [437.542721] lock(fs_reclaim); <4> [437.542725] lock(acpi_device_lock); <4> [437.542728]l

Re: [PATCH v2 4/6] drm/i915: Implement intersect/compatible functions

2022-07-26 Thread Matthew Auld
On 25/07/2022 12:42, Arunpravin Paneer Selvam wrote: Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. Signed-off-by: Christian König Signed-off-by: Arunpravin Paneer Selvam --- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 43

Re: [PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit

2022-07-22 Thread Matthew Auld
On Fri, 8 Jul 2022 at 21:32, Maíra Canal wrote: > > From: Arthur Grillo > > Considering the current adoption of the KUnit framework, convert the > DRM mm selftest to the KUnit API. Is there a plan to convert the corresponding selftest IGT that was responsible for running this (also drm_buddy)

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-07-13 Thread Matthew Auld
On Tue, 12 Jul 2022 at 12:46, Christian König wrote: > > Make sure we can at least move and alloc TT objects without backing store. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 6 ++ > drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 2 +- > 2

[PATCH] drm/i915/ttm: fix 32b build

2022-07-12 Thread Matthew Auld
length type), so also make it all u32. Reported-by: Ville Syrjälä Fixes: bc99f1209f19 ("drm/i915/ttm: fix sg_table construction") Signed-off-by: Matthew Auld Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_region.c | 2 ++ drivers/gpu/drm/i915/gem/i915_gem_ttm.c| 2 +- driv

[PATCH v3] drm/i915/ttm: fix sg_table construction

2022-07-11 Thread Matthew Auld
round_down consistently to avoid udiv errors v3(Nirmoy): - Also update the max_segment in the selftest Fixes: f701b16d4cc5 ("drm/i915/ttm: add i915_sg_from_buddy_resource") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6379 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc:

Re: [PATCH v10 04/11] drm/i915/gem: selftest should not attempt mmap of private regions

2022-07-08 Thread Matthew Auld
On 08/07/2022 14:22, Robert Beckett wrote: On 08/07/2022 08:53, Matthew Auld wrote: On 07/07/2022 21:02, Robert Beckett wrote: During testing make can_mmap consider whether the region is private. Do we still need this with: 938d2fd17d17 ("drm/i915/selftests: skip the mman tests for s

Re: [PATCH v10 04/11] drm/i915/gem: selftest should not attempt mmap of private regions

2022-07-08 Thread Matthew Auld
On 07/07/2022 21:02, Robert Beckett wrote: During testing make can_mmap consider whether the region is private. Do we still need this with: 938d2fd17d17 ("drm/i915/selftests: skip the mman tests for stolen") ? Signed-off-by: Robert Beckett Reviewed-by: Thomas Hellström ---

[PATCH] drm/i915/ttm: fix sg_table construction

2022-07-08 Thread Matthew Auld
consistently to avoid udiv errors Fixes: f701b16d4cc5 ("drm/i915/ttm: add i915_sg_from_buddy_resource") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6379 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c

[PATCH] drm/i915/ttm: fix sg_table construction

2022-07-07 Thread Matthew Auld
t;drm/i915/ttm: add i915_sg_from_buddy_resource") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6379 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 11 +-- drivers/gpu/drm/i915/i915_scatterlist.c

Re: [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

[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

Re: [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
rm/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: [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: [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: [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

Re: [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

[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

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

2022-06-29 Thread Matthew Auld
. - 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: Matthew Auld

[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

[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

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

2022-06-29 Thread Matthew Auld
jects") 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_objec

[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: Lionel

[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 Bloomfield Cc

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

2022-06-29 Thread Matthew Auld
ed-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/gpu/dr

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

2022-06-29 Thread Matthew Auld
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 Abodunrin

[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

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

2022-06-29 Thread Matthew Auld
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_gem_cr

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

2022-06-29 Thread Matthew Auld
that 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

[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

[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

Re: [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?

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: [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: [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

[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: [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.

[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

[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

[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

[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

[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

[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

[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 Bloomfield Cc

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

2022-06-21 Thread Matthew Auld
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 Abodunrin

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

2022-06-21 Thread Matthew Auld
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_gem_cr

[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

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

2022-06-21 Thread Matthew Auld
that 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

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

2022-06-21 Thread Matthew Auld
ed-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_manager.

[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

[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

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: [PATCH] drm/i915: Improve on suspend / resume time with VT-d enabled

2022-06-17 Thread Matthew Auld
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; + /** +* Whether the system was recently restored from hi

Re: [PATCH 2/3] drm/i915: Update i915 uapi documentation

2022-06-10 Thread Matthew Auld
On 10/06/2022 08:07, Niranjana Vishwanathapura wrote: Add some missing i915 upai documentation which the new i915 VM_BIND feature documentation will be refer to. Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Matthew Auld This one looks to be standalone. If no objections should we go

Re: [Intel-gfx] [RFC v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-10 Thread Matthew Auld
On 10/06/2022 11:16, Tvrtko Ursulin wrote: On 09/06/2022 19:53, Niranjana Vishwanathapura wrote: On Thu, Jun 09, 2022 at 09:36:48AM +0100, Matthew Auld wrote: On 08/06/2022 22:32, Niranjana Vishwanathapura wrote: On Wed, Jun 08, 2022 at 10:12:05AM +0100, Matthew Auld wrote: On 08/06/2022 08

Re: [Intel-gfx] [RFC v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-09 Thread Matthew Auld
On 08/06/2022 22:32, Niranjana Vishwanathapura wrote: On Wed, Jun 08, 2022 at 10:12:05AM +0100, Matthew Auld wrote: On 08/06/2022 08:17, Tvrtko Ursulin wrote: On 07/06/2022 20:37, Niranjana Vishwanathapura wrote: On Tue, Jun 07, 2022 at 11:27:14AM +0100, Tvrtko Ursulin wrote: On 17/05/2022

Re: [RFC v3 2/3] drm/i915: Update i915 uapi documentation

2022-06-08 Thread Matthew Auld
ated context (output) */ > + __u32 ctx_id; > + > + /** > +* @flags: Supported flags are, are: > +* > +* I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS: > +* > + * Extensions may be appended to this structure and driver must check > +

Re: [Intel-gfx] [RFC v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-08 Thread Matthew Auld
On 08/06/2022 08:17, Tvrtko Ursulin wrote: On 07/06/2022 20:37, Niranjana Vishwanathapura wrote: On Tue, Jun 07, 2022 at 11:27:14AM +0100, Tvrtko Ursulin wrote: On 17/05/2022 19:32, Niranjana Vishwanathapura wrote: VM_BIND and related uapi definitions v2: Ensure proper kernel-doc

Re: [PATCH 03/10] drm/i915/uapi: expose the avail tracking

2022-05-30 Thread Matthew Auld
On 26/05/2022 09:33, Tvrtko Ursulin wrote: On 26/05/2022 09:10, Matthew Auld wrote: On 26/05/2022 08:58, Tvrtko Ursulin wrote: On 25/05/2022 19:43, Matthew Auld wrote: Vulkan would like to have a rough measure of how much device memory can in theory be allocated. Also add

Re: [PATCH 03/10] drm/i915/uapi: expose the avail tracking

2022-05-26 Thread Matthew Auld
On 26/05/2022 08:58, Tvrtko Ursulin wrote: On 25/05/2022 19:43, Matthew Auld wrote: Vulkan would like to have a rough measure of how much device memory can in theory be allocated. Also add unallocated_cpu_visible_size to track the visible portion, in case the device is using small BAR. I

[PATCH 10/10] HAX: force small BAR on dg2

2022-05-25 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 6c6f8cbd7321..119e53f5d9b1 100644 --- a/drivers/gpu

[PATCH 08/10] drm/i915/uapi: disable capturing objects on recoverable contexts

2022-05-25 Thread Matthew Auld
A non-recoverable context must be used if the user wants proper error capture on discrete platforms. In the future the kernel may want to blit the contents of some objects when later doing the capture stage. Testcase: igt@gem_exec_capture@capture-recoverable-discrete Signed-off-by: Matthew Auld

[PATCH 09/10] drm/i915: turn on small BAR support

2022-05-25 Thread Matthew Auld
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: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem

[PATCH 07/10] drm/i915/error: skip non-mappable pages

2022-05-25 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 Bloomfield Cc

[PATCH 06/10] drm/i915/uapi: add NEEDS_CPU_ACCESS hint

2022-05-25 Thread Matthew Auld
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 Abodunrin

[PATCH 05/10] drm/i915/uapi: apply ALLOC_GPU_ONLY by default

2022-05-25 Thread Matthew Auld
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_gem_cr

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