Re: [PATCH] drm/tests: mm: Convert to drm_dbg_printer

2024-02-09 Thread Intel
On 2/9/24 15:08, Michał Winiarski wrote: Fix one of the tests in drm_mm that was not converted prior to drm_debug_printer removal, causing tests build failure. Fixes: e154c4fc7bf2d ("drm: remove drm_debug_printer in favor of drm_dbg_printer") Signed-off-by: Michał Winiarski --- drivers/gpu

Re: [Linaro-mm-sig] Re: [PATCH] dma-buf: fix check in dma_resv_add_fence

2023-11-27 Thread Intel
On 11/27/23 14:24, Christian König wrote: Ping? Can I get an rb or acked-by for that? Thanks, Christian. Am 15.11.23 um 10:30 schrieb Christian König: It's valid to add the same fence multiple times to a dma-resv object and we shouldn't need one extra slot for each. Signed-off-by: Christian

Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation

2023-08-31 Thread Intel
On 8/31/23 21:07, Danilo Krummrich wrote: On Thu, Aug 31, 2023 at 06:53:01PM +0200, Thomas Hellström (Intel) wrote: Hi, On 8/31/23 13:18, Danilo Krummrich wrote: On Thu, Aug 31, 2023 at 11:04:06AM +0200, Thomas Hellström (Intel) wrote: Hi! On 8/30/23 17:00, Danilo Krummrich wrote: On Wed

Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation

2023-08-31 Thread Intel
Hi, On 8/31/23 13:18, Danilo Krummrich wrote: On Thu, Aug 31, 2023 at 11:04:06AM +0200, Thomas Hellström (Intel) wrote: Hi! On 8/30/23 17:00, Danilo Krummrich wrote: On Wed, Aug 30, 2023 at 03:42:08PM +0200, Thomas Hellström (Intel) wrote: On 8/30/23 14:49, Danilo Krummrich wrote: Hi

Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation

2023-08-31 Thread Intel
Hi! On 8/30/23 17:00, Danilo Krummrich wrote: On Wed, Aug 30, 2023 at 03:42:08PM +0200, Thomas Hellström (Intel) wrote: On 8/30/23 14:49, Danilo Krummrich wrote: Hi Thomas, thanks for having a look! On Wed, Aug 30, 2023 at 09:27:45AM +0200, Thomas Hellström (Intel) wrote: Hi, Danilo. Some

Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation

2023-08-30 Thread Intel
On 8/30/23 14:49, Danilo Krummrich wrote: Hi Thomas, thanks for having a look! On Wed, Aug 30, 2023 at 09:27:45AM +0200, Thomas Hellström (Intel) wrote: Hi, Danilo. Some quick comments since I'm doing some Xe work in this area. Will probably get back with more. On 8/20/23 23:53, D

Re: [PATCH drm-misc-next 2/3] drm/gpuva_mgr: generalize dma_resv/extobj handling and GEM validation

2023-08-30 Thread Intel
Hi, Danilo. Some quick comments since I'm doing some Xe work in this area. Will probably get back with more. On 8/20/23 23:53, Danilo Krummrich wrote: So far the DRM GPUVA manager offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to the

