Re: NXP i.MX8MM GPU performances

2024-05-08 Thread João Paulo Gonçalves
Hi Lucas, On Wed, May 08, 2024 at 10:16:24AM +0200, Lucas Stach wrote: > That's a problem. This will prevent TS from being used, which has a > large performance impact. But it shouldn't be necessary to disable it > on the i.MX8MM GPU, as all memory accesses aside from the initial MMU >

Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-08 Thread Jason Gunthorpe
On Wed, May 08, 2024 at 12:30:07PM +0100, Pavel Begunkov wrote: > > I'm not going to pretend to know about page pool details, but dmabuf > > is the way to get the bulk of pages into a pool within the net stack's > > allocator and keep that bulk properly refcounted while.> An object like > >

Re: [PATCH 2/5] drm/amdgpu: Use drm_crtc_vblank_crtc()

2024-05-08 Thread Alex Deucher
On Mon, Apr 8, 2024 at 3:06 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > Replace the open coded drm_crtc_vblank_crtc() with the real > thing. > > Cc: Alex Deucher > Cc: "Christian König" > Cc: "Pan, Xinhui" > Cc: amd-...@lists.freedesktop.org > Signed-off-by: Ville Syrjälä

Re: [PATCH 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-08 Thread Jacek Lawrynowicz
Hi, Please ignore this patch. It got here by mistake. There is another one sent as a part of a patchset. On 08.05.2024 15:25, Jacek Lawrynowicz wrote: > From: Tomasz Rusinowicz > > Add fw_dyndbg file that can be used to control FW logging. > > Signed-off-by: Tomasz Rusinowicz >

[PATCH 12/12] accel/ivpu: Share NPU busy time in sysfs

2024-05-08 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz The driver tracks the time spent by NPU executing jobs and shares it through sysfs `npu_busy_time_us` file. It can be then used by user space applications to monitor device utilization. NPU is considered 'busy' starting with a first job submitted to firmware and ending

[PATCH 11/12] accel/ivpu: Increase reset counter when warm boot fails

2024-05-08 Thread Jacek Lawrynowicz
Failed warm boot causes a cold boot that looses FW state and is equivalent to a recovery or reset, so reset_counter should be incremented in order for this failure to be detected by tests. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 1 + 1 file changed, 1 insertion(+)

[PATCH 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-08 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Add fw_dyndbg file that can be used to control FW logging. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

[PATCH 10/12] accel/ivpu: Configure fw logging using debugfs

2024-05-08 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Add fw_dyndbg file that can be used to control FW logging. Signed-off-by: Tomasz Rusinowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 26 ++ 1 file changed, 26 insertions(+) diff --git

[PATCH 03/12] accel/ivpu: Create priority based command queues

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Create multiple command queues per engine with different priorities. The cmdqs are created on-demand and they support 4 priority levels. These priorities will later be used by the HWS (hardware scheduler). Signed-off-by: Wachowski, Karol Signed-off-by: Jacek

[PATCH 09/12] accel/ivpu: Add force snoop module parameter

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add module parameter that enforces snooping for all NPU accesses, both through MMU PTEs mappings and through TCU page table walk override register bits for MMU page walks / configuration access. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz ---

[PATCH 06/12] accel/ivpu: Implement support for hardware scheduler

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add support for HWS (hardware scheduler). It is disabled by default. The sched_mode module param can be used to enable it. Each context has multiple command queues with different priorities and HWS enables priority based execution on the HW/FW side. The driver in HWS

[PATCH 05/12] accel/ivpu: Add HWS JSM messages

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Add JSM messages that will be used to implement hardware scheduler. Most of these messages are used to create and manage HWS specific command queues. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h | 1 +

[PATCH 02/12] accel/ivpu: Add sched_mode module param

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" This param will be used to enable/disable HWS (hardware scheduler). The HWS is a FW side feature and may not be available on all HW generations and FW versions. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 4

[PATCH 04/12] accel/ivpu: Implement support for preemption buffers

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Allocate per-context preemption buffers that are required by HWS. There are two preemption buffers: * primary - allocated in user memory range (PIOVA accessible) * secondary - allocated in shave memory range Signed-off-by: Wachowski, Karol Signed-off-by: Jacek

[PATCH 08/12] accel/ivpu: Add NPU profiling support

2024-05-08 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Implement time based Metric Streamer profiling UAPI. This is a generic mechanism allowing user mode tools to sample NPU metrics. These metrics are defined by the FW and transparent to the driver. The user space can check for this feature by checking

[PATCH 07/12] accel/ivpu: Add resume engine support

2024-05-08 Thread Jacek Lawrynowicz
From: "Wachowski, Karol" Create debugfs interface that triggers sending resume engine IPC command to VPU. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 24 1 file changed, 24 insertions(+) diff --git

[PATCH 00/12] accel/ivpu: Changes for 6.10

2024-05-08 Thread Jacek Lawrynowicz
There are couple of major new features in this patchset: * Hardware scheduler support (disabled by default) * Profiling support * Expose NPU busy time in sysfs Other then that, there are two small random fixes. Jacek Lawrynowicz (2): accel/ivpu: Update VPU FW API headers accel/ivpu:

[PATCH 01/12] accel/ivpu: Update VPU FW API headers

2024-05-08 Thread Jacek Lawrynowicz
Update JSM API to 3.16.0. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/vpu_jsm_api.h | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/accel/ivpu/vpu_jsm_api.h b/drivers/accel/ivpu/vpu_jsm_api.h index e46f3531211a..33f462b1a25d 100644 ---

Re: [PATCH v2 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path

2024-05-08 Thread AngeloGioacchino Del Regno
Il 08/05/24 09:19, CK Hu (胡俊光) ha scritto: On Tue, 2024-05-07 at 16:07 +0200, AngeloGioacchino Del Regno wrote: Il 07/05/24 08:59, CK Hu (胡俊光) ha scritto: On Thu, 2024-05-02 at 10:50 +0200, AngeloGioacchino Del Regno wrote: Il 25/04/24 04:23, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Tue,

Re: [PATCH] drm: deprecate driver date

2024-05-08 Thread Jani Nikula
On Mon, 29 Apr 2024, Jani Nikula wrote: > The driver date serves no useful purpose, because it's hardly ever > updated. The information is misleading at best. > > As described in Documentation/gpu/drm-internals.rst: > > The driver date, formatted as MMDD, is meant to identify the date >

Re: [PATCH 07/11] drm/gma500: Use fbdev client helpers

2024-05-08 Thread Patrik Jakobsson
On Tue, May 7, 2024 at 2:04 PM Thomas Zimmermann wrote: > > Implement struct drm_client_funcs with the respective helpers and > remove the custom code from the emulation. The generic helpers are > equivalent in functionality. > > Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson >

Re: [Regression] 6.9.0: WARNING: workqueue: WQ_MEM_RECLAIM ttm:ttm_bo_delayed_delete [ttm] is flushing !WQ_MEM_RECLAIM events:qxl_gc_work [qxl]

2024-05-08 Thread Linux regression tracking (Thorsten Leemhuis)
On 08.05.24 14:35, Anders Blomdell wrote: > On 2024-05-07 07:04, Linux regression tracking (Thorsten Leemhuis) wrote: >> On 06.05.24 16:30, David Wang wrote: On 30.04.24 08:13, David Wang wrote: >> And confirmed that the warning is caused by 07ed11afb68d94eadd4ffc082b97c2331307c5ea

Re: [PATCH v3 5/6] drm/xe: Add helper to accumulate exec queue runtime

2024-05-08 Thread Lucas De Marchi
On Wed, May 08, 2024 at 09:34:59AM GMT, Tvrtko Ursulin wrote: On 07/05/2024 23:45, Lucas De Marchi wrote: From: Umesh Nerlige Ramappa Add a helper to accumulate per-client runtime of all its exec queues. This is called every time a sched job is finished. v2: - Use

Re: [PATCH v2] mailbox: mtk-cmdq: Fix sleeping function called from invalid context

2024-05-08 Thread AngeloGioacchino Del Regno
Il 08/05/24 11:51, Jason-JH.Lin ha scritto: When we run kernel with lockdebug option, we will get the BUG below: [ 106.692124] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1164 [ 106.692190] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 3616,

Re: [Regression] 6.9.0: WARNING: workqueue: WQ_MEM_RECLAIM ttm:ttm_bo_delayed_delete [ttm] is flushing !WQ_MEM_RECLAIM events:qxl_gc_work [qxl]

2024-05-08 Thread Anders Blomdell
On 2024-05-07 07:04, Linux regression tracking (Thorsten Leemhuis) wrote: On 06.05.24 16:30, David Wang wrote: On 30.04.24 08:13, David Wang wrote: And confirmed that the warning is caused by 07ed11afb68d94eadd4ffc082b97c2331307c5ea and reverting it can fix. The kernel warning still

Re: [PATCH] dmabuf: fix dmabuf file poll uaf issue

2024-05-08 Thread Christian König
Am 08.05.24 um 13:51 schrieb David Laight: From: Christian König Sent: 07 May 2024 15:05 ... I actually have been telling people to (ab)use the epoll behavior to check if two file descriptors point to the same underlying file when KCMP isn't available. In what way? Something like this:

Re: [PATCH 1/2] drm: print top commit sha after loading the driver

2024-05-08 Thread Farah Kassabri
On 4/29/2024 18:32, Lucas De Marchi wrote: > On Mon, Apr 29, 2024 at 02:02:28PM GMT, Jani Nikula wrote: >> On Wed, 24 Apr 2024, Farah Kassabri wrote: >>> Add the last driver sha to the existing log message >>> which prints the drm device info. >> >> The commit message fails to answer the most

Re: [PATCH v4 5/7] drm/panel: himax-hx83102: Support for BOE nv110wum-l60 MIPI-DSI panel

2024-05-08 Thread cong yang
Hi, Doug Anderson 于2024年5月8日周三 07:35写道: > > Hi, > > On Tue, May 7, 2024 at 6:53 AM Cong Yang > wrote: > > > > +static int boe_nv110wum_init(struct hx83102 *ctx) > > +{ > > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > > + > > + msleep(60); > > + > > +

RE: [PATCH] dmabuf: fix dmabuf file poll uaf issue

2024-05-08 Thread David Laight
From: Christian König > Sent: 07 May 2024 15:05 ... > I actually have been telling people to (ab)use the epoll behavior to > check if two file descriptors point to the same underlying file when > KCMP isn't available. In what way? You can add both fd to the same epoll fd. Relying on the implicit

Re: [PATCH v4 2/7] drm/panel: himax-hx83102: Break out as separate driver

2024-05-08 Thread cong yang
Hi, Doug Anderson 于2024年5月8日周三 07:35写道: > > Hi, > > On Tue, May 7, 2024 at 6:53 AM Cong Yang > wrote: > > > > +static int hx83102_enable_extended_cmds(struct hx83102 *ctx, bool enable) > > +{ > > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > > + > > + if (enable)

Re: [PATCH v4 1/7] dt-bindings: display: panel: Add himax hx83102 panel bindings

2024-05-08 Thread cong yang
Hi, Doug Doug Anderson 于2024年5月8日周三 00:40写道: > > Hi, > > On Tue, May 7, 2024 at 8:14 AM Rob Herring (Arm) wrote: > > > > > > On Tue, 07 May 2024 21:52:28 +0800, Cong Yang wrote: > > > In V1, discussed with Doug and Linus [1], we need break out as separate > > > driver for the himax83102-j02

Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-08 Thread Pavel Begunkov
On 5/8/24 08:16, Daniel Vetter wrote: On Tue, May 07, 2024 at 08:32:47PM -0300, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: On 5/7/24 18:56, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: On 5/7/24 17:48,

Re: [PATCH 1/2] drm: print top commit sha after loading the driver

2024-05-08 Thread Jani Nikula
On Wed, 08 May 2024, Farah Kassabri wrote: > On 4/29/2024 18:32, Lucas De Marchi wrote: >> On Mon, Apr 29, 2024 at 02:02:28PM GMT, Jani Nikula wrote: >>> On Wed, 24 Apr 2024, Farah Kassabri wrote: Add the last driver sha to the existing log message which prints the drm device info. >>>

Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-08 Thread Pavel Begunkov
On 5/8/24 00:32, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: On 5/7/24 18:56, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: On 5/7/24 17:48, Jason Gunthorpe wrote: On Tue, May 07, 2024 at 09:42:05AM -0700,

[PULL] drm-misc-next-fixes

2024-05-08 Thread Maarten Lankhorst
Hi Dave, Sima, drm-misc-next-fixes for v6.10-rc1. There was some discussion on certain cherry picks I did, specifically the one for hiding fbdev address. There is some potential to cause regressions on ARM by hiding the physical address, but I think it should be fine to move ahead. This is why

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Christian Brauner
On Wed, May 08, 2024 at 10:32:08AM +0200, Daniel Vetter wrote: > On Wed, May 08, 2024 at 07:55:08AM +0200, Christian König wrote: > > Am 07.05.24 um 21:07 schrieb Linus Torvalds: > > > On Tue, 7 May 2024 at 11:04, Daniel Vetter wrote: > > > > On Tue, May 07, 2024 at 09:46:31AM -0700, Linus

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Christian Brauner
On Mon, May 06, 2024 at 04:29:44PM +0200, Christian König wrote: > Am 04.05.24 um 20:20 schrieb Linus Torvalds: > > On Sat, 4 May 2024 at 08:32, Linus Torvalds > > wrote: > > > Lookie here, the fundamental issue is that epoll can call '->poll()' > > > on a file descriptor that is being closed

[PATCH v14 21/28] dept: Apply timeout consideration to dma fence wait

2024-05-08 Thread Byungchul Park
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to dma fence wait. Signed-off-by: Byungchul Park --- drivers/dma-buf/dma-fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c

[PATCH v14 03/28] dept: Add single event dependency tracker APIs

2024-05-08 Thread Byungchul Park
Wrapped the base APIs for easier annotation on wait and event. Start with supporting waiters on each single event. More general support for multiple events is a future work. Do more when the need arises. How to annotate (the simplest way): 1. Initaialize a map for the interesting wait. /*

[PATCH v14 18/28] dept: Apply timeout consideration to swait

2024-05-08 Thread Byungchul Park
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to swait, assuming an input 'ret' in ___swait_event() macro is used as a timeout value. Signed-off-by: Byungchul Park --- include/linux/swait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v14 09/28] dept: Add a mechanism to refill the internal memory pools on running out

2024-05-08 Thread Byungchul Park
Dept engine works in a constrained environment. For example, Dept cannot make use of dynamic allocation e.g. kmalloc(). So Dept has been using static pools to keep memory chunks Dept uses. However, Dept would barely work once any of the pools gets run out. So implemented a mechanism for the

[PATCH v14 10/28] dept: Record the latest one out of consecutive waits of the same class

2024-05-08 Thread Byungchul Park
The current code records all the waits for later use to track relation between waits and events in each context. However, since the same class is handled the same way, it'd be okay to record only one on behalf of the others if they all have the same class. Even though it's the ideal to search the

[PATCH v14 14/28] dept: Apply sdt_might_sleep_{start, end}() to hashed-waitqueue wait

2024-05-08 Thread Byungchul Park
Makes Dept able to track dependencies by hashed-waitqueue waits. Signed-off-by: Byungchul Park --- include/linux/wait_bit.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h index 7725b7579b78..fe89282c3e96 100644 ---

[PATCH v14 26/28] fs/jbd2: Use a weaker annotation in journal handling

2024-05-08 Thread Byungchul Park
jbd2 journal handling code doesn't want jbd2_might_wait_for_commit() to be placed between start_this_handle() and stop_this_handle(). So it marks the region with rwsem_acquire_read() and rwsem_release(). However, the annotation is too strong for that purpose. We don't have to use more than try

[PATCH v14 02/28] dept: Implement Dept(Dependency Tracker)

2024-05-08 Thread Byungchul Park
CURRENT STATUS -- Lockdep tracks acquisition order of locks in order to detect deadlock, and IRQ and IRQ enable/disable state as well to take accident acquisitions into account. Lockdep should be turned off once it detects and reports a deadlock since the data structure and algorithm

[PATCH v14 20/28] dept: Apply timeout consideration to hashed-waitqueue wait

2024-05-08 Thread Byungchul Park
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to hashed-waitqueue wait, assuming an input 'ret' in ___wait_var_event() macro is used as a timeout value. Signed-off-by: Byungchul Park --- include/linux/wait_bit.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v14 19/28] dept: Apply timeout consideration to waitqueue wait

2024-05-08 Thread Byungchul Park
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to waitqueue wait, assuming an input 'ret' in ___wait_event() macro is used as a timeout value. Signed-off-by: Byungchul Park --- include/linux/wait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v14 11/28] dept: Apply sdt_might_sleep_{start, end}() to wait_for_completion()/complete()

2024-05-08 Thread Byungchul Park
Makes Dept able to track dependencies by wait_for_completion()/complete(). Signed-off-by: Byungchul Park --- include/linux/completion.h | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/include/linux/completion.h b/include/linux/completion.h

[PATCH v14 27/28] dept: Add documentation for Dept

2024-05-08 Thread Byungchul Park
This document describes the concept of Dept. Signed-off-by: Byungchul Park --- Documentation/dependency/dept.txt | 735 ++ 1 file changed, 735 insertions(+) create mode 100644 Documentation/dependency/dept.txt diff --git a/Documentation/dependency/dept.txt

[PATCH v14 24/28] dept: Print event context requestor's stacktrace on report

2024-05-08 Thread Byungchul Park
Currently, print nothing in place of [S] in report, which means stacktrace of event context's start if the event is not an unlock thing by typical lock but general event because it's not easy to specify the point in a general way, where the event context has started from. However, unfortunately

[PATCH v14 17/28] dept: Apply timeout consideration to wait_for_completion()/complete()

2024-05-08 Thread Byungchul Park
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to wait_for_completion()/complete(). Signed-off-by: Byungchul Park --- include/linux/completion.h | 4 ++-- kernel/sched/completion.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v14 23/28] dept: Track PG_locked with dept

2024-05-08 Thread Byungchul Park
Makes Dept able to track PG_locked waits and events. It's going to be useful in practice. See the following link that shows dept worked with PG_locked and can detect real issues: https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.p...@lge.com/ Signed-off-by: Byungchul

[PATCH v14 22/28] dept: Make Dept able to work with an external wgen

2024-05-08 Thread Byungchul Park
There is a case where total maps for its wait/event is so large in size. For instance, struct page for PG_locked and PG_writeback is the case. The additional memory size for the maps would be 'the # of pages * sizeof(struct dept_map)' if each struct page keeps its map all the way, which might be

[PATCH v14 07/28] dept: Distinguish each syscall context from another

2024-05-08 Thread Byungchul Park
It enters kernel mode on each syscall and each syscall handling should be considered independently from the point of view of Dept. Otherwise, Dept may wrongly track dependencies across different syscalls. That might be a real dependency from user mode. However, now that Dept just started to work,

[PATCH v14 25/28] cpu/hotplug: Use a weaker annotation in AP thread

2024-05-08 Thread Byungchul Park
cb92173d1f0 ("locking/lockdep, cpu/hotplug: Annotate AP thread") was introduced to make lockdep_assert_cpus_held() work in AP thread. However, the annotation is too strong for that purpose. We don't have to use more than try lock annotation for that. rwsem_acquire() implies: 1. might be a

[PATCH v14 28/28] dept: Add documentation for Dept's APIs

2024-05-08 Thread Byungchul Park
This document describes the APIs of Dept. Signed-off-by: Byungchul Park --- Documentation/dependency/dept_api.txt | 117 ++ 1 file changed, 117 insertions(+) create mode 100644 Documentation/dependency/dept_api.txt diff --git a/Documentation/dependency/dept_api.txt

[PATCH v14 05/28] dept: Tie to Lockdep and IRQ tracing

2024-05-08 Thread Byungchul Park
How to place Dept this way looks so ugly. But it's inevitable for now. The way should be enhanced gradually. Signed-off-by: Byungchul Park --- include/linux/irqflags.h| 7 +- include/linux/local_lock_internal.h | 1 + include/linux/lockdep.h | 102

[PATCH v14 13/28] dept: Apply sdt_might_sleep_{start, end}() to waitqueue wait

2024-05-08 Thread Byungchul Park
Makes Dept able to track dependencies by waitqueue waits. Signed-off-by: Byungchul Park --- include/linux/wait.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/wait.h b/include/linux/wait.h index 8aa3372f21a0..3177550a1b42 100644 --- a/include/linux/wait.h +++

[PATCH v14 16/28] dept: Track timeout waits separately with a new Kconfig

2024-05-08 Thread Byungchul Park
Waits with valid timeouts don't actually cause deadlocks. However, Dept has been reporting the cases as well because it's worth informing the circular dependency for some cases where, for example, timeout is used to avoid a deadlock but not meant to be expired. However, yes, there are also a lot

[PATCH v14 04/28] dept: Add lock dependency tracker APIs

2024-05-08 Thread Byungchul Park
Wrapped the base APIs for easier annotation on typical lock. Signed-off-by: Byungchul Park --- include/linux/dept_ldt.h | 77 1 file changed, 77 insertions(+) create mode 100644 include/linux/dept_ldt.h diff --git a/include/linux/dept_ldt.h

[PATCH v14 06/28] dept: Add proc knobs to show stats and dependency graph

2024-05-08 Thread Byungchul Park
It'd be useful to show Dept internal stats and dependency graph on runtime via proc for better information. Introduced the knobs. Signed-off-by: Byungchul Park --- kernel/dependency/Makefile| 1 + kernel/dependency/dept.c | 24 +++- kernel/dependency/dept_internal.h | 26

[PATCH v14 08/28] dept: Distinguish each work from another

2024-05-08 Thread Byungchul Park
Workqueue already provides concurrency control. By that, any wait in a work doesn't prevents events in other works with the control enabled. Thus, each work would better be considered a different context. So let Dept assign a different context id to each work. Signed-off-by: Byungchul Park ---

[PATCH v14 15/28] dept: Apply sdt_might_sleep_{start, end}() to dma fence wait

2024-05-08 Thread Byungchul Park
Makes Dept able to track dma fence waits. Signed-off-by: Byungchul Park --- drivers/dma-buf/dma-fence.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 0393a9bba3a8..d6f9b339b143 100644 --- a/drivers/dma-buf/dma-fence.c

[PATCH v14 12/28] dept: Apply sdt_might_sleep_{start,end}() to swait

2024-05-08 Thread Byungchul Park
Makes Dept able to track dependencies by swaits. Signed-off-by: Byungchul Park --- include/linux/swait.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/swait.h b/include/linux/swait.h index d324419482a0..277ac74f61c3 100644 --- a/include/linux/swait.h +++

[PATCH v14 01/28] llist: Move llist_{head, node} definition to types.h

2024-05-08 Thread Byungchul Park
llist_head and llist_node can be used by very primitives. For example, Dept for tracking dependency uses llist things in its header. To avoid header dependency, move those to types.h. Signed-off-by: Byungchul Park --- include/linux/llist.h | 8 include/linux/types.h | 8 2

[PATCH v14 00/28] DEPT(Dependency Tracker)

2024-05-08 Thread Byungchul Park
I'm happy to see that DEPT reports a real problem in practice. See: https://lore.kernel.org/lkml/6383cde5-cf4b-facf-6e07-1378a4856...@i-love.sakura.ne.jp/#t https://lore.kernel.org/lkml/1674268856-31807-1-git-send-email-byungchul.p...@lge.com/ I added a document describing DEPT, that

[PATCH v2] mailbox: mtk-cmdq: Fix sleeping function called from invalid context

2024-05-08 Thread Jason-JH . Lin
When we run kernel with lockdebug option, we will get the BUG below: [ 106.692124] BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:1164 [ 106.692190] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 3616, name: kworker/u17:3 [ 106.692226]

[PATCH] drm/panel: simple: Add missing display timing flags for KOE TX26D202VM0BWA

2024-05-08 Thread Liu Ying
KOE TX26D202VM0BWA panel spec indicates the DE signal is active high in timing chart, so add DISPLAY_FLAGS_DE_HIGH flag in display timing flags. This aligns display_timing with panel_desc. Fixes: 8a07052440c2 ("drm/panel: simple: Add support for KOE TX26D202VM0BWA panel") Signed-off-by: Liu Ying

[PATCH] drm/msm: Fix gen_header.py for python earlier than v3.9

2024-05-08 Thread Jon Hunter
Building the kernel with python3 versions earlier than v3.9 fails with ... Traceback (most recent call last): File "drivers/gpu/drm/msm/registers/gen_header.py", line 970, in main() File "drivers/gpu/drm/msm/registers/gen_header.py", line 951, in main

Re: [PATCH 2/5] drm/amdgpu: Use drm_crtc_vblank_crtc()

2024-05-08 Thread Jani Nikula
On Mon, 08 Apr 2024, Ville Syrjala wrote: > From: Ville Syrjälä > > Replace the open coded drm_crtc_vblank_crtc() with the real > thing. > > Cc: Alex Deucher > Cc: "Christian König" > Cc: "Pan, Xinhui" > Cc: amd-...@lists.freedesktop.org > Signed-off-by: Ville Syrjälä FWIW, Reviewed-by:

Re: [PATCH 3/5] drm/i915: Use drm_crtc_vblank_crtc()

2024-05-08 Thread Jani Nikula
On Mon, 08 Apr 2024, Ville Syrjala wrote: > From: Ville Syrjälä > > Replace the open coded drm_crtc_vblank_crtc() with the real > thing. > > Cc: intel-...@lists.freedesktop.org > Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/intel_crtc.c | 3

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Christian König
Am 08.05.24 um 10:23 schrieb Christian Brauner: On Tue, May 07, 2024 at 07:45:02PM +0200, Christian König wrote: Am 07.05.24 um 18:46 schrieb Linus Torvalds: On Tue, 7 May 2024 at 04:03, Daniel Vetter wrote: It's really annoying that on some distros/builds we don't have that, and for gpu

RE: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove)

2024-05-08 Thread David Laight
From: Linus Torvalds > Sent: 06 May 2024 19:18 ... > Which is why I applied the minimal patch for just "refcount over > vfs_poll()", and am just mentioning my suggestion in the hope that > some eager beaver would like to see how painful it would do to make > the bigger surgery... I wonder if I

Re: [PATCH] drm/msm: remove python 3.9 dependency for compiling msm

2024-05-08 Thread Jani Nikula
On Tue, 07 May 2024, Abhinav Kumar wrote: > Since commit 5acf49119630 ("drm/msm: import gen_header.py script from Mesa"), > compilation is broken on machines having python versions older than 3.9 > due to dependency on argparse.BooleanOptionalAction. Is it now okay to require Python for the

Re: [PATCH] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-08 Thread Daniel Vetter
On Wed, May 08, 2024 at 12:27:20PM +0530, Arunpravin Paneer Selvam wrote: > Problem statement: During the system boot time, an application request > for the bulk volume of cleared range bias memory when the clear_avail > is zero, we dont fallback into normal allocation method as we had an >

Re: Safety of opening up /dev/dma_heap/* to physically present users (udev uaccess tag) ?

2024-05-08 Thread Daniel Vetter
On Tue, May 07, 2024 at 10:59:42PM +0300, Dmitry Baryshkov wrote: > On Tue, 7 May 2024 at 21:40, Laurent Pinchart > wrote: > > > > On Tue, May 07, 2024 at 06:19:18PM +0300, Dmitry Baryshkov wrote: > > > On Tue, 7 May 2024 at 18:15, Bryan O'Donoghue wrote: > > > > On 07/05/2024 16:09, Dmitry

Re: Safety of opening up /dev/dma_heap/* to physically present users (udev uaccess tag) ?

2024-05-08 Thread Daniel Stone
On Wed, 8 May 2024 at 09:33, Daniel Vetter wrote: > On Wed, May 08, 2024 at 06:46:53AM +0100, Daniel Stone wrote: > > That would have the unfortunate side effect of making sandboxed apps > > less efficient on some platforms, since they wouldn't be able to do > > direct scanout anymore ... > > I

Re: Safety of opening up /dev/dma_heap/* to physically present users (udev uaccess tag) ?

2024-05-08 Thread Daniel Vetter
On Tue, May 07, 2024 at 04:07:39PM -0400, Nicolas Dufresne wrote: > Hi, > > Le mardi 07 mai 2024 à 21:36 +0300, Laurent Pinchart a écrit : > > Shorter term, we have a problem to solve, and the best option we have > > found so far is to rely on dma-buf heaps as a backend for the frame > > buffer

Re: [PATCH v3 5/6] drm/xe: Add helper to accumulate exec queue runtime

2024-05-08 Thread Tvrtko Ursulin
On 07/05/2024 23:45, Lucas De Marchi wrote: From: Umesh Nerlige Ramappa Add a helper to accumulate per-client runtime of all its exec queues. This is called every time a sched job is finished. v2: - Use guc_exec_queue_free_job() and execlist_job_free() to accumulate runtime when job

Re: Safety of opening up /dev/dma_heap/* to physically present users (udev uaccess tag) ?

2024-05-08 Thread Daniel Vetter
On Wed, May 08, 2024 at 06:46:53AM +0100, Daniel Stone wrote: > Hi, > > On Tue, 7 May 2024 at 12:15, Daniel Vetter wrote: > > On Mon, May 06, 2024 at 04:01:42PM +0200, Hans de Goede wrote: > > > On 5/6/24 3:38 PM, Daniel Vetter wrote: > > > I agree that bad applications are an issue, but not for

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Daniel Vetter
On Wed, May 08, 2024 at 07:55:08AM +0200, Christian König wrote: > Am 07.05.24 um 21:07 schrieb Linus Torvalds: > > On Tue, 7 May 2024 at 11:04, Daniel Vetter wrote: > > > On Tue, May 07, 2024 at 09:46:31AM -0700, Linus Torvalds wrote: > > > > > > > I'd be perfectly ok with adding a generic

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Christian Brauner
On Tue, May 07, 2024 at 07:45:02PM +0200, Christian König wrote: > Am 07.05.24 um 18:46 schrieb Linus Torvalds: > > On Tue, 7 May 2024 at 04:03, Daniel Vetter wrote: > > > It's really annoying that on some distros/builds we don't have that, and > > > for gpu driver stack reasons we _really_ need

Re: [PATCH v2 6/6] drm/xe/client: Print runtime to fdinfo

2024-05-08 Thread Tvrtko Ursulin
On 07/05/2024 22:35, Lucas De Marchi wrote: On Fri, Apr 26, 2024 at 11:47:37AM GMT, Tvrtko Ursulin wrote: On 24/04/2024 00:56, Lucas De Marchi wrote: Print the accumulated runtime for client when printing fdinfo. Each time a query is done it first does 2 things: 1) loop through all the

Re: [PATCH v1 2/2] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-05-08 Thread Daniel Vetter
On Tue, May 07, 2024 at 09:31:53PM -0300, Jason Gunthorpe wrote: > On Thu, May 02, 2024 at 07:50:36AM +, Kasireddy, Vivek wrote: > > Hi Jason, > > > > > > > > On Tue, Apr 30, 2024 at 04:24:50PM -0600, Alex Williamson wrote: > > > > > +static vm_fault_t vfio_pci_dma_buf_fault(struct vm_fault

Re: NXP i.MX8MM GPU performances

2024-05-08 Thread Lucas Stach
Hi João Paulo, Am Dienstag, dem 07.05.2024 um 15:17 -0300 schrieb João Paulo Gonçalves: > Hello all, > > I did run some benchmark on i.MX8MM GPU and I have some concerns on the > differences between mainline Linux/etnaviv/Mesa and the proprietary > NXP/Vivante > solution. > > The tests were

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Christian Brauner
On Tue, May 07, 2024 at 12:07:10PM -0700, Linus Torvalds wrote: > On Tue, 7 May 2024 at 11:04, Daniel Vetter wrote: > > > > On Tue, May 07, 2024 at 09:46:31AM -0700, Linus Torvalds wrote: > > > > > I'd be perfectly ok with adding a generic "FISAME" VFS level ioctl > > > too, if this is possibly a

/sys/kernel/debug/vgaswitcheroo directory missing

2024-05-08 Thread Chris Clayton
Hi, I'm running the latest development kernel - 6.9.0-rc7+ (HEAD is dccb07f2914cdab2ac3a5b6c98406f765acab803.) As I say in $SUBJECT, the directory /sys/kernel/debug/vgaswitcheroo is missing in this release. Perhaps more importantly unless it is configured to simply blank the screen, when

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Christian König
Am 08.05.24 um 09:51 schrieb Michel Dänzer: On 2024-05-07 19:45, Christian König wrote: Am 07.05.24 um 18:46 schrieb Linus Torvalds: Just what are the requirements for the GPU stack? Is one of the file descriptors "trusted", IOW, you know what kind it is? Because dammit, it's *so* easy to do.

Re: [Linaro-mm-sig] Re: [PATCH] epoll: try to be a _bit_ better about file lifetimes

2024-05-08 Thread Michel Dänzer
On 2024-05-07 19:45, Christian König wrote: > Am 07.05.24 um 18:46 schrieb Linus Torvalds: >> >> Just what are the requirements for the GPU stack? Is one of the file >> descriptors "trusted", IOW, you know what kind it is? >> >> Because dammit, it's *so* easy to do. You could just add a core DRM

Re: [PATCH v2 2/3] dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path

2024-05-08 Thread 胡俊光

Re: [RFC PATCH net-next v8 02/14] net: page_pool: create hooks for custom page providers

2024-05-08 Thread Daniel Vetter
On Tue, May 07, 2024 at 08:32:47PM -0300, Jason Gunthorpe wrote: > On Tue, May 07, 2024 at 08:35:37PM +0100, Pavel Begunkov wrote: > > On 5/7/24 18:56, Jason Gunthorpe wrote: > > > On Tue, May 07, 2024 at 06:25:52PM +0100, Pavel Begunkov wrote: > > > > On 5/7/24 17:48, Jason Gunthorpe wrote: > > >

[PATCH] drm/buddy: Fix the range bias clear memory allocation issue

2024-05-08 Thread Arunpravin Paneer Selvam
Problem statement: During the system boot time, an application request for the bulk volume of cleared range bias memory when the clear_avail is zero, we dont fallback into normal allocation method as we had an unnecessary clear_avail check which prevents the fallback method leads to fb allocation

Re: A link error related to DRM and fbdev

2024-05-08 Thread Henry Wu
Thanks for your reply. I will communicate with member of dri-devel further. I tried to reproduce this issue on master branch and there was no link error: ... CC arch/x86/boot/compressed/efi.o AS arch/x86/boot/compressed/efi_mixed.o CC arch/x86/boot/compressed/misc.o GZIP

Re: [PATCH 11/11] drm/tegra: Use fbdev client helpers

2024-05-08 Thread Thomas Zimmermann
Hi Am 07.05.24 um 23:03 schrieb Felix Kuehling: On 2024-05-07 07:58, Thomas Zimmermann wrote: Implement struct drm_client_funcs with the respective helpers and remove the custom code from the emulation. The generic helpers are equivalent in functionality. Signed-off-by: Thomas Zimmermann

<    1   2