Re: [PATCH 01/20] drm/drm_managed: try to improve the drmm DOC

2024-05-13 Thread Andrzej Hajda
_device. For that we instead mark the device sections. See + * drm_dev_enter(), drm_dev_exit() and drm_dev_unplug(). I would emphasize somewhere that after device unbind any interaction with physical device is forbidden (are some exceptions for this?). Anyway nice stuff. Reviewed-by

Re: [PATCH] drm/i915/gt: Disarm breadcrumbs if engines are already idle

2024-05-09 Thread Andrzej Hajda
are no more engines awake, disarm the breadcrumb and go to sleep. Fixes: 9d5612ca165a ("drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission") Closes: https://gitlab.freedesktop.org/drm/intel/issues/10026 Signed-off-by: Chris Wilson Cc: Andrzej Hajda Cc: # v5.12+ Signed-o

Re: [PATCH 1/2] drm/print: drop include debugfs.h and include where needed

2024-04-10 Thread Andrzej Hajda
On 10.04.2024 16:14, Jani Nikula wrote: Surprisingly many places depend on debugfs.h to be included via drm_print.h. Fix them. Signed-off-by: Jani Nikula --- Reviewed-by: Andrzej Hajda Regards Andrzej Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Cc

Re: [Intel-gfx] [PATCH v5 0/7] Introduce __xchg, non-atomic xchg

2024-04-05 Thread Andrzej Hajda
On 05.04.2024 16:47, Jani Nikula wrote: On Mon, 27 Feb 2023, Peter Zijlstra wrote: On Thu, Feb 23, 2023 at 10:24:19PM +0100, Andrzej Hajda wrote: On 22.02.2023 18:04, Peter Zijlstra wrote: On Wed, Jan 18, 2023 at 04:35:22PM +0100, Andrzej Hajda wrote: Andrzej Hajda (7): arch: rename

Re: [PATCH] drm/i915/display: Check GGTT to determine phys_base

2023-12-04 Thread Andrzej Hajda
On 30.11.2023 17:16, Paz Zcharya wrote: There was an assumption that for iGPU there should be a 1:1 mapping of GGTT to physical address pointing to actual framebuffer. This assumption is not valid anymore for MTL. Fix that by checking GGTT to determine the phys address. The following algorith

Re: [PATCH] drm/i915/gt: Reduce log severity on reset prepare.

2023-12-04 Thread Andrzej Hajda
error or not. Cc: Tvrtko Ursulin Cc: John Harrison Cc: Andi Shyti Cc: Andrzej Hajda Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5591 Signed-off-by: Nirmoy Das --- Reviewed-by: Andrzej Hajda Regards Andrzej drivers/gpu/drm/i915/gt/intel_reset.c | 8 1 file changed, 4

Re: [Intel-gfx] [PATCH] drm/i915/display: Fix phys_base to be relative not absolute

2023-11-28 Thread Andrzej Hajda
On 28.11.2023 04:47, Paz Zcharya wrote: On Mon, Nov 27, 2023 at 8:20 PM Paz Zcharya wrote: On 21.11.2023 13:06, Andrzej Hajda wrote: On 18.11.2023 00:01, Paz Zcharya wrote: On Tue, Nov 14, 2023 at 10:13:59PM -0500, Rodrigo Vivi wrote: On Sun, Nov 05, 2023 at 05:27:03PM +, Paz Zcharya

Re: [Intel-gfx] [PATCH] drm/i915/display: Fix phys_base to be relative not absolute

2023-11-22 Thread Andrzej Hajda
On 21.11.2023 13:06, Andrzej Hajda wrote: On 18.11.2023 00:01, Paz Zcharya wrote: On Tue, Nov 14, 2023 at 10:13:59PM -0500, Rodrigo Vivi wrote: On Sun, Nov 05, 2023 at 05:27:03PM +, Paz Zcharya wrote: Fix the value of variable `phys_base` to be the relative offset in stolen memory, and

Re: [Intel-gfx] [PATCH] drm/i915/display: Fix phys_base to be relative not absolute

2023-11-21 Thread Andrzej Hajda
On 18.11.2023 00:01, Paz Zcharya wrote: On Tue, Nov 14, 2023 at 10:13:59PM -0500, Rodrigo Vivi wrote: On Sun, Nov 05, 2023 at 05:27:03PM +, Paz Zcharya wrote: Fix the value of variable `phys_base` to be the relative offset in stolen memory, and not the absolute offset of the GSM. to me it

Re: [PATCH] i915/perf: Fix NULL deref bugs with drm_dbg() calls

2023-10-27 Thread Andrzej Hajda
river specific drm_dbg call") Signed-off-by: Harshit Mogalapalli Reviewed-by: Andrzej Hajda Regards Andrzej --- This is found using smatch(static analysis tool), only compile tested. --- drivers/gpu/drm/i915/i915_perf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) di

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Remove xehpsdv support

