Re: ✗ Fi.CI.IGT: failure for series starting with [v2,1/2] drm/i915: Refactor confusing __intel_gt_reset() (rev2)

2024-04-24 Thread Das, Nirmoy
moy Das Cc: intel-gfx@lists.freedesktop.org ; Patchwork ; Das, Nirmoy ; Andi Shyti Subject: Re: ✗ Fi.CI.IGT: failure for series starting with [v2,1/2] drm/i915: Refactor confusing __intel_gt_reset() (rev2) Hi Nirmoy, On Wed, Apr 24, 2024 at 10:56:36AM +0200, Nirmoy Das wrote: > > On 4/24/

Re: [Intel-gfx] [PATCH] drm/i915: Wait for active retire before i915_active_fini()

2023-05-23 Thread Das, Nirmoy
pushed to drm-intel-next with a minor fix (s/References:/Closes:) On 5/22/2023 2:42 PM, Nirmoy Das wrote: i915_active_fini() finalizes the debug object, which can occur before the active retires and deactivates the debug object. Wait for one final time before calling i915_active_fini();

Re: [Intel-gfx] [PATCH] drm/i915: Wait for active retire before i915_active_fini()

2023-05-22 Thread Das, Nirmoy
Hi Andi, On 5/22/2023 4:56 PM, Andi Shyti wrote: Hi Nirmoy, On Mon, May 22, 2023 at 02:42:05PM +0200, Nirmoy Das wrote: i915_active_fini() finalizes the debug object, which can occur before the active retires and deactivates the debug object. Wait for one final time before calling

Re: [Intel-gfx] [PATCH] drm/i915/mtl: do not enable render power-gating on MTL

2023-05-17 Thread Das, Nirmoy
On 5/17/2023 5:25 PM, Vivi, Rodrigo wrote: On Wed, 2023-05-17 at 17:12 +0200, Das, Nirmoy wrote: On 5/17/2023 3:59 PM, Andrzej Hajda wrote: Multiple CI tests fails with forcewake ack timeouts if render power gating is enabled. BSpec 52698 clearly states it should be 0 for MTL. Closes: https

Re: [Intel-gfx] [PATCH] drm/i915/mtl: do not enable render power-gating on MTL

2023-05-17 Thread Das, Nirmoy
On 5/17/2023 3:59 PM, Andrzej Hajda wrote: Multiple CI tests fails with forcewake ack timeouts if render power gating is enabled. BSpec 52698 clearly states it should be 0 for MTL. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4983 Signed-off-by: Andrzej Hajda ---

Re: [Intel-gfx] [PATCH 1/2] drm/i915/mtl: Drop FLAT CCS check

2023-05-08 Thread Das, Nirmoy
Pushed the series to drm-intel-gt-next. This should handle few long standing MTL failures. On 5/5/2023 4:40 PM, Nirmoy Das wrote: From: Pallavi Mishra Remove FLAT CCS check from XY_FAST_COLOR_BLT usage, thus enabling MTL to use it. Signed-off-by: Pallavi Mishra Signed-off-by: Juha-Pekka

Re: [Intel-gfx] [PATCH 1/4] drm/i915/mtl: Drop FLAT CCS check

2023-05-04 Thread Das, Nirmoy
On 5/4/2023 12:28 PM, Juha-Pekka Heikkila wrote: From: Pallavi Mishra Remove FLAT CCS check from XY_FAST_COLOR_BLT usage, thus enabling MTL to use it. Signed-off-by: Pallavi Mishra Signed-off-by: Juha-Pekka Heikkila I think should fix the mtl migrate selftest failure.

Re: [Intel-gfx] [PATCH v2] drm/i915/ttm: fix i915_ttm_to_gem() kernel-doc

2023-05-04 Thread Das, Nirmoy
On 5/4/2023 11:23 AM, Jani Nikula wrote: drivers/gpu/drm/i915/gem/i915_gem_ttm.h:50: warning: Function parameter or member 'bo' not described in 'i915_ttm_to_gem' v2: Fix return value documentation while at it (Rodrigo) Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das ---

Re: [Intel-gfx] [PATCH v2 0/2] drm/i915/mtl: Add PTE encode functions

2023-04-25 Thread Das, Nirmoy
On 4/24/2023 8:29 PM, fei.y...@intel.com wrote: From: Fei Yang Extract PTE patch from https://patchwork.freedesktop.org/series/116868/ to fix MTL boot issue caused by MOCS/PAT update. v2: address comment from Matt. Fei Yang (2): drm/i915/mtl: Add PTE encode function drm/i915/mtl:

Re: [Intel-gfx] [PATCH 0/2] Restore MTL boot

2023-04-24 Thread Das, Nirmoy
On 4/24/2023 6:09 PM, Andi Shyti wrote: Hi, The two patches reverted in this series are, together, preventing MTL from booting. Revert them until the fix is deployed. Andi Andi Shyti (2): Revert "drm/i915/mtl: fix mocs selftest" Revert "drm/i915/mtl: Define MOCS and PAT tables for

Re: [Intel-gfx] [PATCH] drm/i915/mtl: workaround coherency issue for Media

2023-04-21 Thread Das, Nirmoy
On 4/20/2023 11:30 PM, Matt Roper wrote: On Thu, Apr 20, 2023 at 01:38:59PM +0200, Nirmoy Das wrote: From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by Media tile update the whole cache line even for partial writes. This creates a coherency problem for

Re: [Intel-gfx] [PATCH] drm/i915/mtl: Add workaround 14018778641

2023-04-20 Thread Das, Nirmoy
On 4/20/2023 1:21 PM, Tejas Upadhyay wrote: WA 18018781329 is applicable now across all MTL steppings. Cc: Matt Roper Signed-off-by: Tejas Upadhyay Acked-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 20 +--- 1 file changed, 13 insertions(+), 7

