[Intel-gfx] [PATCH i-g-t 11/12] lib/i915/intel_memory_region: Add new macros and support for igt_collection

2021-05-11 Thread Matthew Auld
From: Zbigniew Kempczyński As with new memory region era we will have to cover different sets of memory regions inside the tests this patch adds support for generating subtest names according to passed memory region collection. Signed-off-by: Zbigniew Kempczyński Signed-off-by: José Roberto de

[Intel-gfx] [PATCH i-g-t 02/12] lib/i915/intel_memory_region: Add memory regions stubs

2021-05-11 Thread Matthew Auld
From: Andrzej Turko Added stubs for memory regions to make upstreaming of tests which are using this interface possible. The memory region uapi implementation in the driver is not stable yet. Thus, the full memory region interface cannot be used in lib. This commit adds stubs for this uapi to be

[Intel-gfx] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics

2021-05-11 Thread Matthew Auld
, Lukasz (1): tests/i915/gem_exec_basic/dg1: Iterate over all memory regions Lukasz Kalamarz (1): lib/i915/intel_memory_region/dg1: Add new lib to query memory region Matthew Auld (2): i915_drm.h sync tests/i915/gem_create: exercise placements extension Zbigniew Kempczyński (1): lib/i915

[Intel-gfx] [PATCH i-g-t 12/12] tests/i915/gem_exec_basic/dg1: Iterate over all memory regions

2021-05-11 Thread Matthew Auld
y: Dominik Grzegorzek Signed-off-by: Lukasz Kalamarz Signed-off-by: Vinay Belgaumkar Cc: Janulgue Abdiel Cc: Matthew Auld Cc: Katarzyna Dec Cc: Vanshidhar Konda Cc: Stuart Summers Cc: Zbigniew Kempczyński --- tests/i915/gem_exec_basic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[Intel-gfx] [PATCH i-g-t 03/12] tests/gem_gpgpu_fill: Convert from simple to standard igt_main

2021-05-11 Thread Matthew Auld
From: Dominik Grzegorzek As we need to add new test variants, convert the code to standard igt_main format so those variants can be easily accommodated. Signed-off-by: Janusz Krzysztofik Signed-off-by: Zbigniew Kempczyński --- tests/i915/gem_gpgpu_fill.c | 25 - 1 file

[Intel-gfx] [PATCH] drm/doc/rfc: drop the i915_gem_lmem.h header

2021-05-11 Thread Matthew Auld
The proper headers have now landed in include/uapi/drm/i915_drm.h, so we can drop i915_gem_lmem.h and instead just reference the real headers for pulling in the kernel doc. Suggested-by: Daniel Vetter Signed-off-by: Matthew Auld --- Documentation/gpu/rfc/i915_gem_lmem.h | 237

Re: [Intel-gfx] [PATCH] drm/doc/rfc: drop the i915_gem_lmem.h header

2021-05-12 Thread Matthew Auld
On 11/05/2021 18:29, Daniel Vetter wrote: On Tue, May 11, 2021 at 07:28:08PM +0200, Daniel Vetter wrote: On Tue, May 11, 2021 at 06:03:56PM +0100, Matthew Auld wrote: The proper headers have now landed in include/uapi/drm/i915_drm.h, so we can drop i915_gem_lmem.h and instead just reference

Re: [Intel-gfx] [PATCH 7/7] drm/i915/lmem: Verify checks for lmem residency

2021-05-12 Thread Matthew Auld
On Tue, 11 May 2021 at 14:26, Thomas Hellström wrote: > > Since objects can be migrated or evicted when not pinned or locked, > update the checks for lmem residency or future residency so that > the value returned is not immediately stale. > > Signed-off-by: Thomas Hellström > --- > drivers/gpu/

Re: [Intel-gfx] [PATCH 3/7] drm/i915/ttm, drm/ttm: Initialize the ttm device and memory managers.

2021-05-12 Thread Matthew Auld
On Tue, 11 May 2021 at 14:26, Thomas Hellström wrote: > > Temporarily remove the buddy allocator and related selftests > and hook up the TTM range manager for i915 regions. > > In order to support some of the mock region-related selftests, we need to > be able to initialize the TTM range-manager s

[Intel-gfx] [PATCH] drm/i915/gem: Pin the L-shape quirked object as unshrinkable

2021-05-12 Thread Matthew Auld
ces: https://gitlab.freedesktop.org/drm/intel/-/issues/3293 Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/dr

Re: [Intel-gfx] [PATCH 6/7] drm/i915/ttm, drm/ttm: Introduce a TTM i915 gem object backend

2021-05-12 Thread Matthew Auld
On Tue, 11 May 2021 at 14:26, Thomas Hellström wrote: > > Most logical place to introduce TTM buffer objects is as an i915 > gem object backend. We need to add some ops to account for added > functionality like delayed delete and LRU list manipulation. > > Initially we support only LMEM and SYSTEM

[Intel-gfx] [PATCH v2] drm/i915/gem: Pin the L-shape quirked object as unshrinkable

2021-05-13 Thread Matthew Auld
shrinking Fixes: 0175969e489a ("drm/i915/gem: Use shrinkable status for unknown swizzle quirks") References: https://gitlab.freedesktop.org/drm/intel/-/issues/3293 Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_g