2023-10-06 Thread Andrzej Hajda
/gpu/drm/i915/intel_step.c | 10 --- 17 files changed, 8 insertions(+), 232 deletions(-) Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Remove incomplete PVC plumbing

2023-10-06 Thread Andrzej Hajda
| 142 -- drivers/gpu/drm/i915/selftests/intel_uncore.c | 2 - 18 files changed, 10 insertions(+), 432 deletions(-) Nice diffstat. Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [Intel-gfx] [PATCH 1/3] drm/i915: Remove early/pre-production Haswell code

2023-10-06 Thread Andrzej Hajda
On 06.10.2023 10:31, Tvrtko Ursulin wrote: From: Tvrtko Ursulin It is not our policy to keep pre-production hardware support for this long so I guess this one was just forgotten. Signed-off-by: Tvrtko Ursulin Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v7 4/4] drm/i915/mtl: Skip MCR ops for ring fault register

2023-09-28 Thread Andrzej Hajda
ent. v4: improve the comment further(Andi) Signed-off-by: Nirmoy Das Reviewed-by: Matt Roper Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/intel_gt.c | 13 - drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/i915_gpu_er

Re: [Intel-gfx] [PATCH v7 2/4] drm/i915: Introduce the intel_gt_resume_early()

2023-09-28 Thread Andrzej Hajda
On 28.09.2023 15:00, Nirmoy Das wrote: Move early resume functions of gt to a proper file. Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 6 ++ drivers/gpu/drm/i915/gt/intel_gt_pm.h | 1 + drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v7 1/4] drm/i915: Introduce intel_gt_mcr_lock_sanitize()

2023-09-28 Thread Andrzej Hajda
ep_assert_not_held(>->mcr_lock); + + if (GRAPHICS_VER_FULL(gt->i915) >= IP_VER(12, 70)) + intel_uncore_write_fw(gt->uncore, MTL_STEER_SEMAPHORE, 0x1); I wonder if it wouldn't be useful to check and report if it is locked before unconditional release, no s

Re: [Intel-gfx] [PATCH v3] drm/i915/mtl: Skip MCR ops for ring fault register

2023-09-27 Thread Andrzej Hajda
ment. Signed-off-by: Nirmoy Das Reviewed-by: Matt Roper Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/intel_gt.c | 13 - drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 10 +- 3 files changed, 2

Re: [PATCH] drm/i915: Don't set PIPE_CONTROL_FLUSH_L3 for aux inval

2023-09-26 Thread Andrzej Hajda
On 26.09.2023 16:24, Nirmoy Das wrote: PIPE_CONTROL_FLUSH_L3 is not needed for aux invalidation so don't set that. Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before invalidation") Cc: Jonathan Cavitt Cc: Andi Shyti Cc: # v5.8+ Cc: Andrzej Hajda Cc: Tvrtko Ur

Re: [Intel-gfx] [PATCH] drm/i915/gem: Make i915_gem_shrinker multi-gt aware

2023-09-25 Thread Andrzej Hajda
reed_pages += count; + if (__i915_vma_unbind(vma) == 0) + freed_pages += count; - i915_gem_object_unlock(obj); + i915_gem_object_unlock(obj); + } + mutex_unlock(>->ggtt->vm.mutex);

Re: [PATCH 3/9] drm/i915/selftests: Annotate struct perf_series with __counted_by

2023-09-25 Thread Andrzej Hajda
: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index a9b79888c193..acae30a04a94 100644 --- a/drivers

Re: [Intel-gfx] [PATCH] i915: Limit the length of an sg list to the requested length

2023-09-19 Thread Andrzej Hajda
nvert shmem_sg_free_table() to use a folio_batch") Cc: sta...@vger.kernel.org # 6.5.x Link: https://gitlab.freedesktop.org/drm/intel/-/issues/9256 Link: https://lore.kernel.org/lkml/6287208.lov4wx5...@natalenko.name/ Reported-by: Oleksandr Natalenko Tested-by: Oleksandr Natalenko Reviewed-b

Re: [PATCH] drm/i915: Fix aux invalidation with proper pipe_control flag

2023-09-19 Thread Andrzej Hajda
On 19.09.2023 13:47, Nirmoy Das wrote: The suggestion from the spec is to do l3 fabric flush not L3 flush. Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before invalidation") Cc: Jonathan Cavitt Cc: Andi Shyti Cc: # v5.8+ Cc: Nirmoy Das Cc: Andrzej Hajda Cc: Tvrt

Re: [Intel-gfx] [PATCH] drm/i915: Replace i915->gt0 with to_gt(i915)

2023-07-25 Thread Andrzej Hajda
t.c | 2 +- drivers/gpu/drm/i915/gt/intel_region_lmem.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 8 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Andrzej Hajda Regards Andrzej diff --gi

Re: [Intel-gfx] [PATCH v8 9/9] drm/i915/gt: Support aux invalidation on all engines