Re: [Intel-gfx] [PATCH 4/8] drm/i915/mtl: workaround coherency issue for Media

2023-04-20 Thread Das, Nirmoy
This is a important fix and can be pushed without depending on this series. I will send this out to mailing list separately for CI. Regards, Nirmoy On 4/20/2023 1:00 AM, fei.y...@intel.com wrote: From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by

Re: [Intel-gfx] [PATCH 1/8] drm/i915/mtl: Set has_llc=0

2023-04-20 Thread Das, Nirmoy
We have multiple bugs that requires this and it can be picked up irrespective of this series. I have sent a trybot patch for this and once that passes, I will push this one. https://patchwork.freedesktop.org/series/116746/ Nirmoy On 4/20/2023 1:00 AM, fei.y...@intel.com wrote: From: Fei

Re: [Intel-gfx] [PATCH 4/8] drm/i915/mtl: workaround coherency issue for Media

2023-04-19 Thread Das, Nirmoy
On 4/17/2023 8:24 AM, fei.y...@intel.com wrote: From: Fei Yang This patch implements Wa_22016122933. In MTL, memory writes initiated by Media tile update the whole cache line even for partial writes. This creates a coherency problem for cacheable memory if both CPU and GPU are writing data

Re: [Intel-gfx] [PATCH 3/8] drm/i915/mtl: Add PTE encode function

2023-04-19 Thread Das, Nirmoy
On 4/17/2023 8:24 AM, fei.y...@intel.com wrote: From: Fei Yang PTE encode functions are platform dependent. This patch implements PTE functions for MTL, and ensures the correct PTE encode function is used by calling pte_encode function pointer instead of the hardcoded gen8 version of PTE

Re: [Intel-gfx] [PATCH 2/8] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-19 Thread Das, Nirmoy
On 4/17/2023 8:24 AM, fei.y...@intel.com wrote: From: Madhumitha Tolakanahalli Pradeep On MTL, GT can no longer allocate on LLC - only the CPU can. This, along with addition of support for L4 cache calls a s/calls a/calls for a MOCS/PAT table update. Alos the PAT index registers are

Re: [Intel-gfx] [PATCH 1/8] drm/i915/mtl: Set has_llc=0

2023-04-19 Thread Das, Nirmoy
On 4/17/2023 8:24 AM, fei.y...@intel.com wrote: From: Fei Yang On MTL, GT is no longer allocated on LLC, set has_llc=0. This statement is bit unclear to me.  I would say "On MTL, LLC is not shared between GT and CPU" Otherwise Reviewed-by: Nirmoy Das Signed-off-by: Fei Yang ---

Re: [Intel-gfx] [PATCH] drm/i915/display: remove unnecessary i915_debugfs.h includes

2023-04-11 Thread Das, Nirmoy
On 4/11/2023 3:19 PM, Jani Nikula wrote: Leftovers from before display debugfs was separated to its own file. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915/display/intel_dp.c | 1 - drivers/gpu/drm/i915/display/intel_hdmi.c | 1 - 2 files changed, 2

Re: [Intel-gfx] [PATCH v4 5/5] drm/i915/gt: Make sure that errors are propagated through request chains

2023-04-11 Thread Das, Nirmoy
On 3/8/2023 10:41 AM, Andi Shyti wrote: Currently, when we perform operations such as clearing or copying large blocks of memory, we generate multiple requests that are executed in a chain. However, if one of these requests fails, we may not realize it unless it happens to be the last request

Re: [Intel-gfx] [PATCH v4 3/5] drm/i915: Create the locked version of the request create

2023-04-11 Thread Das, Nirmoy
On 3/8/2023 10:41 AM, Andi Shyti wrote: Make version of the request creation that doesn't hold any lock. Signed-off-by: Andi Shyti Cc: sta...@vger.kernel.org Reviewed-by: Nirmoy Das --- drivers/gpu/drm/i915/i915_request.c | 43 +++--

Re: [Intel-gfx] [PATCH v4 2/5] drm/i915/gt: Add intel_context_timeline_is_locked helper

2023-04-11 Thread Das, Nirmoy
On 3/8/2023 10:41 AM, Andi Shyti wrote: We have: - intel_context_timeline_lock() - intel_context_timeline_unlock() In the next patches we will also need: - intel_context_timeline_is_locked() Add it. Signed-off-by: Andi Shyti Cc: sta...@vger.kernel.org Reviewed-by: Nirmoy Das

Re: [Intel-gfx] [PATCH 1/7] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-06 Thread Das, Nirmoy
Hi Fei, On 4/6/2023 4:55 PM, Yang, Fei wrote: > On 4/1/2023 8:38 AM, fei.y...@intel.com wrote: >> From: Fei Yang >> >> On MTL, GT can no longer allocate on LLC - only the CPU can. >> This, along with addition of support for ADM/L4 cache calls a >> MOCS/PAT table update. >> Also add PTE encode

Re: [Intel-gfx] [PATCH 1/7] drm/i915/mtl: Define MOCS and PAT tables for MTL

2023-04-06 Thread Das, Nirmoy
Hi Fei, On 4/1/2023 8:38 AM, fei.y...@intel.com wrote: From: Fei Yang On MTL, GT can no longer allocate on LLC - only the CPU can. This, along with addition of support for ADM/L4 cache calls a MOCS/PAT table update. Also add PTE encode functions for MTL as it has different PAT index

Re: [Intel-gfx] [PATCH 1/5] drm/i915/ttm: Add I915_BO_PREALLOC

2023-04-05 Thread Das, Nirmoy
Hi Andi, On 4/5/2023 1:53 PM, Andi Shyti wrote: Hi Nirmoy, Add a mechanism to keep existing data when creating a ttm object with I915_BO_ALLOC_USER flag. why do we need this mechanism? What was the logic behind? These are all questions people might have when checking this commit. Please be a