[Intel-gfx] [PATCH] drm/i915/gem: Pin the L-shape quirked object as unshrinkable

2021-05-17 Thread Matthew Auld
Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Cc: # v5.12+ --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 11 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/dr

Re: [Intel-gfx] [PATCH 4/4] i915: fix remap_io_sg to verify the pgprot

2021-05-17 Thread Matthew Auld
On Mon, 17 May 2021 at 14:11, Christoph Hellwig wrote: > > On Mon, May 17, 2021 at 04:09:42PM +0300, Serge Belyshev wrote: > > Christoph Hellwig writes: > > > > > As an ad-hoc experiment: can you replace the call to remap_pfn_range > > > with remap_pfn_range_notrack (and export it if you build i

Re: [Intel-gfx] [PATCH v2 03/15] drm/i915: Fix i915_sg_page_sizes to record dma segments rather than physical pages

2021-05-18 Thread Matthew Auld
by: Thomas Hellström Reviewed-by: Matthew Auld ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v2 05/15] drm/i915/ttm Initialize the ttm device and memory managers

2021-05-18 Thread Matthew Auld
t; Signed-off-by: Thomas Hellström > --- > v2: > - Fix an error unwind in lmem_get_pages() (Reported by Matthew Auld) > - Break out and modify usage of i915_sg_dma_sizes() (Reported by Mattew Auld) > - Break out TTM changes to a separate patch (Reported by Christian König) > --- >

Re: [Intel-gfx] [PATCH v2 05/15] drm/i915/ttm Initialize the ttm device and memory managers

2021-05-18 Thread Matthew Auld
t; Signed-off-by: Thomas Hellström > --- > v2: > - Fix an error unwind in lmem_get_pages() (Reported by Matthew Auld) > - Break out and modify usage of i915_sg_dma_sizes() (Reported by Mattew Auld) > - Break out TTM changes to a separate patch (Reported by Christian König) > --- >

Re: [Intel-gfx] [PATCH 4/4] i915: fix remap_io_sg to verify the pgprot

2021-05-18 Thread Matthew Auld
On Tue, 18 May 2021 at 14:21, Christoph Hellwig wrote: > > On Mon, May 17, 2021 at 06:06:44PM +0100, Matthew Auld wrote: > > > Looks like it is caused by the validation failure then. Which means the > > > existing code is doing something wrong in its choice of the page

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics

2021-05-19 Thread Matthew Auld
On Tue, 11 May 2021 at 17:52, Matthew Auld wrote: > > Just the really basic stuff, which unlocks adding more interesting testcases > later, like gem_lmem_swapping. > > On the kernel side we landed the uAPI bits[1] behind CONFIG_BROKEN, which is > already enabled in CI build

Re: [Intel-gfx] [PATCH v2 10/15] drm/i915/ttm: Introduce a TTM i915 gem object backend

2021-05-19 Thread Matthew Auld
a separate patch (Reported by > Christian König). > - Fix an unhandled error (Reported by Matthew Auld and Maarten Lankhorst) > - Remove a stray leftover sg_table allocation (Reported by Matthew Auld) > - Use ttm_tt_unpopulate() rather than ttm_tt_destroy() in the purge path >

Re: [Intel-gfx] [PATCH v2 11/15] drm/i915/lmem: Verify checks for lmem residency

2021-05-19 Thread Matthew Auld
On Tue, 18 May 2021 at 09:28, Thomas Hellström wrote: > > Since objects can be migrated or evicted when not pinned or locked, > update the checks for lmem residency or future residency so that > the value returned is not immediately stale. > > Signed-off-by: Thomas Hellström Re

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics

2021-05-19 Thread Matthew Auld
On Wed, 19 May 2021 at 09:49, Petri Latvala wrote: > > On Wed, May 19, 2021 at 09:13:37AM +0100, Matthew Auld wrote: > > On Tue, 11 May 2021 at 17:52, Matthew Auld wrote: > > > > > > Just the really basic stuff, which unlocks adding more interesting >

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 00/12] DG1/LMEM uAPI basics

2021-05-19 Thread Matthew Auld
On Wed, 19 May 2021 at 12:00, Petri Latvala wrote: > > On Wed, May 19, 2021 at 11:45:17AM +0100, Matthew Auld wrote: > > On Wed, 19 May 2021 at 09:49, Petri Latvala wrote: > > > > > > On Wed, May 19, 2021 at 09:13:37AM +0100, Matthew Auld wrote: > > > >

[Intel-gfx] [PATCH i-g-t 0/9] DG1/LMEM uAPI basics v2

2021-05-19 Thread Matthew Auld
: Use memory region interface tests/i915/gem_media_fill: Use memory region interface Dominik Grzegorzek (1): tests/gem_gpgpu_fill: Convert from simple to standard igt_main Kalamarz, Lukasz (1): tests/i915/gem_exec_basic: Iterate over all memory regions Matthew Auld (2): i915_drm.h sync

[Intel-gfx] [PATCH i-g-t 1/9] i915_drm.h sync

2021-05-19 Thread Matthew Auld
Sync to get gem_create_ext and the regions query stuff. Generated from kernel commit: 2459e56fd8af ("drm/i915/uapi: implement object placement extension") Signed-off-by: Matthew Auld --- include/drm-uapi/i915_drm.h | 394 1 file changed, 360