Re: [PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings

2023-07-06 Thread Intel
On 7/6/23 17:48, Danilo Krummrich wrote: Hi Thomas, On 7/6/23 10:49, Thomas Hellström (Intel) wrote: Hi, Danilo Some review comments below: On 6/30/23 00:25, Danilo Krummrich wrote: Add infrastructure to keep track of GPU virtual address (VA) mappings with a decicated VA space manager

Re: [PATCH drm-next v6 02/13] drm: manager to keep track of GPUs VA mappings

2023-07-06 Thread Intel
Hi, Danilo Some review comments below: On 6/30/23 00:25, Danilo Krummrich wrote: Add infrastructure to keep track of GPU virtual address (VA) mappings with a decicated VA space manager implementation. New UAPIs, motivated by Vulkan sparse memory bindings graphics drivers start implementing, al

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Intel
On 6/21/23 18:35, Ira Weiny wrote: Thomas Hellström (Intel) wrote: I think one thing worth mentioning in the context of this patch is that IIRC kmap_local_page() will block offlining of the mapping CPU until kunmap_local(), so while I haven't seen any guidelines around the usage of thi

Re: [PATCH 1/2] drm: execution context for GEM buffers v5

2023-06-21 Thread Intel
On 6/21/23 15:36, Christian König wrote: This adds the infrastructure for an execution context for GEM buffers which is similar to the existing TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Intel
On 6/20/23 20:07, Sumitra Sharma wrote: On Tue, Jun 20, 2023 at 06:23:38AM -0700, Ira Weiny wrote: Sumitra Sharma wrote: On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted

Re: [PATCH 01/13] drm: execution context for GEM buffers v4

2023-06-19 Thread Intel
On 6/19/23 11:48, Christian König wrote: Hi, Am 19.06.23 um 11:33 schrieb Thomas Hellström (Intel): [SNIP] Sometimes you want to just drop the contended lock after the above relaxation. (Eviction would be one example), and not add as prelocked, if the contended object goes out of scope

Re: [PATCH 01/13] drm: execution context for GEM buffers v4

2023-06-19 Thread Intel
Hi! On 6/19/23 11:20, Christian König wrote: Hi guys, Am 19.06.23 um 10:59 schrieb Thomas Hellström (Intel): [SNIP] I really need to find some time to work on that anyway. I've been playing with drm_exec for a couple weeks now, and I wanted to share something I hacked to try and mak

Re: [PATCH 01/13] drm: execution context for GEM buffers v4

2023-06-19 Thread Intel
On 6/17/23 13:54, Boris Brezillon wrote: +Matthew who's been using drm_exec in Xe if I'm correct. Hello Christian, On Wed, 14 Jun 2023 15:02:52 +0200 Boris Brezillon wrote: On Wed, 14 Jun 2023 14:30:53 +0200 Christian König wrote: Am 14.06.23 um 14:23 schrieb Boris Brezillon: Hi Christ

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-19 Thread Intel
On 6/18/23 20:11, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for synchronization, and making the process sleep in the absence of free slots. kmap_local_page() is

Re: [Intel-gfx] [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag

2023-06-14 Thread Intel
On 6/14/23 15:22, Tvrtko Ursulin wrote: On 14/06/2023 13:35, Sumitra Sharma wrote: Pages allocated with GFP_KERNEL cannot come from Highmem. That is why there is no need to call kmap() on them. Are you sure it is GFP_KERNEL backed and not tmpfs? I am not sure myself so let me copy Matt and

Re: [PATCH 01/13] drm: execution context for GEM buffers v4

2023-05-04 Thread Intel
On 5/4/23 13:51, Christian König wrote: This adds the infrastructure for an execution context for GEM buffers which is similar to the existing TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different G

Re: [PATCH v3 0/5] drm/i915: Allow user to set cache at BO creation

2023-04-29 Thread Intel
On 4/28/23 19:43, Yang, Fei wrote: >> On 4/28/23 17:19, Yang, Fei wrote: >>> On 4/28/23 07:47, fei.y...@intel.com wrote: From: Fei Yang The first three patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here

Re: [PATCH v3 0/5] drm/i915: Allow user to set cache at BO creation

2023-04-28 Thread Intel
On 4/28/23 17:19, Yang, Fei wrote: > On 4/28/23 07:47, fei.y...@intel.com wrote: >> From: Fei Yang >> >> The first three patches in this series are taken from >> https://patchwork.freedesktop.org/series/116868/ >> These patches are included here because the last patch >> has dependency on the p

Re: [PATCH v3 0/5] drm/i915: Allow user to set cache at BO creation

2023-04-28 Thread Intel
On 4/28/23 07:47, fei.y...@intel.com wrote: From: Fei Yang The first three patches in this series are taken from https://patchwork.freedesktop.org/series/116868/ These patches are included here because the last patch has dependency on the pat_index refactor. This series is focusing on uAPI c

Re: [RFC PATCH 08/10] dma-buf/dma-fence: Introduce long-running completion fences

2023-04-04 Thread Intel
_fence_work for the actual work although it's completion fence is a dma_fence. Although that goes against the whole idea of a condition for merging the xe driver would be that we implement some sort of minimal scaffolding for long-running workloads in the drm scheduler, and the thinking be

Re: [PATCH 1/9] drm: execution context for GEM buffers v3

2023-03-10 Thread Intel
Hi Christian On 2/28/23 09:33, Christian König wrote: This adds the infrastructure for an execution context for GEM buffers which is similar to the existinc TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock man

Re: [PATCH 9/9] drm: move ttm_execbuf_util into vmwgfx

2023-03-09 Thread Intel
Hi, On 3/9/23 06:14, Zack Rusin wrote: On Wed, 2023-03-08 at 10:10 +0100, Christian König wrote: Am 08.03.23 um 06:14 schrieb Zack Rusin: On Tue, 2023-02-28 at 09:34 +0100, Christian König wrote: VMWGFX is the only remaining user of this and should probably moved over to drm_exec when it star

Re: [PATCH 9/9] drm: move ttm_execbuf_util into vmwgfx

2023-03-09 Thread Intel
On 3/8/23 10:10, Christian König wrote: Am 08.03.23 um 06:14 schrieb Zack Rusin: On Tue, 2023-02-28 at 09:34 +0100, Christian König wrote: VMWGFX is the only remaining user of this and should probably moved over to drm_exec when it starts using GEM as well. Is this because vmwgfx piggybacks

Re: [PATCH 2/3] drm/amd: Convert amdgpu to use suballocation helper.

2023-02-23 Thread Intel
On 2/23/23 17:22, Christian König wrote: Am 23.02.23 um 15:29 schrieb Thomas Hellström: On 2/23/23 12:15, Christian König wrote: Am 23.02.23 um 11:57 schrieb Thomas Hellström: From: Maarten Lankhorst Now that we have a generic suballocation helper, Use it in amdgpu. For lines that get mov

Re: [PATCH drm-next 13/14] drm/nouveau: implement new VM_BIND UAPI

2023-01-18 Thread Intel
On 1/19/23 05:58, Matthew Brost wrote: On Thu, Jan 19, 2023 at 04:44:23AM +0100, Danilo Krummrich wrote: On 1/18/23 21:37, Thomas Hellström (Intel) wrote: On 1/18/23 07:12, Danilo Krummrich wrote: This commit provides the implementation for the new uapi motivated by the Vulkan API. It

Re: [PATCH drm-next 13/14] drm/nouveau: implement new VM_BIND UAPI

2023-01-18 Thread Intel
On 1/18/23 07:12, Danilo Krummrich wrote: This commit provides the implementation for the new uapi motivated by the Vulkan API. It allows user mode drivers (UMDs) to: 1) Initialize a GPU virtual address (VA) space via the new DRM_IOCTL_NOUVEAU_VM_INIT ioctl for UMDs to specify the portion

Re: [PATCH 05/16] drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation.

2022-10-19 Thread Intel
Hi, Zack, On 10/19/22 18:32, Zack Rusin wrote: On Wed, 2022-10-19 at 12:21 +0200, Thomas Hellström (Intel) wrote: ⚠ External Email On 10/17/22 21:54, Zack Rusin wrote: From: Maaz Mombasawala Vmwgfx's hashtab implementation needs to be replaced with linux/hashtable to reduce mainte

Re: [PATCH 05/16] drm/vmwgfx: Refactor resource validation hashtable to use linux/hashtable implementation.

2022-10-19 Thread Intel
On 10/17/22 21:54, Zack Rusin wrote: From: Maaz Mombasawala Vmwgfx's hashtab implementation needs to be replaced with linux/hashtable to reduce maintenence burden. As part of this effort, refactor the res_ht hashtable used for resource validation during execbuf execution to use linux/hashtabl

Re: Balancing ttm_mem_io_reserve() and ttm_mem_io_free()

2022-08-19 Thread Intel
Hi, Christian, On 8/19/22 10:52, Christian König wrote: Hi Thomas, IIRC we intentionally dropped that approach of balancing ttm_mem_io_reserve()/ttm_mem_io_free(). Instead the results from ttm_mem_io_reserve() are cached and that cached information is freed by ttm_mem_io_free(). In other wo

Re: [PATCH v7 2/2] drm/gem: Don't map imported GEMs

2022-06-30 Thread Intel
On 6/30/22 22:22, Dmitry Osipenko wrote: Hello Thomas, On 6/30/22 23:15, Thomas Hellström (Intel) wrote: Hi, Dmitry, On 6/30/22 22:04, Dmitry Osipenko wrote: Drivers that use drm_gem_mmap() and drm_gem_mmap_obj() helpers don't handle imported dma-bufs properly, which results in mappi

Re: [PATCH v7 2/2] drm/gem: Don't map imported GEMs

2022-06-30 Thread Intel
Hi, Dmitry, On 6/30/22 22:04, Dmitry Osipenko wrote: Drivers that use drm_gem_mmap() and drm_gem_mmap_obj() helpers don't handle imported dma-bufs properly, which results in mapping of something else than the imported dma-buf. On NVIDIA Tegra we get a hard lockup when userspace writes to the mem

Re: [PATCH v6 02/22] drm/gem: Move mapping of imported dma-bufs to drm_gem_mmap_obj()

2022-06-29 Thread Intel
On 6/29/22 10:22, Dmitry Osipenko wrote: On 6/29/22 09:40, Thomas Hellström (Intel) wrote: On 5/27/22 01:50, Dmitry Osipenko wrote: Drivers that use drm_gem_mmap() and drm_gem_mmap_obj() helpers don't handle imported dma-bufs properly, which results in mapping of something else tha

Re: [PATCH v6 08/22] drm/virtio: Unlock reservations on dma_resv_reserve_fences() error

2022-06-28 Thread Intel
On 5/27/22 01:50, Dmitry Osipenko wrote: Unlock reservations on dma_resv_reserve_fences() error to fix recursive locking of the reservations when this error happens. Fixes: Cc: sta...@vger.kernel.org With that fixed, Reviewed-by: Thomas Hellström Signed-off-by: Dmitry Osipenko --- d

Re: [PATCH v6 02/22] drm/gem: Move mapping of imported dma-bufs to drm_gem_mmap_obj()

2022-06-28 Thread Intel
On 5/27/22 01:50, Dmitry Osipenko wrote: Drivers that use drm_gem_mmap() and drm_gem_mmap_obj() helpers don't handle imported dma-bufs properly, which results in mapping of something else than the imported dma-buf. For example, on NVIDIA Tegra we get a hard lockup when userspace writes to the m

Re: [Linaro-mm-sig] [PATCH] drm/i915: Remove __dma_fence_is_chain()

2022-06-28 Thread Intel
On 6/29/22 01:35, Rob Clark wrote: From: Rob Clark drive-by cleanup Signed-off-by: Rob Clark Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c

Re: [PATCH v6 14/22] dma-buf: Introduce new locking convention

2022-06-28 Thread Intel
On 5/30/22 15:57, Dmitry Osipenko wrote: On 5/30/22 16:41, Christian König wrote: Hi Dmitry, Am 30.05.22 um 15:26 schrieb Dmitry Osipenko: Hello Christian, On 5/30/22 09:50, Christian König wrote: Hi Dmitry, First of all please separate out this patch from the rest of the series, since th

Re: [PATCH v6 01/22] drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error

2022-06-28 Thread Intel
Hi, On 5/27/22 01:50, Dmitry Osipenko wrote: Use ww_acquire_fini() in the error code paths. Otherwise lockdep thinks that lock is held when lock's memory is freed after the drm_gem_lock_reservations() error. The WW needs to be annotated as "freed" s /WW/ww_acquire_context/ ? s /"freed"/"releas

Re: [Intel-gfx] [PATCH 06/10] drm/i915/uapi: add NEEDS_CPU_ACCESS hint

2022-06-17 Thread Intel
On 5/25/22 20:43, Matthew Auld wrote: If set, force the allocation to be placed in the mappable portion of I915_MEMORY_CLASS_DEVICE. One big restriction here is that system memory (i.e I915_MEMORY_CLASS_SYSTEM) must be given as a potential placement for the object, that way we can always spill

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

2022-06-17 Thread Intel
On 5/25/22 20:43, Matthew Auld wrote: 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:

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

2022-06-17 Thread Intel
On 5/25/22 20:43, Matthew Auld wrote: 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-recoverab

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

2022-06-16 Thread Intel
On 5/25/22 20:43, Matthew Auld wrote: Add an entry for the new uapi needed for small BAR on DG2+. v2: - Some spelling fixes and other small tweaks. (Akeem & Thomas) - Rework error capture interactions, including no longer needing NEEDS_CPU_ACCESS for objects marked for capture. (Tho

Re: [PATCH 1/2] drm/vmwgfx: Remove unused hugepage support

2022-04-26 Thread Intel
On 4/25/22 22:31, Zack Rusin wrote: From: Zack Rusin There's no point in explicitly trying to align virtual memory to facilitate huge page table entries or huge page memory in buffer objects given that they're not being used. Transparent hugepages support for vram allocations has been gradua

Re: [Intel-gfx] [PATCH 2/4] drm/i915/selftests: Check for incomplete LRI from the context image

2022-04-08 Thread Intel
On 3/14/22 19:20, Ramalingam C wrote: From: Chris Wilson In order to keep the context image parser simple, we assume that all commands follow a similar format. A few, especially not MI commands on the render engines, have fixed lengths not encoded in a length field. This caused us to incorrec

Re: [Intel-gfx] [PATCH v9 4/9] drm/i915/gt: Pass the -EINVAL when emit_pte doesn't update any PTE

2022-04-08 Thread Intel
On 4/5/22 17:08, Ramalingam C wrote: When emit_pte doesn't update any PTE with return value as 0, interpret it as -EINVAL. v2: Add missing goto [Thomas] Signed-off-by: Ramalingam C --- drivers/gpu/drm/i915/gt/intel_migrate.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) d

Re: [Intel-gfx] [PATCH v7 5/9] drm/i915/selftest_migrate: Consider the possible roundup of size

2022-03-28 Thread Intel
On 3/28/22 21:07, Ramalingam C wrote: Consider the possible round up happened at obj size alignment to min_page_size during the obj allocation. Signed-off-by: Ramalingam C Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gt/selftest_migrate.c | 3 +++ 1 file changed, 3 insertio

Re: [Intel-gfx] [PATCH v5 6/9] drm/i915/gt: offset handling for multiple copy engines

2022-03-24 Thread Intel
On 3/21/22 23:44, Ramalingam C wrote: Handle the src and dst chunk offsets for different instances of the copy engines. Signed-off-by: Ramalingam C --- drivers/gpu/drm/i915/gt/intel_migrate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/

Re: [Intel-gfx] [PATCH v5 3/9] drm/i915/gt: Clear compress metadata for Flat-ccs objects

2022-03-24 Thread Intel
Hi, Ram On 3/21/22 23:44, Ramalingam C wrote: Xe-HP and latest devices support Flat CCS which reserved a portion of the device memory to store compression metadata, during the clearing of device memory buffer object we also need to clear the associated CCS buffer. XY_CTRL_SURF_COPY_BLT is a BLT

Re: [Intel-gfx] [PATCH v5 2/9] drm/i915/gt: Optimize the migration and clear loop

2022-03-24 Thread Intel
On 3/21/22 23:44, Ramalingam C wrote: Move the static calculations out of the loops for copy and clear. Signed-off-by: Ramalingam C Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gt/intel_migrate.c | 44 - 1 file changed, 21 insertions(+), 23 deletions

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

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

Re: [Intel-gfx] [PATCH] drm/i915/gtt: reduce overzealous alignment constraints for GGTT

2022-03-04 Thread Intel
On 3/3/22 11:02, Matthew Auld wrote: Currently this will enforce both 2M alignment and padding for any LMEM pages inserted into the GGTT. However, this was only meant to be applied to the compact-pt layout with the ppGTT. For the GGTT we can reduce the alignment and padding to 64K. Bspec: 4501

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

2022-02-22 Thread Intel
Hi, Michael, On 2/22/22 18:26, Michael Cheng wrote: This patch removes logic for wbinvd_on_all_cpus and brings in drm_cache.h. This header has the logic that outputs a warning when wbinvd_on_all_cpus when its being used on a non-x86 platform. Signed-off-by: Michael Cheng Linus has been prett

Re: [Intel-gfx] [RFC 1/2] drm/i915/ttm: Add extra pages for handling ccs data

2022-02-07 Thread Intel
Hi, Ram, On 2/7/22 10:37, Ramalingam C wrote: While evicting the local memory data on flat-ccs capable platform we need to evict the ccs data associated to the data. For this, we are adding extra pages ((size / 256) >> PAGE_SIZE) into the ttm_tt. To achieve this we are adding a new param

Re: [Intel-gfx] [PATCH] drm/i915: Allow dead vm to unbind vma's without lock.

2022-01-28 Thread Intel
On 1/28/22 09:57, Maarten Lankhorst wrote: i915_gem_vm_close may take the lock, and we currently have no better way of handling this. At least for now, allow a path in which holding vm->mutex is sufficient. This is the case, because the object destroy path will forcefully take vm->mutex now. S

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

2022-01-27 Thread Intel
On 1/26/22 18:11, Robert Beckett wrote: On 26/01/2022 13:49, Thomas Hellström (Intel) wrote: On 1/25/22 20:35, Robert Beckett wrote: From: Ramalingam C Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages

Re: [Intel-gfx] [PATCH v5 2/5] drm/i915: enforce min GTT alignment for discrete cards

2022-01-26 Thread Intel
On 1/25/22 20:35, Robert Beckett wrote: From: Matthew Auld For local-memory objects we need to align the GTT addresses to 64K, both for the ppgtt and ggtt. We need to support vm->min_alignment > 4K, depending on the vm itself and the type of object we are inserting. With this in mind update

Re: [Intel-gfx] [PATCH v5 5/5] drm/i915/uapi: document behaviour for DG2 64K support

2022-01-26 Thread Intel
On 1/25/22 20:35, Robert Beckett wrote: From: Matthew Auld On discrete platforms like DG2, we need to support a minimum page size of 64K when dealing with device local-memory. This is quite tricky for various reasons, so try to document the new implicit uapi for this. v3: fix typos and less

Re: [Intel-gfx] [PATCH v5 4/5] drm/i915: add gtt misalignment test

2022-01-26 Thread Intel
On 1/25/22 20:35, Robert Beckett wrote: add test to check handling of misaligned offsets and sizes v4: * remove spurious blank lines * explicitly cast intel_region_id to intel_memory_type in misaligned_pin Reported-by: kernel test robot Signed-off-by: Robert Beckett --- dr

Re: [Intel-gfx] [PATCH v5 1/5] drm/i915: add needs_compact_pt flag

2022-01-26 Thread Intel
On 1/25/22 20:35, Robert Beckett wrote: From: Ramalingam C Add a new platform flag, needs_compact_pt, to mark the requirement of compact pt layout support for the ppGTT when using 64K GTT pages. With this flag has_64k_pages will only indicate requirement of 64K GTT page sizes or larger for d

Re: [Intel-gfx] [PATCH 06/11] dma-buf: warn about containers in dma_resv object

2022-01-24 Thread Intel
On 1/24/22 14:03, Christian König wrote: Drivers should not add containers as shared fences to the dma_resv object, instead each fence should be added individually. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Thomas Hellström Is there any indication that this t

Re: [Intel-gfx] [PATCH] drm/i915: Lock dpt_obj around set_cache_level.

2022-01-24 Thread Intel
mgblt fb_sys_fops prime_numbers intel_lpss_pci smsc75xx usbnet mii <4> [184.578349] CPU: 6 PID: 5544 Comm: kms_addfb_basic Not tainted 5.16.0-CI-Patchwork_22006+ #1 <4> [184.578351] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR4 RVP, BIOS ADL

Re: [Linaro-mm-sig] [PATCH 1/9] dma-buf: consolidate dma_fence subclass checking

2022-01-20 Thread Intel
On 1/20/22 14:27, Christian König wrote: Consolidate the wrapper functions to check for dma_fence subclasses in the dma_fence header. This makes it easier to document and also check the different requirements for fence containers in the subclasses. Signed-off-by: Christian König --- includ

Re: [Intel-gfx] [PATCH v6 2/6] drm/i915: Add locking to i915_gem_evict_vm(), v2.

2022-01-14 Thread Intel
On 1/14/22 14:23, Maarten Lankhorst wrote: i915_gem_evict_vm will need to be able to evict objects that are locked by the current ctx. By testing if the current context already locked the object, we can do this correctly. This allows us to evict the entire vm even if we already hold some object

Re: [Intel-gfx] [PATCH v5 2/6] drm/i915: Add locking to i915_gem_evict_vm()

2022-01-13 Thread Intel
On 1/13/22 12:44, Maarten Lankhorst wrote: i915_gem_evict_vm will need to be able to evict objects that are locked by the current ctx. By testing if the current context already locked the object, we can do this correctly. This allows us to evict the entire vm even if we already hold some object

Re: [Intel-gfx] [PATCH 2/2] drm/i915: clean up shrinker_release_pages

2022-01-05 Thread Intel
Hi, Matthew On 12/15/21 12:07, Matthew Auld wrote: Add some proper flags for the different modes, and shorten the name to something more snappy. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Auld LGTM. Reviewed-by: Thomas Hellström

Re: [Intel-gfx] [PATCH] drm/i915: Use trylock instead of blocking lock for __i915_gem_free_objects.

2021-12-22 Thread Intel
On 12/22/21 16:56, Maarten Lankhorst wrote: Convert free_work into delayed_work, similar to ttm to allow converting the blocking lock in __i915_gem_free_objects to a trylock. Unlike ttm, the object should already be idle, as it's kept alive by a reference through struct i915_vma->active, which

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Add has_64k_pages flag

2021-12-08 Thread Intel
On 12/8/21 13:59, Matthew Auld wrote: On Wed, 8 Dec 2021 at 12:43, Thomas Hellström (Intel) wrote: Hi, On 12/7/21 17:51, Ramalingam C wrote: From: Stuart Summers Add a new platform flag, has_64k_pages, for platforms supporting base page sizes of 64k. Signed-off-by: Stuart Summers

Re: [Intel-gfx] [PATCH 2/4] drm/i915/xehpsdv: set min page-size to 64K

2021-12-08 Thread Intel
On 12/7/21 17:51, Ramalingam C wrote: From: Matthew Auld LMEM should be allocated at 64K granularity, since 4K page support will eventually be dropped for LMEM when using the PPGTT. Signed-off-by: Matthew Auld Signed-off-by: Stuart Summers Signed-off-by: Ramalingam C Cc: Joonas Lahtinen

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Add has_64k_pages flag

2021-12-08 Thread Intel
Hi, On 12/7/21 17:51, Ramalingam C wrote: From: Stuart Summers Add a new platform flag, has_64k_pages, for platforms supporting base page sizes of 64k. Signed-off-by: Stuart Summers Signed-off-by: Ramalingam C Reviewed-by: Lucas De Marchi --- drivers/gpu/drm/i915/i915_drv.h | 2

Re: [Linaro-mm-sig] [RFC PATCH 1/2] dma-fence: Avoid establishing a locking order between fence classes

2021-12-03 Thread Intel
On 12/3/21 16:00, Christian König wrote: Am 03.12.21 um 15:50 schrieb Thomas Hellström: On 12/3/21 15:26, Christian König wrote: [Adding Daniel here as well] Am 03.12.21 um 15:18 schrieb Thomas Hellström: [SNIP] Well that's ok as well. My question is why does this single dma_fence then sh

Re: [Linaro-mm-sig] [RFC PATCH 1/2] dma-fence: Avoid establishing a locking order between fence classes

2021-12-01 Thread Intel
On 12/1/21 12:25, Christian König wrote: Am 01.12.21 um 12:04 schrieb Thomas Hellström (Intel): On 12/1/21 11:32, Christian König wrote: Am 01.12.21 um 11:15 schrieb Thomas Hellström (Intel): [SNIP] What we could do is to avoid all this by not calling the callback with the lock held in

Re: [Linaro-mm-sig] [RFC PATCH 1/2] dma-fence: Avoid establishing a locking order between fence classes

2021-12-01 Thread Intel
On 12/1/21 11:32, Christian König wrote: Am 01.12.21 um 11:15 schrieb Thomas Hellström (Intel): [SNIP] What we could do is to avoid all this by not calling the callback with the lock held in the first place. If that's possible that might be a good idea, pls also see below. The pr

Re: [Linaro-mm-sig] [RFC PATCH 1/2] dma-fence: Avoid establishing a locking order between fence classes

2021-12-01 Thread Intel
On 12/1/21 09:36, Christian König wrote: Am 01.12.21 um 09:23 schrieb Thomas Hellström (Intel):  [SNIP] Jason and I came up with a deep dive iterator for his use case, but I think we don't want to use that any more after my dma_resv rework. In other words when you need to create

Re: [Linaro-mm-sig] [RFC PATCH 1/2] dma-fence: Avoid establishing a locking order between fence classes

2021-12-01 Thread Intel
On 12/1/21 08:05, Christian König wrote: Am 30.11.21 um 20:27 schrieb Thomas Hellström: On 11/30/21 19:12, Thomas Hellström wrote: On Tue, 2021-11-30 at 16:02 +0100, Christian König wrote: Am 30.11.21 um 15:35 schrieb Thomas Hellström: On Tue, 2021-11-30 at 14:26 +0100, Christian König wro

Re: [Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin, v2.

2021-09-29 Thread Intel
On 9/29/21 10:59, Maarten Lankhorst wrote: Ensure i915_vma_pin_iomap and vma_unpin are done with dpt->obj lock held. I don't think there's much of a point in merging intel_dpt_pin() with intel_pin_fb_obj_dpt(), they touch different objects. Changes since v1: - Fix using the wrong pointer to r

[PATCH] drm/bochs: add Bochs PCI ID for Simics model

2021-09-09 Thread H. Peter Anvin (Intel)
see BIOS output. Add support for the 4321: device number in addition to the 1234: one. Signed-off-by: H. Peter Anvin (Intel) --- drivers/gpu/drm/tiny/bochs.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index

Re: [Intel-gfx] [PATCH 7/8] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v8)

2021-09-01 Thread Intel
Hi, Jason, A quick question below: On 7/23/21 7:21 PM, Jason Ekstrand wrote: From: Thomas Hellström If our exported dma-bufs are imported by another instance of our driver, that instance will typically have the imported dma-bufs locked during dma_buf_map_attachment(). But the exporter also lo

Re: [Intel-gfx] [PATCH 0/4] Enable GuC submission by default on DG1

2021-08-06 Thread Intel
On 8/6/21 1:34 PM, Thomas Hellström (Intel) wrote: Hi, On 8/3/21 7:26 PM, Matthew Brost wrote: On Tue, Aug 03, 2021 at 02:15:13PM +0200, Daniel Vetter wrote: On Tue, Aug 3, 2021 at 6:53 AM Matthew Brost wrote: Minimum set of patches to enable GuC submission on DG1 and enable it by

Re: [Intel-gfx] [PATCH 0/4] Enable GuC submission by default on DG1

2021-08-06 Thread Intel
On 8/6/21 1:34 PM, Thomas Hellström (Intel) wrote: Hi, On 8/3/21 7:26 PM, Matthew Brost wrote: On Tue, Aug 03, 2021 at 02:15:13PM +0200, Daniel Vetter wrote: On Tue, Aug 3, 2021 at 6:53 AM Matthew Brost wrote: Minimum set of patches to enable GuC submission on DG1 and enable it by

Re: [Intel-gfx] [PATCH 0/4] Enable GuC submission by default on DG1

2021-08-06 Thread Intel
Hi, On 8/3/21 7:26 PM, Matthew Brost wrote: On Tue, Aug 03, 2021 at 02:15:13PM +0200, Daniel Vetter wrote: On Tue, Aug 3, 2021 at 6:53 AM Matthew Brost wrote: Minimum set of patches to enable GuC submission on DG1 and enable it by default. A little difficult to test as IGTs do not work with

Re: [PATCH 1/4] drm/ttm: add a pointer to the allocating BO into ttm_resource

2021-06-10 Thread Intel
Hi, Christian, I know you have a lot on your plate, and that the drm community is a bit lax about following the kernel patch submitting guidelines, but now that we're also spinning up a number of Intel developers on TTM could we please make a better effort with cover letters and c

Re: [PATCH 3/9] drm/vmwgfx: Fix subresource updates with new contexts

2021-06-09 Thread Intel
Hi, On 6/9/21 7:23 PM, Zack Rusin wrote: The has_dx variable was only set during the initialization which meant that UPDATE_SUBRESOURCE was never used. We were emulating it with UPDATE_GB_IMAGE but that's always been a stop-gap. Instead of has_dx which has been deprecated a long time ago we need

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-08 Thread Intel
Hi, On 6/8/21 9:14 AM, Christian König wrote: Am 08.06.21 um 07:29 schrieb Thomas Hellström (Intel): Hi, On 6/7/21 7:59 PM, Christian König wrote: Am 07.06.21 um 19:58 schrieb Thomas Hellström (Intel): On 6/7/21 7:54 PM, Christian König wrote: Am 07.06.21 um 19:06 schrieb Thomas

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-07 Thread Intel
Hi, On 6/7/21 7:59 PM, Christian König wrote: Am 07.06.21 um 19:58 schrieb Thomas Hellström (Intel): On 6/7/21 7:54 PM, Christian König wrote: Am 07.06.21 um 19:06 schrieb Thomas Hellström (Intel): On 6/7/21 6:40 PM, Thomas Hellström (Intel) wrote: On 6/2/21 12:09 PM, Christian König

Re: [PATCH] drm/ttm: fix warning after moving resource to ghost obj

2021-06-07 Thread Intel
On 6/7/21 7:57 PM, Christian König wrote: After we moved the resource to the ghost the bo->resource pointer needs to be resetted since the owner of the resource is now the ghost. s/resetted/reset/ Signed-off-by: Christian König Reviewed-by: Thomas Hellström

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-07 Thread Intel
On 6/7/21 7:54 PM, Christian König wrote: Am 07.06.21 um 19:06 schrieb Thomas Hellström (Intel): On 6/7/21 6:40 PM, Thomas Hellström (Intel) wrote: On 6/2/21 12:09 PM, Christian König wrote: ... @@ -728,14 +728,15 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo

Re: [PATCH] drm/ttm: fix access to uninitialized variable.

2021-06-07 Thread Intel
On 6/7/21 7:11 PM, Christian König wrote: The resource is not allocated yet, so no chance that this will work. Use the placement instead. Signed-off-by: Christian König Reviewed-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-07 Thread Intel
On 6/7/21 6:40 PM, Thomas Hellström (Intel) wrote: On 6/2/21 12:09 PM, Christian König wrote: ... @@ -728,14 +728,15 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,    */   static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,     const struct

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-07 Thread Intel
On 6/2/21 12:09 PM, Christian König wrote: ... @@ -728,14 +728,15 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo, */ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo, const struct ttm_place *place, -

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings v2

2021-06-07 Thread Intel
On 6/7/21 3:58 PM, Christian König wrote: We discussed if that is really the right approach for quite a while now, but digging deeper into a bug report on arm turned out that this is actually horrible broken right now. The reason for this is that vmf_insert_mixed_prot() always tries to grab a

Re: [PATCH 1/4] drm/ttm: add TTM_PL_FLAG_TEMPORARY flag v3

2021-06-07 Thread Intel
Sure. LGTM, Reviewed-by: Thomas Hellström On 6/7/21 2:36 PM, Christian König wrote: Thomas any comments on this? Is the purpose of this now clear enough? Thanks, Christian. Am 01.06.21 um 14:25 schrieb Christian König: From: Lang Yu Sometimes drivers need to use bounce buffers to evict

Re: [PATCH] drm/ttm: fix missing res assignment in ttm_range_man_alloc

2021-06-07 Thread Intel
On 6/7/21 12:40 PM, Christian König wrote: That somehow got missing. Signed-off-by: Christian König Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated resources v2") Reported-by: Thomas Hellström Reviewed-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_range_manag

Re: [PATCH 10/10] drm/ttm: flip the switch for driver allocated resources v2

2021-06-07 Thread Intel
On 6/7/21 12:37 PM, Christian König wrote: Am 07.06.21 um 12:15 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wrote: Instead of both driver and TTM allocating memory finalize embedding the ttm_resource object as base into the driver backends. v2: fix typo in vmwgfx

Re: [PATCH 10/10] drm/ttm: flip the switch for driver allocated resources v2

2021-06-07 Thread Intel
On 6/2/21 12:09 PM, Christian König wrote: Instead of both driver and TTM allocating memory finalize embedding the ttm_resource object as base into the driver backends. v2: fix typo in vmwgfx grid mgr and double init in amdgpu_vram_mgr.c Signed-off-by: Christian König Reviewed-by: Matthew Au

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-04 Thread Intel
Hi, Christian, It looks like all patches in the series have been reviewed or acked by Matthew, and while still a little worried about the final outcome of embedding a struct ttm_mem_resource, FWIW, Acked-by: Thomas Hellström /Thomas On 6/2/21 12:09 PM, Christian König wrote: To improve the

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Intel
On 6/2/21 8:36 PM, Daniel Vetter wrote: On Wed, Jun 02, 2021 at 02:21:17PM +0200, Thomas Hellström wrote: On 6/2/21 2:04 PM, Christian König wrote: Am 02.06.21 um 13:24 schrieb Thomas Hellström (Intel): [SNIP] @@ -576,14 +565,10 @@ static void ttm_bo_mmap_vma_setup(struct

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Intel
On 6/2/21 8:41 PM, Christian König wrote: Am 02.06.21 um 17:28 schrieb Thomas Hellström (Intel): Hi! On 6/2/21 4:17 PM, Christian König wrote: Am 02.06.21 um 16:13 schrieb Thomas Hellström (Intel): On 6/2/21 3:07 PM, Christian König wrote: Am 02.06.21 um 14:33 schrieb Thomas Hellström

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Intel
Hi! On 6/2/21 4:17 PM, Christian König wrote: Am 02.06.21 um 16:13 schrieb Thomas Hellström (Intel): On 6/2/21 3:07 PM, Christian König wrote: Am 02.06.21 um 14:33 schrieb Thomas Hellström (Intel): On 6/2/21 2:11 PM, Christian König wrote: Am 02.06.21 um 13:44 schrieb Thomas Hellström

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Intel
On 6/2/21 3:07 PM, Christian König wrote: Am 02.06.21 um 14:33 schrieb Thomas Hellström (Intel): On 6/2/21 2:11 PM, Christian König wrote: Am 02.06.21 um 13:44 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wrote: Start with the range manager to make the resource

  1   2   3   >