Re: [Intel-gfx] [PATCH 1/5] drm/i915/ttm: Add I915_BO_PREALLOC

2023-04-05 Thread Das, Nirmoy
On 4/4/2023 6:23 PM, Andi Shyti wrote: Hi Nirmoy, On Tue, Apr 04, 2023 at 04:30:56PM +0200, Nirmoy Das wrote: Add a mechanism to keep existing data when creating a ttm object with I915_BO_ALLOC_USER flag. why do we need this mechanism? What was the logic behind? These are all questions

Re: [Intel-gfx] [PATCH 1/5] drm/i915/ttm: Add I915_BO_PREALLOC

2023-04-05 Thread Das, Nirmoy
On 4/4/2023 5:30 PM, Andrzej Hajda wrote: On 04.04.2023 16:30, Nirmoy Das wrote: Add a mechanism to keep existing data when creating a ttm object with I915_BO_ALLOC_USER flag. Cc: Matthew Auld Cc: Andi Shyti Cc: Andrzej Hajda Cc: Ville Syrjälä Cc: Jani Nikula Cc: Imre Deak

Re: [Intel-gfx] [PATCH v3] drm/i915/mtl: Disable stolen memory backed FB for A0

2023-04-04 Thread Das, Nirmoy
On 4/4/2023 8:27 PM, Ville Syrjälä wrote: On Tue, Apr 04, 2023 at 08:13:42PM +0200, Nirmoy Das wrote: Stolen memory is not usable for MTL A0 stepping beyond certain access size and we have no control over userspace access size of /dev/fb which can be backed by stolen memory. So disable stolen

Re: [Intel-gfx] [PATCH 3/5] drm/i915: Add a function to mmap framebuffer obj