[Intel-gfx] [PATCH i-g-t 3/9] lib/i915/intel_memory_region: Add new memory region lib

2021-05-19 Thread Matthew Auld
-authored-by: Lukasz Kalamarz Co-authored-by: Zbigniew Kempczynski Signed-off-by: Andrzej Turko Signed-off-by: Lukasz Kalamarz Signed-off-by: Zbigniew Kempczynski Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld --- lib/i915/intel_memory_region.c | 441

[Intel-gfx] [PATCH i-g-t 2/9] lib/i915/gem_create: Add gem_create_ext

2021-05-19 Thread Matthew Auld
-off-by: Matthew Auld --- benchmarks/gem_blt.c| 2 +- benchmarks/gem_busy.c | 2 +- benchmarks/gem_create.c | 2 +- benchmarks/gem_exec_ctx.c | 2 +- benchmarks/gem_exec_fault.c | 2 +- benchmarks/gem_exec_nop.c

[Intel-gfx] [PATCH i-g-t 4/9] tests/gem_gpgpu_fill: Convert from simple to standard igt_main

2021-05-19 Thread Matthew Auld
From: Dominik Grzegorzek As we need to add new test variants, convert the code to standard igt_main format so those variants can be easily accommodated. Signed-off-by: Janusz Krzysztofik Signed-off-by: Zbigniew Kempczyński Signed-off-by: Matthew Auld --- tests/i915/gem_gpgpu_fill.c | 25

[Intel-gfx] [PATCH i-g-t 6/9] tests/i915/gem_gpgpu_fill: Use memory region interface

2021-05-19 Thread Matthew Auld
From: Andrzej Turko Converted the test gem_gpgpu_fill to use memory region uapi. Signed-off-by: Andrzej Turko Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld --- tests/i915/gem_gpgpu_fill.c | 42 ++--- 1 file

[Intel-gfx] [PATCH i-g-t 5/9] tests/i915/gem_exec_basic: Use memory region interface

2021-05-19 Thread Matthew Auld
From: Andrzej Turko Converted the test gem_exec_basic to use the memory region uapi. Signed-off-by: Andrzej Turko Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld --- tests/i915/gem_exec_basic.c | 50 + 1

[Intel-gfx] [PATCH i-g-t 7/9] tests/i915/gem_media_fill: Use memory region interface

2021-05-19 Thread Matthew Auld
From: Andrzej Turko Converted the test gem_media_fill to use memory region uapi. Signed-off-by: Andrzej Turko Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld --- tests/i915/gem_media_fill.c | 57 - 1 file

[Intel-gfx] [PATCH i-g-t 8/9] tests/i915/gem_create: exercise placements extension

2021-05-19 Thread Matthew Auld
Add some explicit testcases for the create_ext placements extension. Signed-off-by: Matthew Auld Cc: Dominik Grzegorzek Cc: Joonas Lahtinen Signed-off-by: Matthew Auld --- tests/i915/gem_create.c | 188 1 file changed, 188 insertions(+) diff --git a

[Intel-gfx] [PATCH i-g-t 9/9] tests/i915/gem_exec_basic: Iterate over all memory regions

2021-05-19 Thread Matthew Auld
y: Dominik Grzegorzek Signed-off-by: Lukasz Kalamarz Signed-off-by: Vinay Belgaumkar Cc: Janulgue Abdiel Cc: Matthew Auld Cc: Katarzyna Dec Cc: Vanshidhar Konda Cc: Stuart Summers Cc: Zbigniew Kempczyński Signed-off-by: Matthew Auld --- tests/i915/gem_exec_basic.c | 3 ++- 1 file changed, 2 insert

[Intel-gfx] [PATCH] drm/i915: Use DRIVER_NAME for tracing unattached requests

2021-05-20 Thread Matthew Auld
o") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Chintan M Patel Cc: Andi Shyti Cc: # v5.7+ Signed-off-by: Matthew Auld --- .../drm/i915/gt/intel_execlists_submission.c | 20 ++- drivers/gpu/drm/i915/i915_request.c | 7 ++- 2 files changed, 21 inserti

Re: [Intel-gfx] [PATCH] drm/i915/gt: fix typo issue

2021-05-20 Thread Matthew Auld
On Thu, 20 May 2021 at 09:23, samirweng1979 wrote: > > From: wengjianfeng > > change 'freqency' to 'frequency'. > > Signed-off-by: wengjianfeng Pushed to intel-gt-next. Thanks. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.f

Re: [Intel-gfx] Bug: 5.12.5 - list_add double add at __i915_gem_object_make_shrinkable+0xa6/0xe0

2021-05-24 Thread Matthew Auld
On Mon, 24 May 2021 at 13:05, Hillf Danton wrote: > > On Sun, 23 May 2021 12:47:34 -0700 Philippe Troin wrote: > > Found the following bug on a FUJITSU LIFEBOOK S6520. > > > > The kernel crash happens when selecting a user from the gdm login > > screen right after boot. > > The same hardware has n

Re: [Intel-gfx] [PATCH v3 07/12] drm, drm/i915: Move the memcpy_from_wc functionality to core drm