2023-07-24 Thread Andrzej Hajda
ed/fixed: Reviewed-by: Andrzej Hajda Regards Andrzej + case VCS0: + return GEN12_VD0_AUX_INV; + case VCS2: + return GEN12_VD2_AUX_INV; + case VECS0: + return GEN12_VE0_AUX_INV; + case CCS0: + return GEN12_CCS0_AUX

Re: [PATCH v8 7/9] drm/i915/gt: Ensure memory quiesced before invalidation for all engines

2023-07-24 Thread Andrzej Hajda
eries. I think would need to re-architecture all the patch structure if I want to remove it :) Are you strong with this change? Nope, if it finally arrives then OK for me. Reviewed-by: Andrzej Hajda Regards Andrzej Andi

Re: [PATCH v8 7/9] drm/i915/gt: Ensure memory quiesced before invalidation for all engines

2023-07-24 Thread Andrzej Hajda
On 21.07.2023 18:15, Andi Shyti wrote: Commit af9e423a8aae ("drm/i915/gt: Ensure memory quiesced before invalidation") has made sure that the memory is quiesced before invalidating the AUX CCS table. Do it for all the other engines and not just RCS. Signed-off-by: Andi Shyti Cc: Jonathan Cav

Re: [PATCH v8 6/9] drm/i915/gt: Refactor intel_emit_pipe_control_cs() in a single function

2023-07-24 Thread Andrzej Hajda
-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 47 +--- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c index 139a7e69f5c4d

Re: [PATCH v8 5/9] drm/i915/gt: Enable the CCS_FLUSH bit in the pipe control

2023-07-24 Thread Andrzej Hajda
Shyti Cc: Jonathan Cavitt Cc: Nirmoy Das Cc: # v5.8+ Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 7 +++ drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/d

Re: [PATCH v8 2/9] drm/i915: Add the gen12_needs_ccs_aux_inv helper

2023-07-24 Thread Andrzej Hajda
() function that tells whether aux invalidation is needed or not. Currently PVC is the only exception to the above mentioned rule. Signed-off-by: Andi Shyti Cc: Matt Roper Cc: Jonathan Cavitt Cc: # v5.8+ Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c

Re: [Intel-gfx] [PATCH v7 5/9] drm/i915/gt: Enable the CCS_FLUSH bit in the pipe control

2023-07-21 Thread Andrzej Hajda
On 20.07.2023 23:07, Andi Shyti wrote: Enable the CCS_FLUSH bit 13 in the control pipe for render and compute engines in platforms starting from Meteor Lake (BSPEC 43904 and 47112). Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux table invalidate for all engines") Signed-off-by: Andi Shyti Cc: Jo

Re: [Intel-gfx] [PATCH v7 6/9] drm/i915/gt: Refactor intel_emit_pipe_control_cs() in a single function

2023-07-21 Thread Andrzej Hajda
On 20.07.2023 23:07, Andi Shyti wrote: Just a trivial refactoring for reducing the number of code duplicate. This will come at handy in the next commits. Signed-off-by: Andi Shyti Cc: # v5.8+ --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 44 +--- 1 file changed, 23 inse

Re: [Intel-gfx] [PATCH v7 5/9] drm/i915/gt: Enable the CCS_FLUSH bit in the pipe control

2023-07-21 Thread Andrzej Hajda
On 20.07.2023 23:07, Andi Shyti wrote: Enable the CCS_FLUSH bit 13 in the control pipe for render and compute engines in platforms starting from Meteor Lake (BSPEC 43904 and 47112). Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux table invalidate for all engines") Signed-off-by: Andi Shyti Cc: Jo

Re: [Intel-gfx] [PATCH v7 2/9] drm/i915: Add the has_aux_ccs device property

2023-07-21 Thread Andrzej Hajda
On 20.07.2023 23:07, Andi Shyti wrote: We always assumed that a device might either have AUX or FLAT CCS, but this is an approximation that is not always true as it requires some further per device checks. Add the "has_aux_ccs" flag in the intel_device_info structure in order to have a per devic

Re: [Intel-gfx] [PATCH] drm/i915: Fix an error handling path in igt_write_huge()

2023-07-18 Thread Andrzej Hajda
tophe JAILLET For me seems correct. Reviewed-by: Andrzej Hajda Regards Andrzej --- /!\ Speculative /!\ This patch is based on analysis of the surrounding code and should be reviewed with care ! If the patch is wrong, maybe a comment in the code could explain why. /!\ Speculative

Re: [PATCH] drm/i915/tv: avoid possible division by zero

2023-07-18 Thread Andrzej Hajda
On 18.07.2023 12:10, Su Hui wrote: On 2023/7/18 13:39, Dan Carpenter wrote: On Mon, Jul 17, 2023 at 04:52:51PM +0200, Andrzej Hajda wrote: On 17.07.2023 08:22, Su Hui wrote: Clang warning: drivers/gpu/drm/i915/display/intel_tv.c: line 991, column 22 Division by zero. Assuming tv_mode