2023-04-04 Thread Das, Nirmoy
Hi Andi, On 4/4/2023 6:57 PM, Andi Shyti wrote: Hi Nirmoy, [...] +int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma) +{ + struct drm_i915_private *i915 = to_i915(obj->base.dev); + struct drm_device *dev = >drm; + struct i915_mmap_offset *mmo

Re: [Intel-gfx] [PATCH] drm/i915: run kernel-doc on headers as part of HDRTEST

2023-04-04 Thread Das, Nirmoy
On 4/4/2023 11:05 AM, Jani Nikula wrote: Enabling kernel-doc warnings in commit aaee4bbe8a1a ("drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y") actually only covers the .c files. And it's good for avoiding warnings in W= builds. However, we need something more to check for

Re: [Intel-gfx] [PATCH] drm/i915/mtl: Fix MTL stolen memory GGTT mapping

2023-03-28 Thread Das, Nirmoy
On 3/28/2023 3:24 AM, Daniele Ceraolo Spurio wrote: The PTEs expect the offset from the base of the fake LMEM region (i.e. the base of stolen) and not from the base of the DSM. Quoting the specs: "Driver will set the Device Memory bit = 1 in the PTE when pointing to a page in DSM and program

Re: [Intel-gfx] [PATCH] drm/i915/gem: Flush lmem contents after construction

2023-03-23 Thread Das, Nirmoy
On 3/16/2023 5:59 PM, Nirmoy Das wrote: From: Chris Wilson i915_gem_object_create_lmem_from_data() lacks the flush of the data written to lmem to ensure the object is marked as dirty and the writes flushed to the backing store. Once created, we can immediately release the obj->mm.mapping

Re: [Intel-gfx] [PATCH v2: 1/3] drm/i915: Add a function to mmap framebuffer obj

2023-03-23 Thread Das, Nirmoy
On 3/20/2023 3:02 PM, Andrzej Hajda wrote: On 20.03.2023 11:09, Nirmoy Das wrote: Implement i915_gem_fb_mmap() to enable fb_ops.fb_mmap() callback for i915's framebuffer objects. v2: add a comment why i915_gem_object_get() needed(Andi). Cc: Matthew Auld Cc: Andi Shyti Cc: Ville Syrjälä

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/selftests: Drop igt_cs_tlb (rev2)

2023-03-20 Thread Das, Nirmoy
On 2/18/2023 2:47 PM, Patchwork wrote: Project List - Patchwork *Patch Details* *Series:* drm/i915/selftests: Drop igt_cs_tlb (rev2) *URL:* https://patchwork.freedesktop.org/series/114154/ *State:*failure *Details:*

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Drop igt_cs_tlb

2023-03-20 Thread Das, Nirmoy
On 2/17/2023 11:33 PM, Jonathan Cavitt wrote: The gt_tlb live selftest has the same code coverage as the igt_cs_tlb subtest of gtt, except it is better at detecting TLB bugs. Furthermore, while igt_cs_tlb is hitting some unforeseen issues, these issues are either false positives due to the

Re: [Intel-gfx] [RFC PATCH 1/2] drm/i915: Add a function to mmap framebuffer obj

2023-03-20 Thread Das, Nirmoy
On 3/20/2023 1:38 AM, Andi Shyti wrote: Hi Nirmoy, On Thu, Mar 16, 2023 at 06:22:19PM +0100, Nirmoy Das wrote: Implement i915_gem_fb_mmap() to enable fb_ops.fb_mmap() callback for i915's framebuffer objects. v2: add a comment why i915_gem_object_get() needed(Andi). Cc: Matthew Auld Cc:

Re: [Intel-gfx] [PATCH v2 2/2] drm/i915/debugfs: Enable upper layer interfaces to act on all gt's

2023-03-17 Thread Das, Nirmoy
On 3/1/2023 12:02 PM, Andi Shyti wrote: The commit 82a149a62b6b5 ('drm/i915/gt: move remaining debugfs interfaces into gt') moved gt-related debugfs files in the gtX/ directories to operate on individual gt's. However, the original files were only functioning on the root tile (tile 0) and

Re: [Intel-gfx] [RFC PATCH 2/2] drm/i915/display: Implement fb_mmap callback function

2023-03-17 Thread Das, Nirmoy
Hi Jani, On 3/17/2023 10:39 AM, Jani Nikula wrote: On Thu, 16 Mar 2023, Nirmoy Das wrote: If stolen memory allocation fails for fbdev, the driver will fallback to system memory. Calculation of smem_start is wrong for such framebuffer objs if the platform comes with no gmadr or no aperture.

Re: [Intel-gfx] [PATCH] drm/i915/gem: Clarify seemingly unaccounted obj refcount inc

2023-03-16 Thread Das, Nirmoy
On 3/15/2023 11:54 AM, Nirmoy Das wrote: Add a comment why there is a obj refcount inc before installing the vm_ops for the mmap call. Also remove the invalid older comment as drm API(drm_gem_prime_mmap()) will hold an obj reference before calling this driver mmap callback so we can't have

Re: [Intel-gfx] [PATCH 0/7] drm/i915/regs: split display regs by function

2023-03-16 Thread Das, Nirmoy
On 3/16/2023 2:29 PM, Jani Nikula wrote: Shave off 1.2k lines from i915_reg.h. Jani Nikula (7): drm/i915/pps: split out PPS regs to a separate file drm/i915/tv: split out TV regs to a separate file drm/i915/aux: split out DP AUX regs to a separate file drm/i915/fdi: split out FDI

Re: [Intel-gfx] [PATCH] drm/i915: Simplify vcs/bsc engine selection

2023-03-16 Thread Das, Nirmoy
On 3/16/2023 3:27 PM, Tvrtko Ursulin wrote: From: Tvrtko Ursulin No need to look at the mask of present engines when we already have a count stored ever since e2d0ff3525b9 ("drm/i915: Count engine instances per uabi class"). Signed-off-by: Tvrtko Ursulin Cc: Jonathan Cavitt

Re: [Intel-gfx] [PATCH] drm/i915/gt: perform uc late init after probe error injection

2023-03-15 Thread Das, Nirmoy
On 3/14/2023 4:19 PM, Andrzej Hajda wrote: Probe pseudo errors should be injected only in places where real errors can be encountered, otherwise unwinding code can be broken. Placing intel_uc_init_late before i915_inject_probe_error violated this rule, resulting in following bug:

Re: [Intel-gfx] [PATCH] drm/i915/opregion: Fix CONFIG_ACPI=n builds adding missing intel_opregion_cleanup() prototype

2023-03-14 Thread Das, Nirmoy
On 3/14/2023 10:27 AM, Imre Deak wrote: Add the missing intel_opregion_cleanup() prototype fixing CONFIG_ACPI=n builds. Fixes: 3e226e4a2180 ("drm/i915/opregion: Cleanup opregion after errors during driver loading") Cc: Jani Nikula Reported-by: kernel test robot Link:

Re: [Intel-gfx] [RFC PATCH 1/2] drm/i915: Add a function to mmap framebuffer obj

2023-03-14 Thread Das, Nirmoy
Hi Andi, On 3/13/2023 7:37 PM, Andi Shyti wrote: Hi Nirmoy, [...] +int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma) +{ + struct drm_i915_private *i915 = to_i915(obj->base.dev); + struct drm_device *dev = >drm; + struct i915_mmap_offset *mmo

Re: [Intel-gfx] [PATCH v6 2/2] drm/i915: add guard page to ggtt->error_capture

2023-03-13 Thread Das, Nirmoy
On 3/10/2023 10:23 AM, Andrzej Hajda wrote: Write-combining memory allows speculative reads by CPU. ggtt->error_capture is WC mapped to CPU, so CPU/MMU can try to prefetch memory beyond the error_capture, ie it tries to read memory pointed by next PTE in GGTT. If this PTE points to invalid

Re: [Intel-gfx] [PATCH v6 1/2] drm/i915/gt: introduce vm->scratch_range callback

2023-03-13 Thread Das, Nirmoy
On 3/10/2023 10:23 AM, Andrzej Hajda wrote: The callback will be responsible for setting scratch page PTEs for specified range. In contrast to clear_range it cannot be optimized to nop. It will be used by code adding guard pages. Signed-off-by: Andrzej Hajda Reviewed-by: Nirmoy Das ---

Re: [Intel-gfx] [PATCH] drm/i915/active: Fix missing debug object activation

2023-03-13 Thread Das, Nirmoy
On 3/13/2023 10:55 AM, Janusz Krzysztofik wrote: On Friday, 10 March 2023 17:48:10 CET Das, Nirmoy wrote: Hi Janusz, On 3/10/2023 4:19 PM, Janusz Krzysztofik wrote: Hi Nirmoy, On Friday, 10 March 2023 15:11:38 CET Nirmoy Das wrote: debug_active_activate() expected ref->count to be z

Re: [Intel-gfx] [PATCH] drm/i915/active: Fix missing debug object activation

2023-03-10 Thread Das, Nirmoy
Hi Janusz, On 3/10/2023 4:19 PM, Janusz Krzysztofik wrote: Hi Nirmoy, On Friday, 10 March 2023 15:11:38 CET Nirmoy Das wrote: debug_active_activate() expected ref->count to be zero which is not true anymore as __i915_active_activate() calls debug_active_activate() after incrementing the

Re: [Intel-gfx] [RFC PATCH 2/2] drm/i915/display: Implement fb_mmap callback function

2023-03-10 Thread Das, Nirmoy
Ping, please provide some feedback on this. On 3/7/2023 3:46 PM, Nirmoy Das wrote: If stolen memory allocation fails for fbdev, the driver will fallback to system memory. Calculation of smem_start is wrong for such framebuffer objs if the platform comes with no gmadr or no aperture. Solve this

Re: [Intel-gfx] [PATCH] drm/i915/gt: Update engine_init_common documentation

2023-03-10 Thread Das, Nirmoy
On 3/9/2023 11:25 PM, Andi Shyti wrote: Hi Nirmoy, On Thu, Mar 09, 2023 at 05:58:52PM +0100, Nirmoy Das wrote: Change the function doc to reflect updated name. Cc: Andi Shyti Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Intel-gfx] [PATCH] drm/i915/gt: Update engine_init_common documentation