2021-05-24 Thread Matthew Auld
mcpy_from_wc(_dst, _src, _len) (false) > +#define drm_has_memcpy_from_wc() (false) Does the compiler not complain for these on !x86, if called without checking the result of the statement? Maybe just make these function stubs? Otherwise, Reviewed-by: Matthew Auld > +#define drm_una

Re: [Intel-gfx] [PATCH v3 08/12] drm/ttm: Use drm_memcpy_from_wc_dbm for TTM bo moves

2021-05-24 Thread Matthew Auld
On Fri, 21 May 2021 at 16:33, Thomas Hellström wrote: > > Use fast wc memcpy for reading out of wc memory for TTM bo moves. > > Cc: Dave Airlie > Cc: Christian König > Cc: Daniel Vetter > Signed-off-by: Thomas Hellström > --- > drivers/gpu/drm/ttm/ttm_bo_util.c | 9 - > 1 file changed

Re: [Intel-gfx] [PATCH v3 06/12] drm/ttm: Add a generic TTM memcpy move for page-based iomem

2021-05-25 Thread Matthew Auld
On Fri, 21 May 2021 at 16:33, Thomas Hellström wrote: > > The internal ttm_bo_util memcpy uses ioremap functionality, and while it > probably might be possible to use it for copying in- and out of > sglist represented io memory, using io_mem_reserve() / io_mem_free() > callbacks, that would cause

Re: [Intel-gfx] [PATCH v3 06/12] drm/ttm: Add a generic TTM memcpy move for page-based iomem

2021-05-25 Thread Matthew Auld
On Tue, 25 May 2021 at 10:32, Thomas Hellström wrote: > > > On 5/25/21 11:18 AM, Matthew Auld wrote: > > On Fri, 21 May 2021 at 16:33, Thomas Hellström > > wrote: > >> The internal ttm_bo_util memcpy uses ioremap functionality, and while it > >> probably

Re: [Intel-gfx] [PATCH v3 09/12] drm/ttm: Document and optimize ttm_bo_pipeline_gutting()

2021-05-25 Thread Matthew Auld
On Fri, 21 May 2021 at 16:33, Thomas Hellström wrote: > > If the bo is idle when calling ttm_bo_pipeline_gutting(), we unnecessarily > create a ghost object and push it out to delayed destroy. > Fix this by adding a path for idle, and document the function. > > Also avoid having the bo end up in a

Re: [Intel-gfx] [PATCH] drm/i915/display: relax 2big checking around initial fb

2021-05-25 Thread Matthew Auld
On Fri, 7 May 2021 at 10:12, Matthew Auld wrote: > > From: Chris Wilson > > The kernel prefers enabling fbc over the initial fb, since this leads to > actual runtime power savings, so if the initial fb is deemed too big > using some heuristic, then we simply skip alloca

[Intel-gfx] [PATCH v2] drm/i915/display: relax 2big checking around initial fb

2021-05-26 Thread Matthew Auld
NSOLE/CONFIG_FRAMEBUFFER_CONSOLE Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Lee Shawn C Cc: Ville Syrjälä Cc: Daniel Vetter Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver

[Intel-gfx] [PATCH i-g-t v3 2/9] lib/i915/gem_create: Add gem_create_ext

2021-05-26 Thread Matthew Auld
-off-by: Matthew Auld Acked-by: Petri Latvala --- benchmarks/gem_blt.c| 2 +- benchmarks/gem_busy.c | 2 +- benchmarks/gem_create.c | 2 +- benchmarks/gem_exec_ctx.c | 2 +- benchmarks/gem_exec_fault.c | 2

[Intel-gfx] [PATCH i-g-t v3 3/9] lib/i915/intel_memory_region: Add new memory region lib

2021-05-26 Thread Matthew Auld
-authored-by: Lukasz Kalamarz Co-authored-by: Zbigniew Kempczynski Signed-off-by: Andrzej Turko Signed-off-by: Lukasz Kalamarz Signed-off-by: Zbigniew Kempczynski Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld Acked-by: Petri Latvala --- lib/i915

[Intel-gfx] [PATCH i-g-t v3 5/9] tests/i915/gem_exec_basic: Use memory region interface

2021-05-26 Thread Matthew Auld
From: Andrzej Turko Converted the test gem_exec_basic to use the memory region uapi. Signed-off-by: Andrzej Turko Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld Acked-by: Petri Latvala --- tests/i915/gem_exec_basic.c | 50

[Intel-gfx] [PATCH i-g-t v3 7/9] tests/i915/gem_media_fill: Use memory region interface

2021-05-26 Thread Matthew Auld
From: Andrzej Turko Converted the test gem_media_fill to use memory region uapi. Signed-off-by: Andrzej Turko Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld Acked-by: Petri Latvala Reviewed-by: Zbigniew Kempczyński --- tests/i915

[Intel-gfx] [PATCH i-g-t v3 9/9] tests/i915/gem_exec_basic: Iterate over all memory regions

2021-05-26 Thread Matthew Auld
y: Dominik Grzegorzek Signed-off-by: Lukasz Kalamarz Signed-off-by: Vinay Belgaumkar Cc: Janulgue Abdiel Cc: Matthew Auld Cc: Katarzyna Dec Cc: Vanshidhar Konda Cc: Stuart Summers Cc: Zbigniew Kempczyński Signed-off-by: Matthew Auld Acked-by: Petri Latvala --- tests/i915/gem_exec_basic.c | 3 +