Re: [Intel-gfx] [PATCH v4 6/6] drm/i915/gt: Support aux invalidation on all engines

2023-07-17 Thread Andrzej Hajda
On 17.07.2023 19:30, Andi Shyti wrote: Perform some refactoring with the purpose of keeping in one single place all the operations around the aux table invalidation. With this refactoring add more engines where the invalidation should be performed. Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux

Re: [Intel-gfx] [PATCH v4 5/6] drm/i915/gt: Poll aux invalidation register bit on invalidation

2023-07-17 Thread Andrzej Hajda
: Jonathan Cavitt Signed-off-by: Andi Shyti Cc: # v5.8+ Reviewed-by: Nirmoy Das Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 17 + drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + 2 files changed, 14 insertions(+), 4

Re: [Intel-gfx] [PATCH v4 4/6] drm/i915/gt: Enable the CCS_FLUSH bit in the pipe control

2023-07-17 Thread Andrzej Hajda
Shyti Cc: Jonathan Cavitt Cc: Nirmoy Das Cc: # v5.8+ Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 10 +- drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 + drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + 3 files c

Re: [Intel-gfx] [PATCH v4 3/6] drm/i915/gt: Rename flags with bit_group_X according to the datasheet

2023-07-17 Thread Andrzej Hajda
roup is chosen arguments of *gen8_emit_pipe_control could be changed as well. Reviewed-by: Andrzej Hajda Regards Andrzej int err; u32 *cs; @@ -218,32 +219,33 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)

Re: [Intel-gfx] [PATCH v3 2/5] drm/i915/gt: Ensure memory quiesced before invalidation

2023-07-17 Thread Andrzej Hajda
ned-off-by: Andi Shyti Cc: # v5.8+ Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c index 563

Re: [Intel-gfx] [PATCH v3 1/5] drm/i915/gt: Cleanup aux invalidation registers

2023-07-17 Thread Andrzej Hajda
e also VD1, VD3 and VE1 registers that don't exist. Signed-off-by: Andi Shyti Cc: # v5.8+ Reviewed-by: Nirmoy Das Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 8 drivers/gpu/drm/i915/gt/intel_gt_regs.h | 14 ++ drive

Re: [PATCH] drm/i915/tv: avoid possible division by zero

2023-07-17 Thread Andrzej Hajda
On 17.07.2023 08:22, Su Hui wrote: Clang warning: drivers/gpu/drm/i915/display/intel_tv.c: line 991, column 22 Division by zero. Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1, then division by zero will happen. Fixes: 1bba5543e4fe ("drm/i915: Fix TV encoder clock computation")

Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-12 Thread Andrzej Hajda
On 12.07.2023 13:07, Julia Lawall wrote: On Wed, 12 Jul 2023, Uwe Kleine-König wrote: On Wed, Jul 12, 2023 at 12:46:33PM +0200, Christian König wrote: Am 12.07.23 um 11:46 schrieb Uwe Kleine-König: Hello, while I debugged an issue in the imx-lcdc driver I was constantly irritated about s

Re: [Intel-gfx] [PATCH] drm/i915/huc: check HuC and GuC version compatibility on MTL

2023-07-12 Thread Andrzej Hajda
= &uc_fw->file_wanted; struct intel_uc_fw_file *selected = &uc_fw->file_selected; + int ret; + + if (IS_METEORLAKE(gt->i915) && uc_fw->type == INTEL_UC_FW_TYPE_HUC) { Moving this check inside check function would make it more generic, up to you. Reviewed-

Re: [Intel-gfx] [PATCH] drm/i915: Avoid circular locking dependency when flush delayed work on gt reset

2023-06-07 Thread Andrzej Hajda
x){+.+.}-{3:3}, at: intel_gt_reset+0x19e/0x470 [i915] Signed-off-by: Zhanjun Dong This unlocks multiple machines on CI, thx. Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2] drm/i915: Fix a VMA UAF for multi-gt platform

2023-06-06 Thread Andrzej Hajda
ulin Cc: Thomas Hellström Cc: Chris Wilson Cc: Andi Shyti Cc: Andrzej Hajda Cc: Sushma Venkatesh Reddy Tested-by: Andi Shyti Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/

Re: [PATCH v9 0/4] drm/i915: use ref_tracker library for tracking wakerefs

2023-06-05 Thread Andrzej Hajda
On 06.06.2023 00:33, Jakub Kicinski wrote: On Fri, 02 Jun 2023 12:21:32 +0200 Andrzej Hajda wrote: This is reviewed series of ref_tracker patches, ready to merge via network tree, rebased on net-next/main. i915 patches will be merged later via intel-gfx tree. FWIW I'll try to merge the

[PATCH v9 4/4] lib/ref_tracker: remove warnings in case of allocation failure