2023-03-09 Thread Das, Nirmoy
On 3/9/2023 6:33 PM, Matt Roper wrote: On Thu, Mar 09, 2023 at 05:58:52PM +0100, Nirmoy Das wrote: Change the function doc to reflect updated name. Cc: Andi Shyti Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Intel-gfx] [PATCH] drm/i915/gt: make kobj attributes const

2023-03-09 Thread Das, Nirmoy
On 3/9/2023 9:16 AM, Jani Nikula wrote: There's no need for any of these to be mutable, constify: drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0020 files.0 drivers/gpu/drm/i915/gt/sysfs_engines.o: .data 0050 files.1 drivers/gpu/drm/i915/gt/sysfs_engines.o: .data

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: prevent forcewake releases during BAR resize

2023-03-09 Thread Das, Nirmoy
On 3/9/2023 8:54 AM, Andrzej Hajda wrote: On 08.03.2023 18:29, Das, Nirmoy wrote: On 3/8/2023 2:36 PM, Andrzej Hajda wrote: Tests on DG2 machines show that releasing forcewakes during BAR resize results later in forcewake ack timeouts. Do we have a fdo/issues url for that? Having

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: prevent forcewake releases during BAR resize

2023-03-08 Thread Das, Nirmoy
On 3/8/2023 2:36 PM, Andrzej Hajda wrote: Tests on DG2 machines show that releasing forcewakes during BAR resize results later in forcewake ack timeouts. Do we have a fdo/issues url for that? Having that as References would be nice. Since forcewakes can be realeased asynchronously the

Re: [Intel-gfx] [PATCH RFC 3/3] drm/i915/display: Implement fb_mmap callback function

2023-03-07 Thread Das, Nirmoy
Hi Ville, On 3/6/2023 3:32 PM, Ville Syrjälä wrote: On Mon, Mar 06, 2023 at 11:28:50AM +0100, Nirmoy Das wrote: If stolen memory allocation fails for fbdev, the driver will fallback to system memory. Calculation of smem_start is wrong for such framebuffer objs if the platform comes with no

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Set I915_BO_ALLOC_USER for framebuffer

2023-03-06 Thread Das, Nirmoy
On 3/6/2023 6:30 PM, Ville Syrjälä wrote: On Mon, Mar 06, 2023 at 05:22:19PM +0100, Das, Nirmoy wrote: On 3/6/2023 3:21 PM, Ville Syrjälä wrote: On Mon, Mar 06, 2023 at 11:28:48AM +0100, Nirmoy Das wrote: Framebuffer is exposed to userspace so set I915_BO_ALLOC_USER flag for it. This also

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Set I915_BO_ALLOC_USER for framebuffer

2023-03-06 Thread Das, Nirmoy
On 3/6/2023 3:21 PM, Ville Syrjälä wrote: On Mon, Mar 06, 2023 at 11:28:48AM +0100, Nirmoy Das wrote: Framebuffer is exposed to userspace so set I915_BO_ALLOC_USER flag for it. This also make sure that ttm allocates offset for lmem objects. I have no idea what that means. Sorry for poor

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Add a helper func for gem obj mmap

2023-03-06 Thread Das, Nirmoy
On 3/6/2023 3:26 PM, Ville Syrjälä wrote: On Mon, Mar 06, 2023 at 11:28:49AM +0100, Nirmoy Das wrote: Move gem obj mmap code to i915_gem_object_mmap() so that this can be used by others. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 20 ++---

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Set I915_BO_ALLOC_USER for framebuffer

2023-03-06 Thread Das, Nirmoy
On 3/6/2023 2:49 PM, Matthew Auld wrote: On 06/03/2023 13:31, Das, Nirmoy wrote: Hi Matt, On 3/6/2023 1:25 PM, Matthew Auld wrote: On 06/03/2023 12:07, Nirmoy Das wrote: Framebuffer is exposed to userspace so set I915_BO_ALLOC_USER flag for it. This also make sure that ttm allocates offset

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Set I915_BO_ALLOC_USER for framebuffer

2023-03-06 Thread Das, Nirmoy
Hi Matt, On 3/6/2023 1:25 PM, Matthew Auld wrote: On 06/03/2023 12:07, Nirmoy Das wrote: Framebuffer is exposed to userspace so set I915_BO_ALLOC_USER flag for it. This also make sure that ttm allocates offset for lmem objects. Signed-off-by: Nirmoy Das ---  

Re: [Intel-gfx] [PATCH] drm/i915/gt: Use i915 instead of dev_priv as name for the private device

2023-02-14 Thread Das, Nirmoy
On 2/14/2023 12:36 AM, Lucas De Marchi wrote: On Mon, Feb 13, 2023 at 02:11:26PM +0100, Das, Nirmoy wrote: On 2/10/2023 4:03 PM, Andi Shyti wrote: It is becoming a strong habit to call the drm_i915_private structures "i915", but there are still many left that are called dev_priv.

Re: [Intel-gfx] [PATCH] drm/i915/gt: Use i915 instead of dev_priv as name for the private device