[Intel-gfx] [PATCH i-g-t v3 1/9] i915_drm.h sync

2021-05-26 Thread Matthew Auld
Sync to get gem_create_ext and the regions query stuff. Generated from kernel commit: 2459e56fd8af ("drm/i915/uapi: implement object placement extension") Signed-off-by: Matthew Auld Acked-by: Petri Latvala --- include/drm-uapi/i915_drm.h | 394 --

[Intel-gfx] [PATCH i-g-t v3 4/9] tests/gem_gpgpu_fill: Convert from simple to standard igt_main

2021-05-26 Thread Matthew Auld
From: Dominik Grzegorzek As we need to add new test variants, convert the code to standard igt_main format so those variants can be easily accommodated. Signed-off-by: Janusz Krzysztofik Signed-off-by: Matthew Auld Reviewed-by: Zbigniew Kempczyński Acked-by: Petri Latvala --- tests/i915

[Intel-gfx] [PATCH i-g-t v3 6/9] tests/i915/gem_gpgpu_fill: Use memory region interface

2021-05-26 Thread Matthew Auld
From: Andrzej Turko Converted the test gem_gpgpu_fill to use memory region uapi. Signed-off-by: Andrzej Turko Cc: Zbigniew Kempczynski Cc: Dominik Grzegorzek Cc: Petri Latvala Signed-off-by: Matthew Auld Acked-by: Petri Latvala Reviewed-by: Zbigniew Kempczyński --- tests/i915

[Intel-gfx] [PATCH i-g-t v3 8/9] tests/i915/gem_create: exercise placements extension

2021-05-26 Thread Matthew Auld
Add some explicit testcases for the create_ext placements extension. Signed-off-by: Matthew Auld Cc: Dominik Grzegorzek Cc: Joonas Lahtinen Acked-by: Petri Latvala --- tests/i915/gem_create.c | 188 1 file changed, 188 insertions(+) diff --git a

Re: [Intel-gfx] [PATCH 12/12] drm/i915/gem: Manage all set-domain waits explicitly

2021-05-26 Thread Matthew Auld
On 26/05/2021 15:14, Tvrtko Ursulin wrote: From: Chris Wilson Only perform the domain transition under the object lock, and push the required waits to outside the lock. v2 (Tvrtko): * Rebase. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld # v1 Signed-off-by: Tvrtko Ursulin

[Intel-gfx] [PATCH] Revert "i915: use io_mapping_map_user"

2021-05-27 Thread Matthew Auld
apping_map_user") Cc: Christoph Hellwig Cc: Daniel Vetter Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/gem/i915_gem_mman.c | 9 ++--- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_mm.c | 44 +

Re: [Intel-gfx] [PATCH] drm/i915: Ditch the i915_gem_ww_ctx loop member

2021-08-16 Thread Matthew Auld
On Mon, 16 Aug 2021 at 09:49, Thomas Hellström wrote: > > It's only used by the for_i915_gem_ww() macro and we can use > the (typically) on-stack _err variable in its place. > > While initially setting the _err variable to -EDEADLK to enter the > loop, we clear it before actually entering using fe

Re: [Intel-gfx] [PATCH v2] drm/i915: Ditch the i915_gem_ww_ctx loop member