2023-06-02 Thread Andrzej Hajda
Library can handle allocation failures. To avoid allocation warnings __GFP_NOWARN has been added everywhere. Moreover GFP_ATOMIC has been replaced with GFP_NOWAIT in case of stack allocation on tracker free call. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Eric Dumazet

[PATCH v9 3/4] lib/ref_tracker: add printing to memory buffer

2023-06-02 Thread Andrzej Hajda
Similar to stack_(depot|trace)_snprint the patch adds helper to printing stats to memory buffer. It will be helpful in case of debugfs. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Eric Dumazet --- include/linux/ref_tracker.h | 8 +++ lib/ref_tracker.c | 56

[PATCH v9 2/4] lib/ref_tracker: improve printing stats

2023-06-02 Thread Andrzej Hajda
for ref_tracker_dir - it will differentiate multiple subsystems, - stack trace is printed indented, in the same printk call, - info about dropped references is printed as well. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Eric Dumazet --- include/linux/ref_tracker.h | 9

[PATCH v9 1/4] lib/ref_tracker: add unlocked leak print helper

2023-06-02 Thread Andrzej Hajda
-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Eric Dumazet --- include/linux/ref_tracker.h | 8 ++ lib/ref_tracker.c | 66 ++--- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/include/linux/ref_tracker.h b

[PATCH v9 0/4] drm/i915: use ref_tracker library for tracking wakerefs

2023-06-02 Thread Andrzej Hajda
Hi Jakub, This is reviewed series of ref_tracker patches, ready to merge via network tree, rebased on net-next/main. i915 patches will be merged later via intel-gfx tree. Signed-off-by: Andrzej Hajda --- Changes in v9: - removed i915 patches, just to merge network part - added r-b-s - Link to