2023-02-13 Thread Das, Nirmoy
On 2/10/2023 4:03 PM, Andi Shyti wrote: It is becoming a strong habit to call the drm_i915_private structures "i915", but there are still many left that are called dev_priv. Sometimes this makes grepping a bit challenging and anyway it keeps a coherent style. Rename all the "dev_priv"

Re: [Intel-gfx] [PATCH] drm/i915/display: Pass drm_i915_private as param to i915 funcs

2023-02-10 Thread Das, Nirmoy
On 2/10/2023 1:21 PM, Andi Shyti wrote: Hi Jani, On Thu, Jan 19, 2023 at 12:58:47PM +0200, Jani Nikula wrote: On Thu, 19 Jan 2023, Nirmoy Das wrote: For i915 functions pass struct drm_i915_private directly instead of struct drm_device. Reviewed-by: Jani Nikula but maybe let's wait until

Re: [Intel-gfx] [PATCH] drm/i915: Make sure dsm_size has correct granularity

2023-02-03 Thread Das, Nirmoy
Hi Lucas, On 2/3/2023 7:56 PM, Lucas De Marchi wrote: On Thu, Feb 02, 2023 at 07:02:43PM +0100, Nirmoy Das wrote: DSM granularity is 1MB so make sure we stick to that. I think we need to be a bit more verbose here, because in future we may need to refer to this commit if/when things change

Re: [Intel-gfx] [PATCH] drm/i915/gt: Use sysfs_emit() and sysfs_emit_at()

2023-01-31 Thread Das, Nirmoy
On 1/30/2023 9:43 PM, Andi Shyti wrote: Hi Nirmoy, On Mon, Jan 30, 2023 at 02:13:58PM +0100, Nirmoy Das wrote: Use sysfs_emit() and sysfs_emit_at() in show() callback as recommended by Documentation/filesystems/sysfs.rst Cc: Andi Shyti Signed-off-by: Nirmoy Das I thought we didn't have

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Use sysfs_emit() and sysfs_emit_at()

2023-01-31 Thread Das, Nirmoy
Rerun passed well https://patchwork.freedesktop.org/series/113490/ On 1/30/2023 6:49 PM, Patchwork wrote: Project List - Patchwork *Patch Details* *Series:* drm/i915/gt: Use sysfs_emit() and sysfs_emit_at() *URL:* https://patchwork.freedesktop.org/series/113490/ *State:*failure

Re: [Intel-gfx] [PATCH v2 5/6] drm/ttm: stop allocating a dummy resource for pipelined gutting

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: From: Christian König That should not be necessary any more when drivers should at least be able to handle a move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Acked-by: Nirmoy Das ---

Re: [Intel-gfx] [PATCH v2 4/6] drm/ttm: stop allocating dummy resources during BO creation

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: From: Christian König That should not be necessary any more when drivers should at least be able to handle the move without a resource. Signed-off-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Acked-by: Nirmoy Das

Re: [Intel-gfx] [PATCH v2 3/6] drm/ttm: clear the ttm_tt when bo->resource is NULL

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: In the next few patches, when initially creating a ttm BO, the bo->resource is NULL, and the driver is then expected to handle the initial dummy move. However, if this is created as a system resource the first ttm_tt we create will always have the

Re: [Intel-gfx] [PATCH v2 2/6] drm/i915/ttm: audit remaining bo->resource

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: In the near future TTM will have NULL bo->resource when the object is initially created, plus after calling into pipeline-gutting. Try to handle the remaining cases. In practice NULL bo->resource should be taken to mean swapped-out or purged object.

Re: [Intel-gfx] [PATCH v2 1/6] drm/i915/ttm: fix sparse warning

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 1:06 PM, Matthew Auld wrote: Sparse complains with: drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: expected restricted vm_fault_t [assigned] [usertype] ret drivers/gpu/drm/i915/gem/i915_gem_ttm.c:1066:21: sparse: got int Fixes: 516198d317d8 ("drm/i915: audit

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 5/6] intel_gpu_top: Fix cleanup on old kernels / unsupported GPU

2023-01-30 Thread Das, Nirmoy
On 1/30/2023 11:55 AM, Tvrtko Ursulin wrote: On 27/01/2023 16:10, Kamil Konieczny wrote: Hi Tvrtko, On 2023-01-27 at 11:12:40 +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Avoid trying to dereference null engines on exit when there are either none which are supported, or kernel does

Re: [Intel-gfx] [PATCH] drm/i915/mtl/selftests: Flush all tiles on test exit

2023-01-25 Thread Das, Nirmoy
On 1/25/2023 4:10 PM, Andi Shyti wrote: Hi Nirmoy, On Wed, Jan 25, 2023 at 11:00:03AM +0100, Nirmoy Das wrote: From: Tvrtko Ursulin We want to idle all tiles when exiting selftests. Cc: Matt Roper Signed-off-by: Tvrtko Ursulin Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti except

Re: [Intel-gfx] [PATCH] drm/i915/mtl/selftests: Flush all tiles on test exit

2023-01-25 Thread Das, Nirmoy
Hi Andi, On 1/25/2023 3:36 PM, Andi Shyti wrote: Hi Nirmoy, On Wed, Jan 25, 2023 at 11:00:03AM +0100, Nirmoy Das wrote: From: Tvrtko Ursulin We want to idle all tiles when exiting selftests. Cc: Matt Roper Signed-off-by: Tvrtko Ursulin Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti

Re: [Intel-gfx] [PATCH] drm/i915/gt: Clear wedged status upon suspend

2023-01-25 Thread Das, Nirmoy
Hi Rodrigo, On 1/24/2023 8:26 PM, Rodrigo Vivi wrote: On Tue, Jan 24, 2023 at 12:07:19PM +0100, Das, Nirmoy wrote: Forgot to add the drm issue a reference. On 1/24/2023 12:05 PM, Nirmoy Das wrote: From: Chris Wilson Currently we use set-wedged on suspend if the workload is not responding