2021-08-18 Thread Matthew Auld
On Mon, 16 Aug 2021 at 18:14, Thomas Hellström wrote: > > It's only used by the for_i915_gem_ww() macro and we can use > the (typically) on-stack _err variable in its place. > > v2: > - Don't clear the _err variable when entering the loop > (Matthew Auld, Maarten

[Intel-gfx] [PATCH 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-18 Thread Matthew Auld
This should give a more complete view of the various bits of internal resource manager state, for device local-memory. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/i915_debugfs.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a

[Intel-gfx] [PATCH 1/2] drm/i915/buddy: add some pretty printing

2021-08-18 Thread Matthew Auld
. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/i915_buddy.c | 45 +++ drivers/gpu/drm/i915/i915_buddy.h | 8 drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 20 - 3 files changed, 72 insertions(+), 1 deletion

[Intel-gfx] [PATCH] drm/i915/ttm: ensure we release the intel_memory_region

2021-08-18 Thread Matthew Auld
If the ttm_bo_init_reserved() call fails ensure we also release the region, otherwise we leak the reference, or worse hit some uaf, when we start using the objects.list. Also remove the make_unshrinkable call here, which doesn't do anything. Signed-off-by: Matthew Auld Cc: Thomas Hell

Re: [Intel-gfx] [PATCH] drm/i915/ttm: ensure we release the intel_memory_region

2021-08-19 Thread Matthew Auld
On Thu, 19 Aug 2021 at 08:25, Thomas Hellström wrote: > > On Wed, 2021-08-18 at 18:12 +0100, Matthew Auld wrote: > > If the ttm_bo_init_reserved() call fails ensure we also release the > > region, otherwise we leak the reference, or worse hit some uaf, when > > we > >

[Intel-gfx] [PATCH v2 1/2] drm/i915/buddy: add some pretty printing

2021-08-19 Thread Matthew Auld
. v2(Thomas): - s/MB/MiB - s/KB/KiB Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/i915_buddy.c | 45 +++ drivers/gpu/drm/i915/i915_buddy.h | 8 drivers/gpu/drm/i915

[Intel-gfx] [PATCH v2 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-19 Thread Matthew Auld
This should give a more complete view of the various bits of internal resource manager state, for device local-memory. v2(Thomas): - Move the region printing into a nice helper Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/i915_debugfs.c| 4

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [v2,1/2] drm/i915/buddy: add some pretty printing

2021-08-19 Thread Matthew Auld
On Thu, 19 Aug 2021 at 14:04, Patchwork wrote: > > Patch Details > Series:series starting with [v2,1/2] drm/i915/buddy: add some pretty printing > URL:https://patchwork.freedesktop.org/series/93819/ > State:failure > Details:https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20853/index.html > > C

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Ditch the i915_gem_ww_ctx loop member (rev2)

2021-08-19 Thread Matthew Auld
On Tue, 17 Aug 2021 at 18:28, Patchwork wrote: > > Patch Details > Series:drm/i915: Ditch the i915_gem_ww_ctx loop member (rev2) > URL:https://patchwork.freedesktop.org/series/93711/ > State:failure > Details:https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20834/index.html > > CI Bug Log - chan

Re: [Intel-gfx] [RFC 03/13] drm/i915/xehpsdv: enforce min GTT alignment

2021-08-27 Thread Matthew Auld
On Sun, 22 Aug 2021 at 17:30, Ayaz A Siddiqui wrote: > > From: Matthew Auld > > For local-memory objects we need to align the GTT addresses to 64K, both > for the ppgtt and ggtt. > > Signed-off-by: Matthew Auld > Signed-off-by: Stuart Summers > Cc: Joonas L

Re: [Intel-gfx] [RFC 04/13] drm/i915/gem: Remove unused i915_gem_lmem_obj_ops

2021-08-27 Thread Matthew Auld
On Sun, 22 Aug 2021 at 17:30, Ayaz A Siddiqui wrote: > > Removing extern declaration of i915_gem_lmem_obj_ops > from i915_gem_lmem.h. > > Signed-off-by: Ayaz A Siddiqui Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH 2/7] drm/i915/guc: put all guc objects in lmem when available

2021-09-01 Thread Matthew Auld
because all objects are > allocated during driver load and if we have issues with lmem at that point > something is seriously wrong with the system, so no point in trying to > handle it. > > Cc: Matthew Auld > Cc: Abdiel Janulgue > Cc: Michal Wajdeczko > Cc: Vinay Belgaum

[Intel-gfx] [PATCH] drm/i915/request: fix early tracepoints

2021-09-03 Thread Matthew Auld
, and will therefore already hold the same value, it shouldn't matter. We still leave the spin_lock_init() in the ctor, since we can't re-init the rq->lock in case it is already held. Fixes: 855e39e65cfc ("drm/i915: Initialise basic fence before acquiring seqno") Signed-off-by:

[Intel-gfx] [PATCH] drm/i915/gtt: add some flushing for the 64K GTT path

2021-09-03 Thread Matthew Auld
If we need to mark the PDE as operating in 64K GTT mode, we should be paranoid and flush the extra writes, like we already do for the PTEs. On some platforms the clflush can apparently add the just the right amount of magical delay to force the GPU to see the updated entry. Signed-off-by: Matthew

[Intel-gfx] [PATCH] drm/i915/selftests: fixup igt_shrink_thp

2021-09-06 Thread Matthew Auld
forcing I915_SHRINK_ACTIVE. v2: Some machine in the shard runs doesn't seem to have any available swap when running this test. Try to handle this. Signed-off-by: Matthew Auld Cc: Tvrtko Ursulin Cc: Thomas Hellström Reviewed-by: Tvrtko Ursulin #v1 --- .../gpu/drm/i915/gem/selftests/huge_pa

Re: [Intel-gfx] [PATCH] drm/i915/selftests: fixup igt_shrink_thp

2021-09-06 Thread Matthew Auld
On 06/09/2021 13:19, Tvrtko Ursulin wrote: On 06/09/2021 10:17, Matthew Auld wrote: Since the object might still be active here, the shrink_all will simply ignore it, which blows up in the test, since the pages will still be there. Currently THP is disabled which should result in the test

Re: [Intel-gfx] [PATCH] drm/i915/selftests: fixup igt_shrink_thp

2021-09-06 Thread Matthew Auld
On 06/09/2021 13:53, Tvrtko Ursulin wrote: On 06/09/2021 13:30, Matthew Auld wrote: On 06/09/2021 13:19, Tvrtko Ursulin wrote: On 06/09/2021 10:17, Matthew Auld wrote: Since the object might still be active here, the shrink_all will simply ignore it, which blows up in the test, since the

Re: [Intel-gfx] [PATCH v2 1/6] drm/i915/ttm: Implement a function to copy the contents of two TTM-base objects

2021-09-07 Thread Matthew Auld
On 06/09/2021 17:55, Thomas Hellström wrote: When backing up or restoring contents of pinned objects at suspend / resume time we need to allocate a new object as the backup. Add a function to facilitate copies between the two. Some data needs to be copied before the migration context is ready for

Re: [Intel-gfx] [PATCH v2 2/6] drm/i915/gem: Implement a function to process all gem objects of a region

2021-09-07 Thread Matthew Auld
On 06/09/2021 17:55, Thomas Hellström wrote: An upcoming common pattern is to traverse the region object list and perform certain actions on all objects in a region. It's a little tricky to get the list locking right, in particular since a gem object may change region unless it's pinned or the ob

Re: [Intel-gfx] [PATCH v2 3/6] drm/i915 Implement LMEM backup and restore for suspend / resume

2021-09-07 Thread Matthew Auld
On 06/09/2021 17:55, Thomas Hellström wrote: Just evict unpinned objects to system. For pinned LMEM objects, make a backup system object and blit the contents to that. Backup is performed in three steps, 1: Opportunistically evict evictable objects using the gpu blitter. 2: After gt idle, evict

Re: [Intel-gfx] [PATCH v2 5/6] drm/i915: Don't back up pinned LMEM context images and rings during suspend

2021-09-08 Thread Matthew Auld
On 06/09/2021 17:55, Thomas Hellström wrote: Pinned context images are now reset during resume. Don't back them up, and assuming that rings can be assumed empty at suspend, don't back them up either. Introduce a new object flag, I915_BO_ALLOC_PM_VOLATILE meaning that an object is allowed to lose

Re: [Intel-gfx] [PATCH v2 5/6] drm/i915: Don't back up pinned LMEM context images and rings during suspend

2021-09-08 Thread Matthew Auld
On 06/09/2021 17:55, Thomas Hellström wrote: Pinned context images are now reset during resume. Don't back them up, and assuming that rings can be assumed empty at suspend, don't back them up either. Introduce a new object flag, I915_BO_ALLOC_PM_VOLATILE meaning that an object is allowed to lose

Re: [Intel-gfx] [PATCH v2 5/6] drm/i915: Don't back up pinned LMEM context images and rings during suspend

2021-09-08 Thread Matthew Auld
On 08/09/2021 13:26, Thomas Hellström wrote: On Wed, 2021-09-08 at 12:07 +0100, Matthew Auld wrote: On 06/09/2021 17:55, Thomas Hellström wrote: Pinned context images are now reset during resume. Don't back them up, and assuming that rings can be assumed empty at suspend, don't ba

Re: [Intel-gfx] [PATCH] drm/i915/request: fix early tracepoints

2021-09-09 Thread Matthew Auld
On 08/09/2021 18:38, Daniel Vetter wrote: On Fri, Sep 03, 2021 at 12:24:05PM +0100, Matthew Auld wrote: Currently we blow up in trace_dma_fence_init, when calling into get_driver_name or get_timeline_name, since both the engine and context might be NULL(or contain some garbage address) in the

Re: [Intel-gfx] [PATCH v7 2/3] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-22 Thread Matthew Auld
> flags and caching before anyone else gets hold of the object. > > Signed-off-by: Thomas Hellström > Reviewed-by: Matthew Auld > --- > v6: > - Rebase on accelerated ttm moves. > --- > @@ -775,14 +845,13 @@ int __i915_gem_ttm_object_init(struct > int

[Intel-gfx] [PATCH] drm/i915/ttm: consider all placements for the page alignment

2021-06-22 Thread Matthew Auld
Just checking the current region is not enough, if we later migrate the object somewhere else. For example if the placements are {SMEM, LMEM}, then we might get this wrong. Another idea might be to make the page_alignment part of the ttm_place, instead of the BO. Signed-off-by: Matthew Auld Cc

Re: [Intel-gfx] [PATCH v7 3/3] drm/i915/ttm: Use TTM for system memory

2021-06-22 Thread Matthew Auld
mented from our ttm_tt_populate callback. We can then also reuse our > own very elaborate shrinker for that memory. > > Signed-off-by: Thomas Hellström > Reviewed-by: Matthew Auld > --- > v2: > - Fix IS_ERR_OR_NULL() check to IS_ERR() (Reported by Matthew Auld) > v3: &g

Re: [Intel-gfx] [PATCH] drm/i915/ttm: consider all placements for the page alignment

2021-06-22 Thread Matthew Auld
On Tue, 22 Jun 2021 at 11:11, Thomas Hellström wrote: > > > On 6/22/21 11:58 AM, Matthew Auld wrote: > > Just checking the current region is not enough, if we later migrate the > > object somewhere else. For example if the placements are {SMEM, LMEM}, > > then we mi

Re: [Intel-gfx] [PATCH] drm/i915/ttm: consider all placements for the page alignment

2021-06-22 Thread Matthew Auld
On 22/06/2021 13:29, Thomas Hellström wrote: On 6/22/21 2:15 PM, Matthew Auld wrote: On Tue, 22 Jun 2021 at 11:11, Thomas Hellström wrote: On 6/22/21 11:58 AM, Matthew Auld wrote: Just checking the current region is not enough, if we later migrate the object somewhere else. For example if

[Intel-gfx] [PATCH 1/3] drm/i915/ttm: consider all placements for the page alignment

2021-06-23 Thread Matthew Auld
Just checking the current region is not enough, if we later migrate the object somewhere else. For example if the placements are {SMEM, LMEM}, then we might get this wrong. Another idea might be to make the page_alignment part of the ttm_place, instead of the BO. Signed-off-by: Matthew Auld Cc

[Intel-gfx] [PATCH 3/3] drm/i915/gtt: ignore min_page_size for paging structures

2021-06-23 Thread Matthew Auld
The min_page_size is only needed for pages inserted into the GTT, and for our paging structures we only need at most 4K bytes, so simply ignore the min_page_size restrictions here, otherwise we might see some severe overallocation on some devices. Signed-off-by: Matthew Auld Cc: Thomas Hellström

[Intel-gfx] [PATCH 2/3] drm/i915: support forcing the page size with lmem

2021-06-23 Thread Matthew Auld
-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_create.c| 2 +- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 33 +- drivers/gpu/drm/i915/gem/i915_gem_lmem.h | 5 ++ drivers/gpu/drm/i915/gem/i915_gem_region.c| 10 ++- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 3/3] drm/i915/gtt: ignore min_page_size for paging structures

2021-06-23 Thread Matthew Auld
On 23/06/2021 12:51, Thomas Hellström wrote: On 6/23/21 1:26 PM, Matthew Auld wrote: The min_page_size is only needed for pages inserted into the GTT, and for our paging structures we only need at most 4K bytes, so simply ignore the min_page_size restrictions here, otherwise we might see some

Re: [Intel-gfx] [PATCH 3/3] drm/i915/gtt: ignore min_page_size for paging structures

2021-06-23 Thread Matthew Auld
On 23/06/2021 14:32, Thomas Hellström wrote: On 6/23/21 1:26 PM, Matthew Auld wrote: The min_page_size is only needed for pages inserted into the GTT, and for our paging structures we only need at most 4K bytes, so simply ignore the min_page_size restrictions here, otherwise we might see some

[Intel-gfx] [PATCH v2 1/2] drm/i915: support forcing the page size with lmem

2021-06-23 Thread Matthew Auld
buddy_man, and let the user override it with the page-alignment, which looks cleaner Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_create.c| 2 +- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 33 +- drivers/gpu/drm/i915/gem/i915_gem_lmem.h

[Intel-gfx] [PATCH v2 2/2] drm/i915/gtt: ignore min_page_size for paging structures

2021-06-23 Thread Matthew Auld
: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gt/intel_gtt.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c index 084ea65d59c0..f7e0352edb62

[Intel-gfx] [PATCH] drm/i915/ttm: fix static warning

2021-06-23 Thread Matthew Auld
warning: symbol 'i915_gem_ttm_obj_ops' was not declared. Should it be static? Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/d

[Intel-gfx] [PATCH] drm/i915: add back the avail tracking

2021-06-23 Thread Matthew Auld
ernal fragmentation, or having to remember to track things for all possible interfaces that might want to allocate or reserve pages. v2(Thomas): add some more kernel doc Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/i915_buddy.c

Re: [Intel-gfx] [PATCH] drm/i915: add back the avail tracking

2021-06-23 Thread Matthew Auld
On Wed, 23 Jun 2021 at 20:15, Daniel Vetter wrote: > > On Wed, Jun 23, 2021 at 06:27:06PM +0100, Matthew Auld wrote: > > Looks like it got lost along the way, so add it back. This is needed for > > the region query uAPI where we want to report a snapshot of how much >

[Intel-gfx] [PATCH 1/2] drm/i915/dg1: Compute MEM Bandwidth using MCHBAR

2021-06-24 Thread Matthew Auld
: Ville Syrjälä Cc: Matt Roper Cc: Jani Saarinen Signed-off-by: Clint Taylor Signed-off-by: Jani Nikula Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/display/intel_bw.c | 52 + 1 file changed, 52 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_bw.c

[Intel-gfx] [PATCH 2/2] drm/i915/dg1: Double memory bandwidth available

2021-06-24 Thread Matthew Auld
From: Clint Taylor Use MCHBAR Gear_type information to compute memory bandwidth available during MCHBAR calculations. Tested-by: Swati Sharma Cc: Lucas De Marchi Cc: Swati Sharma Cc: Ville Syrjälä Signed-off-by: Clint Taylor Signed-off-by: Jani Nikula Signed-off-by: Matthew Auld

Re: [Intel-gfx] [PATCH] drm/i915: Reinstate the mmap ioctl for some platforms

2021-06-24 Thread Matthew Auld
le mmap ioctl for gen12+") > Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH v3 1/2] drm/i915: support forcing the page size with lmem

2021-06-25 Thread Matthew Auld
buddy_man, and let the user override it with the page-alignment, which looks cleaner v3: rebase on ttm sys changes Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_create.c| 2 +- drivers/gpu/drm/i915/gem/i915_gem_lmem.c

[Intel-gfx] [PATCH v3 2/2] drm/i915/gtt: ignore min_page_size for paging structures

2021-06-25 Thread Matthew Auld
: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gt/intel_gtt.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c index 084ea65d59c0..f7e0352edb62

Re: [Intel-gfx] [PATCH 1/4] drm/i915/gem: Implement object migration

2021-06-25 Thread Matthew Auld
On 24/06/2021 19:31, Thomas Hellström wrote: Introduce an interface to migrate objects between regions. This is primarily intended to migrate objects to LMEM for display and to SYSTEM for dma-buf, but might be reused in one form or another for performande-based migration. Signed-off-by: Thomas H

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