Re: [Intel-gfx] [PATCH v8 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-06-01 Thread Andrzej Hajda
On 08.05.2023 19:16, Andrzej Hajda wrote: On 05.05.2023 22:06, Rodrigo Vivi wrote: On Thu, May 04, 2023 at 06:27:53PM +0200, Andrzej Hajda wrote: Hi maintainers of net and i915, On 25.04.2023 00:05, Andrzej Hajda wrote: This is revived patchset improving ref_tracker library and converting

Re: [Intel-gfx] [PATCH] drm/i915/gt: Use the correct error value when kernel_context() fails

2023-06-01 Thread Andrzej Hajda
arpenter Signed-off-by: Andi Shyti Cc: Chris Wilson < ch...@chris-wilson.co.uk> Cc: # v5.13+ Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/selftest_execlists.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 1/2] drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked

2023-05-24 Thread Andrzej Hajda
run after this change when GT is parked (Tvrtko) v3: Remove gpu_active argument of pmu_needs_timer (Andrzej) Signed-off-by: Ashutosh Dixit Reviewed-by: Tvrtko Ursulin Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/i915_pmu.c | 16 +--- 1 file changed, 5

Re: [Intel-gfx] [PATCH 2/2] drm/i915/pmu: Make PMU sample array two-dimensional

2023-05-24 Thread Andrzej Hajda
Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/i915_pmu.c | 60 ++--- drivers/gpu/drm/i915/i915_pmu.h | 2 +- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index

Re: [Intel-gfx] [PATCH 1/2] drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked

2023-05-24 Thread Andrzej Hajda
On 23.05.2023 17:19, Ashutosh Dixit wrote: pmu_needs_timer() keeps the timer running even when GT is parked, ostensibly to sample requested/actual frequencies. However frequency_sample() has the following: /* Report 0/0 (actual/requested) frequency while parked. */ if (!intel_gt_

Re: [Intel-gfx] [PATCH] drm/i915/hwmon: Silence UBSAN uninitialized bool variable warning

2023-05-12 Thread Andrzej Hajda
still not available which results in the output boolean variable *old remaining uninitialized. Silence the warning by initializing the variable to an arbitrary value. Signed-off-by: Ashutosh Dixit Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/i915_hwmon.c | 5 - 1 file

Re: [Intel-gfx] [PATCH v8 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-05-08 Thread Andrzej Hajda
On 05.05.2023 22:06, Rodrigo Vivi wrote: On Thu, May 04, 2023 at 06:27:53PM +0200, Andrzej Hajda wrote: Hi maintainers of net and i915, On 25.04.2023 00:05, Andrzej Hajda wrote: This is revived patchset improving ref_tracker library and converting i915 internal tracker to ref_tracker. The old

Re: [Intel-gfx] [PATCH v8 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-05-04 Thread Andrzej Hajda
Hi maintainers of net and i915, On 25.04.2023 00:05, Andrzej Hajda wrote: This is revived patchset improving ref_tracker library and converting i915 internal tracker to ref_tracker. The old thread ended without consensus about small kernel allocations, which are performed under spinlock. I have

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

2023-04-24 Thread Andrzej Hajda
On 24.04.2023 18:09, Andi Shyti wrote: This reverts commit b76c0deef6273609c02ed5053209f6397cd1b0fb. This patch is causing boot failures for MTL. Revert it. Signed-off-by: Andi Shyti Cc: Matt Roper Cc: Lucas De Marchi Cc: Aravind Iddamsetty Cc: Nirmoy Das Cc: Fei Yang Cc: Andrzej Hajda

Re: [Intel-gfx] [PATCH 1/2] Revert "drm/i915/mtl: fix mocs selftest"

2023-04-24 Thread Andrzej Hajda
Matt Roper Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/selftest_mocs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c index a8446ab825012..ca009a6a13bdb 100644 --- a/d

[PATCH v8 7/7] drm/i915: Track gt pm wakerefs

2023-04-24 Thread Andrzej Hajda
: Andrzej Hajda --- drivers/gpu/drm/i915/Kconfig.debug | 14 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 ++-- .../drm/i915/gem/selftests/i915_gem_coherency.c| 10 +++--- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 14 drivers/gpu/drm/i915/gt

[PATCH v8 6/7] drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library

2023-04-24 Thread Andrzej Hajda
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 outweigh it. Signed-off-by: Andrzej Hajda --- drivers

[PATCH v8 3/7] lib/ref_tracker: add printing to memory buffer

2023-04-24 Thread Andrzej Hajda
Similar to stack_(depot|trace)_snprint the patch adds helper to printing stats to memory buffer. It will be helpful in case of debugfs. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- include/linux/ref_tracker.h | 8 +++ lib/ref_tracker.c | 56

[PATCH v8 5/7] drm/i915: Correct type of wakeref variable

2023-04-24 Thread Andrzej Hajda
Wakeref has dedicated type. Assumption it will be int compatible forever is incorrect. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc

[PATCH v8 2/7] lib/ref_tracker: improve printing stats

2023-04-24 Thread Andrzej Hajda
for ref_tracker_dir - it will differentiate multiple subsystems, - stack trace is printed indented, in the same printk call, - info about dropped references is printed as well. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- include/linux/ref_tracker.h | 9 - lib/ref_tracker.c

[PATCH v8 4/7] lib/ref_tracker: remove warnings in case of allocation failure

2023-04-24 Thread Andrzej Hajda
Library can handle allocation failures. To avoid allocation warnings __GFP_NOWARN has been added everywhere. Moreover GFP_ATOMIC has been replaced with GFP_NOWAIT in case of stack allocation on tracker free call. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Eric Dumazet

[PATCH v8 1/7] lib/ref_tracker: add unlocked leak print helper

2023-04-24 Thread Andrzej Hajda
-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Eric Dumazet --- include/linux/ref_tracker.h | 8 ++ lib/ref_tracker.c | 66 ++--- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/include/linux/ref_tracker.h b

[PATCH v8 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-04-24 Thread Andrzej Hajda
Dumazet Cc: linux-ker...@vger.kernel.org Cc: intel-...@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: Chris Wilson Cc: net...@vger.kernel.org Cc: Jakub Kicinski Cc: Dmitry Vyukov Cc: "David S. Miller" Cc: Andi Shyti Cc: Das, Nirmoy Signed-off-by: Andrzej Hajda --- Cha

Re: [Intel-gfx] [PATCH 2/2] drm/i915/i915_drv: Use i915 instead of dev_priv insied the file_priv structure

2023-04-21 Thread Andrzej Hajda
On 21.04.2023 15:46, Andi Shyti wrote: In the process of renaming all instances of 'dev_priv' to 'i915', start using 'i915' within the 'drm_i915_file_private' structure. Signed-off-by: Andi Shyti --- Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [Intel-gfx] [PATCH 1/2] drm/i915/i915_drv: Use proper parameter naming in for_each_gt()

2023-04-21 Thread Andrzej Hajda
On 21.04.2023 15:46, Andi Shyti wrote: for_each_gt() loops through engines in the GT, not in dev_priv. Because it's misleading, call it "gt__" instead of "dev_priv__". Signed-off-by: Andi Shyti With fixes mentioned by Rodrigo. Reviewed-by: Andrzej Hajda Regards An

Re: [PATCH v7 2/7] lib/ref_tracker: improve printing stats

2023-04-21 Thread Andrzej Hajda
On 21.04.2023 16:21, Eric Dumazet wrote: On Fri, Apr 21, 2023 at 1:35 PM Andrzej Hajda wrote: In case the library is tracking busy subsystem, simply printing stack for every active reference will spam log with long, hard to read, redundant stack traces. To improve readabilty following

[PATCH v7 7/7] drm/i915: track gt pm wakerefs

2023-04-21 Thread Andrzej Hajda
: Andrzej Hajda --- drivers/gpu/drm/i915/Kconfig.debug | 15 + drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 ++-- .../drm/i915/gem/selftests/i915_gem_coherency.c| 10 +++--- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 14 drivers/gpu/drm/i915/gt

[PATCH v7 5/7] drm/i915: Correct type of wakeref variable

2023-04-21 Thread Andrzej Hajda
Wakeref has dedicated type. Assumption it will be int compatible forever is incorrect. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc

[PATCH v7 6/7] drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library

2023-04-21 Thread Andrzej Hajda
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 outweigh it. Signed-off-by: Andrzej Hajda --- drivers

[PATCH v7 4/7] lib/ref_tracker: remove warnings in case of allocation failure

2023-04-21 Thread Andrzej Hajda
Library can handle allocation failures. To avoid allocation warnings __GFP_NOWARN has been added everywhere. Moreover GFP_ATOMIC has been replaced with GFP_NOWAIT in case of stack allocation on tracker free call. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- lib/ref_tracker.c | 5

[PATCH v7 2/7] lib/ref_tracker: improve printing stats

2023-04-21 Thread Andrzej Hajda
for ref_tracker_dir - it will differentiate multiple subsystems, - stack trace is printed indented, in the same printk call, - info about dropped references is printed as well. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- include/linux/ref_tracker.h | 15 ++-- lib

[PATCH v7 3/7] lib/ref_tracker: add printing to memory buffer

2023-04-21 Thread Andrzej Hajda
Similar to stack_(depot|trace)_snprint the patch adds helper to printing stats to memory buffer. It will be helpful in case of debugfs. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- include/linux/ref_tracker.h | 8 +++ lib/ref_tracker.c | 56

[PATCH v7 1/7] lib/ref_tracker: add unlocked leak print helper

2023-04-21 Thread Andrzej Hajda
-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- include/linux/ref_tracker.h | 8 ++ lib/ref_tracker.c | 66 ++--- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/include/linux/ref_tracker.h b/include/linux/ref_tracker.h

[PATCH v7 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-04-21 Thread Andrzej Hajda
Kicinski Cc: Dmitry Vyukov Cc: "David S. Miller" Cc: Andi Shyti Cc: Das, Nirmoy Signed-off-by: Andrzej Hajda --- Changes in v7: - removed 8th patch (hold wakeref), as it was already merged - added tags (thx Andi) - Link to v6: https://lore.kernel.org/r/20230224-track_gt-v6-0

Re: [Intel-gfx] [PATCH 7/8] drm/i915: use pat_index instead of cache_level

2023-04-20 Thread Andrzej Hajda
On 20.04.2023 01:00, fei.y...@intel.com wrote: From: Fei Yang Currently the KMD is using enum i915_cache_level to set caching policy for buffer objects. This is flaky because the PAT index which really controls the caching behavior in PTE has far more levels than what's defined in the enum. In

Re: [Intel-gfx] [PATCH 6/8] drm/i915: preparation for using PAT index

2023-04-20 Thread Andrzej Hajda
15_info = (struct intel_device_info *)INTEL_INFO(i915); + i915_info->max_pat_index = 3; + for (i = 0; i < I915_MAX_CACHE_LEVEL; i++) + i915_info->cachelevel_to_pat[i] = i; Pity LEGACY_CACHELEVEL cannot be used here. Reviewed-by: Andrzej Hajda Regards Andrzej + intel_memory_regions_hw_probe(i915); spin_lock_init(&i915->gpu_error.lock);

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

2023-04-20 Thread Andrzej Hajda
i915_coherent_map_type() is now hard coded to return WC for MTL. BSpec: 45101 Signed-off-by: Fei Yang Reviewed-by: Andi Shyti Acked-by: Nirmoy Das Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 5 - drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c | 13

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

2023-04-19 Thread Andrzej Hajda
On 17.04.2023 08:24, 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 to d

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

2023-04-19 Thread Andrzej Hajda
u/drm/i915/gt/selftest_mocs.c +++ b/drivers/gpu/drm/i915/gt/selftest_mocs.c @@ -137,7 +137,7 @@ static int read_mocs_table(struct i915_request *rq, return 0; if (HAS_GLOBAL_MOCS_REGISTERS(rq->engine->i915)) - addr = global_mocs_offset(); + addr = global_mocs_offset(rq->engine->gt); else addr = mocs_offset(rq->engine); Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [Intel-gfx] [PATCH 5/8] drm/i915/mtl: end support for set caching ioctl

2023-04-19 Thread Andrzej Hajda
re currently depending on +* that. Make 1-way coherent the default setting for MTL. A follow +* up patch will extend the GEM_CREATE uAPI to allow UMD's specify +* caching mode at BO creation time Shouldn't such comment be a part of patch description? or at least

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

2023-04-19 Thread Andrzej Hajda
. Signed-off-by: Fei Yang Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/display/intel_dpt.c | 2 +- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 45 drivers/gpu/drm/i915/gt/gen8_ppgtt.h | 3 ++ drivers/gpu/drm/i915/gt/intel_ggtt.c

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

2023-04-19 Thread Andrzej Hajda
On 17.04.2023 08:24, fei.y...@intel.com wrote: From: Fei Yang On MTL, GT is no longer allocated on LLC, set has_llc=0. Signed-off-by: Fei Yang Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

Re: [Intel-gfx] [PATCH v5] drm/i915: Make IRQ reset and postinstall multi-gt aware

2023-04-18 Thread Andrzej Hajda
s(+), 6 deletions(-) Harmless duplication, I guess. Reviewed-by: Andrzej Hajda Regards Andrzej diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index dea1a117f3fa1..eead067f18c7a 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -28

Re: [PATCH] drm/i915: Fix memory leaks in i915 selftests

2023-04-12 Thread Andrzej Hajda
On 13.04.2023 05:13, Cong Liu wrote: Fixes: c3bfba9a2225 ("drm/i915: Check for integer truncation on scatterlist creation") Signed-off-by: Cong Liu --- Reviewed-by: Andrzej Hajda Regards Andrzej drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 +++- 1 file changed, 3

Re: [PATCH v5 3/5] drm/i915: Create the locked version of the request add

2023-04-12 Thread Andrzej Hajda
a new i915_request_add_locked() version of the function where the lock is not released. Signed-off-by: Andi Shyti Cc: sta...@vger.kernel.org Have you looked for other potential users of these new helpers? Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/i915_request.c

Re: [PATCH v5 2/5] drm/i915: Create the locked version of the request create

2023-04-12 Thread Andrzej Hajda
I guess the cost of calling intel_context_assert_timeline_is_locked twice sometimes is not big, or maybe it can be re-arranged, up to you. Reviewed-by: Andrzej Hajda Regards Andrzej + +struct i915_request * +i915_request_create(struct intel_context *ce) +{ + struct i915_request *rq; +

Re: [PATCH v5 1/5] drm/i915/gt: Add intel_context_timeline_is_locked helper

2023-04-12 Thread Andrzej Hajda
Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/intel_context.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h index 48f888c3da083..f2f79ff0dfd1d 100644 --- a/drivers/gpu/drm/i915

Re: [PATCH] MAINTAINERS: add drm_bridge for drm bridge maintainers

2023-04-12 Thread Andrzej Hajda
On 12.04.2023 10:09, Daniel Vetter wrote: Otherwise core changes don't get noticed by the right people. I noticed this because a patch set from Jagan Teki seems to have fallen through the cracks. Signed-off-by: Daniel Vetter Cc: Jagan Teki Cc: Andrzej Hajda Cc: Neil Armstrong Cc: R

Re: [Intel-gfx] [PATCH v4 1/5] drm/i915: Throttle for ringspace prior to taking the timeline mutex

2023-04-11 Thread Andrzej Hajda
sta...@vger.kernel.org Signed-off-by: Andi Shyti Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/gt/intel_context.c | 41 + drivers/gpu/drm/i915/gt/intel_context.h | 2 ++ drivers/gpu/drm/i915/i915_request.c | 3 ++ 3 files changed, 46 insertions(+) d

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: Hold a wakeref for the active VM

2023-04-05 Thread Andrzej Hajda
On 31.03.2023 16:16, Andrzej Hajda wrote: From: Chris Wilson There may be a disconnect between the GT used by the engine and the GT used for the VM, requiring us to hold a wakeref on both while the GPU is active with this request. v2: added explanation to __queue_and_release_pm Signed-off-by

Re: [PATCH 4/5] drm/i915/display: Add helper func to get intel_fbdev from drm_fb_helper

2023-04-05 Thread Andrzej Hajda
On 05.04.2023 16:13, Andrzej Hajda wrote: On 04.04.2023 16:30, Nirmoy Das wrote: Add a helper function to retrieve struct intel_fbdev from struct drm_fb_helper. Cc: Matthew Auld Cc: Andi Shyti Cc: Ville Syrjälä Cc: Jani Nikula Cc: Imre Deak Signed-off-by: Nirmoy Das Reviewed-by

Re: [PATCH 4/5] drm/i915/display: Add helper func to get intel_fbdev from drm_fb_helper

2023-04-05 Thread Andrzej Hajda
-by: Andrzej Hajda Reviewed-by: Andrzej Hajda Regards Andrzej --- drivers/gpu/drm/i915/display/intel_fbdev.c | 23 ++ 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c

Re: [PATCH 2/5] drm/i915/display: Set I915_BO_ALLOC_USER for fb

2023-04-05 Thread Andrzej Hajda
On 04.04.2023 16:30, Nirmoy Das wrote: Framebuffer is exposed to userspace so make sure we set proper flags for it. Set I915_BO_PREALLOC for prealloced fb so that ttm won't clear existing data. Cc: Matthew Auld Cc: Andi Shyti Cc: Andrzej Hajda Cc: Ville Syrjälä Cc: Jani Nikula Cc:

  1   2   3   4   5   6   7   8   9   10   >