Re: [Intel-gfx] [PATCH v2] drm/i915/display: Pass drm_i915_private as param to i915 funcs

2023-01-25 Thread Das, Nirmoy
On 1/25/2023 10:58 AM, Jani Nikula wrote: On Wed, 25 Jan 2023, Nirmoy Das wrote: For i915 functions pass struct drm_i915_private directly instead of struct drm_device. v2: Use to_i915(dev) directly without alias(Andrzej). Cc: Rodrigo Vivi Suggested-by: Jani Nikula Signed-off-by: Nirmoy

Re: [Intel-gfx] [PATCH] drm/i915/display: Pass drm_i915_private as param to i915 funcs

2023-01-25 Thread Das, Nirmoy
On 1/25/2023 8:50 AM, Andrzej Hajda wrote: On 24.01.2023 15:17, Nirmoy Das wrote: For i915 functions pass struct drm_i915_private directly instead of struct drm_device. Cc: Rodrigo Vivi Suggested-by: Jani Nikula Signed-off-by: Nirmoy Das Reviewed-by: Jani Nikula Reviewed-by: Andrzej

Re: [Intel-gfx] [PATCH] drm/i915/xehpsdv/selftests: Flush all tiles on test exit

2023-01-24 Thread Das, Nirmoy
Hi Andi, On 1/24/2023 5:10 PM, Andi Shyti wrote: Hi Nirmoy, On Tue, Jan 24, 2023 at 03:22:12PM +0100, Nirmoy Das wrote: From: Tvrtko Ursulin We want to idle all tiles when exiting selftests. Signed-off-by: Tvrtko Ursulin Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Thanks.

Re: [Intel-gfx] [PATCH] drm/i915/xehpsdv/selftests: Flush all tiles on test exit

2023-01-24 Thread Das, Nirmoy
On 1/24/2023 6:01 PM, Matt Roper wrote: On Tue, Jan 24, 2023 at 03:22:12PM +0100, Nirmoy Das wrote: From: Tvrtko Ursulin We want to idle all tiles when exiting selftests. This test doesn't sound like it's specific to "xehpsdv." Was the patch title supposed to be "xehp" (the architecture,

Re: [Intel-gfx] [PATCH] drm/i915/gt: Clear wedged status upon suspend

2023-01-24 Thread Das, Nirmoy
Forgot to add the drm issue a reference. On 1/24/2023 12:05 PM, Nirmoy Das wrote: From: Chris Wilson Currently we use set-wedged on suspend if the workload is not responding in order to allow a fast suspend (albeit at the cost of discarding the current userspace). This may leave the device

Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Fix cleanup on old kernels / unsupported GPU

2023-01-23 Thread Das, Nirmoy
On 1/23/2023 12:09 PM, Das, Nirmoy wrote: Hi Tvrtko, On 1/23/2023 11:24 AM, Tvrtko Ursulin wrote: On 20/01/2023 14:29, Das, Nirmoy wrote: Hi Tvrtko, On 1/19/2023 4:54 PM, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Avoid trying to dereference null engines on exit when there are either

Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Fix cleanup on old kernels / unsupported GPU

2023-01-23 Thread Das, Nirmoy
On 1/19/2023 4:54 PM, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Avoid trying to dereference null engines on exit when there are either none which are supported, or kernel does not have i915 PMU support. Signed-off-by: Tvrtko Ursulin Acked-by: Nirmoy Das --- tools/intel_gpu_top.c | 10

Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Fix cleanup on old kernels / unsupported GPU

2023-01-23 Thread Das, Nirmoy
Hi Tvrtko, On 1/23/2023 11:24 AM, Tvrtko Ursulin wrote: On 20/01/2023 14:29, Das, Nirmoy wrote: Hi Tvrtko, On 1/19/2023 4:54 PM, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Avoid trying to dereference null engines on exit when there are either none which are supported, or kernel does

Re: [Intel-gfx] [PATCH i-g-t] intel_gpu_top: Fix cleanup on old kernels / unsupported GPU

2023-01-20 Thread Das, Nirmoy
Hi Tvrtko, On 1/19/2023 4:54 PM, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Avoid trying to dereference null engines on exit when there are either none which are supported, or kernel does not have i915 PMU support. Signed-off-by: Tvrtko Ursulin --- tools/intel_gpu_top.c | 10 +++---

Re: [Intel-gfx] [PATCH] drm/i915/display: Pass drm_i915_private as param to i915 funcs

2023-01-19 Thread Das, Nirmoy
On 1/19/2023 3:06 PM, Andrzej Hajda wrote: On 19.01.2023 10:58, Nirmoy Das wrote: For i915 functions pass struct drm_i915_private directly instead of struct drm_device. Cc: Rodrigo Vivi Suggested-by: Jani Nikula Signed-off-by: Nirmoy Das It could be good start for boring refactoring :)

Re: [Intel-gfx] [PATCH 1/2] drm/drm_vma_manager: Add drm_vma_node_allow_once()

2023-01-19 Thread Das, Nirmoy
On 1/19/2023 2:25 PM, Maxime Ripard wrote: On Tue, 17 Jan 2023 18:52:35 +0100, Nirmoy Das wrote: Currently there is no easy way for a drm driver to safely check and allow drm_vma_offset_node for a drm file just once. Allow drm drivers to call non-refcounted version of drm_vma_node_allow() so

Re: [Intel-gfx] [PATCH] drm/i915/display: Pass drm_i915_private as param to i915 funcs

2023-01-19 Thread Das, Nirmoy
On 1/19/2023 11:58 AM, Jani Nikula wrote: On Thu, 19 Jan 2023, Nirmoy Das wrote: For i915 functions pass struct drm_i915_private directly instead of struct drm_device. Reviewed-by: Jani Nikula but maybe let's wait until we've synced up with drm-misc-next to avoid the unnecessary conflict

Re: [Intel-gfx] [PATCH] drm/i915: Remove unused variable

2023-01-19 Thread Das, Nirmoy
On 1/19/2023 10:21 AM, Jani Nikula wrote: On Wed, 18 Jan 2023, Rodrigo Vivi wrote: On Wed, Jan 18, 2023 at 06:06:24PM +0100, Nirmoy Das wrote: Removed unused i915 var. Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") Signed-off-by: Nirmoy Das

Re: [Intel-gfx] [PATCH 5/7] drm/i915: move I915_GEM_GPU_DOMAINS to i915_gem.h

2023-01-18 Thread Das, Nirmoy
Reviewed-by: Nirmoy Das For rest of the series Acked-by: Nirmoy Das Thanks, Nirmoy On 1/18/2023 2:15 PM, Jani Nikula wrote: Declutter i915_drv.h. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h | 7 --- drivers/gpu/drm/i915/i915_gem.h | 7 +++ 2 files changed,

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Fix a memory leak with reused mmap_offset

2023-01-18 Thread Das, Nirmoy
On 1/18/2023 11:26 AM, Mirsad Todorovac wrote: Hi, On 1/18/23 10:19, Tvrtko Ursulin wrote: Thanks for working on this, it looks good to me and it aligns with how i915 uses the facility. Copying Mirsad who reported the issue in case he is still happy to give it a quick test. Mirsad, I

Re: [Intel-gfx] [PATCH 1/2] drm/drm_vma_manager: Add drm_vma_node_allow_once()

2023-01-18 Thread Das, Nirmoy
On 1/18/2023 10:38 AM, Andi Shyti wrote: On Tue, Jan 17, 2023 at 06:52:35PM +0100, Nirmoy Das wrote: Currently there is no easy way for a drm driver to safely check and allow drm_vma_offset_node for a drm file just once. Allow drm drivers to call non-refcounted version of drm_vma_node_allow()

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/gem_mmap_gtt: add test mmap_closed_bo

2023-01-18 Thread Das, Nirmoy
On 12/22/2022 11:04 AM, Tvrtko Ursulin wrote: From: Chuansheng Liu Recently we figured out one memory leak in i915 driver when running below alike test: create_bo gem_mmap_gtt bo gem_mmap_gtt bo twice close_bo then the memory leak is detected. More details can be referred in

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Fix a memory leak with reused mmap_offset

2023-01-18 Thread Das, Nirmoy
Hi Tvrtko, On 1/18/2023 10:19 AM, Tvrtko Ursulin wrote: Hi, Thanks for working on this, it looks good to me and it aligns with how i915 uses the facility. Copying Mirsad who reported the issue in case he is still happy to give it a quick test. Mirsad, I don't know if you are subscribed

Re: [Intel-gfx] [PATCH v2] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-17 Thread Das, Nirmoy
|Reviewed-by: Nirmoy Das | On 1/17/2023 1:32 PM, Nirmoy Das wrote: From: Chris Wilson Make sure that upon error after we have acquired the wakeref we do release it again. v2: add another missing "goto out_wf"(Andi). Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in

Re: [Intel-gfx] [PATCH 1/2] drm/print: Add drm_dbg_ratelimited

2023-01-17 Thread Das, Nirmoy
Hi Sam, On 1/17/2023 3:49 PM, Sam Ravnborg wrote: Hi Nirmoy On Tue, Jan 17, 2023 at 12:53:49PM +0100, Nirmoy Das wrote: Add a function for ratelimitted debug print. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Matthew Auld

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-17 Thread Das, Nirmoy
On 1/16/2023 7:49 PM, Andi Shyti wrote: Hi Nirmoy, On Fri, Jan 13, 2023 at 01:00:53PM +0100, Nirmoy Das wrote: From: Chris Wilson Make sure that upon error after we have acquired the wakeref we do release it again. Fixes: 027c38b4121e ("drm/i915/selftests: Grab the runtime pm in

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-13 Thread Das, Nirmoy
On 1/13/2023 1:05 PM, Matthew Auld wrote: On 13/01/2023 12:02, Das, Nirmoy wrote: Thanks Matt, I missed the Fixes tag so resent it with fixes and Cc to stable. I don't think kernel selftests are really stable material. AFAIK it's not something normal users care about. True, in that case

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Unwind hugepages to drop wakeref on error

2023-01-13 Thread Das, Nirmoy
Thanks Matt, I missed the Fixes tag so resent it with fixes and Cc to stable. On 1/13/2023 12:51 PM, Matthew Auld wrote: On 13/01/2023 11:49, Nirmoy Das wrote: From: Chris Wilson Make sure that upon error after we have acquired the wakeref we do release it again. Signed-off-by: Chris

Re: [Intel-gfx] [PATCH] drm/i915: Update docs in intel_wakeref.h

2023-01-10 Thread Das, Nirmoy
On 1/9/2023 2:57 PM, Andi Shyti wrote: Hi Nirmoy, On Thu, Jan 05, 2023 at 09:38:43PM +0100, Nirmoy Das wrote: Fix docs for __intel_wakeref_put() and intel_wakeref_get() to reflect current behaviour. Signed-off-by: Nirmoy Das Thanks for adding also the change suggested by Ashutosh!

Re: [Intel-gfx] [PATCH v3 11/11] drm/i915: replace Intel internal tracker with kernel core ref_tracker

2023-01-06 Thread Das, Nirmoy
Hi Andrzej, On 2/22/2022 12:25 AM, Andrzej Hajda wrote: Beside reusing existing code, the main advantage of ref_tracker is tracking per instance of wakeref. It allows also to catch double put. On the other side we lose information about the first acquire and the last release, but the advantages

  1   2   3   >