Re: [PATCH v2 1/2] drm: Add GPU reset sysfs event

2022-03-09 Thread Pierre-Eric Pelloux-Prayer
Hi Shashank, On 08/03/2022 19:04, Shashank Sharma wrote: > From: Shashank Sharma > > This patch adds a new sysfs event, which will indicate > the userland about a GPU reset, and can also provide > some information like: > - process ID of the process involved with the GPU reset > - process name o

Re: [PATCH v2 1/2] drm: Add GPU reset sysfs event

2022-03-09 Thread Pierre-Eric Pelloux-Prayer
On 09/03/2022 11:24, Christian König wrote: > Am 09.03.22 um 11:10 schrieb Simon Ser: >> On Wednesday, March 9th, 2022 at 10:56, Pierre-Eric Pelloux-Prayer >> wrote: >> >>> Would it be possible to include the app parameters as well? >> Can all proce

Re: [PATCH] drm: Check actual format for legacy pageflip.

2021-01-04 Thread Pierre-Eric Pelloux-Prayer
drivers and it doesn't look like they end up triggering > this case so I think this is safe to relax. This patch fixes https://gitlab.freedesktop.org/drm/amd/-/issues/1379: Tested-by: Pierre-Eric Pelloux-Prayer Thanks! P-E > > Signed-off-by: Bas Nieuwenhuizen > Fixes: 816853f

Re: [PATCH] drm/ttm: fix false positive assert

2020-03-10 Thread Pierre-Eric Pelloux-Prayer
Hi Christian, Sorry I missed your original email. I just tested the patch and it works fine, so feel free to add my Tested-by tag. Pierre-Eric On 09/03/2020 12:49, Christian König wrote: > Pierre-eric, just a gentle ping on this? Could I get a tested-by? > > Ray can you ack or even review this?

Re: [PATCH v2 04/11] drm/fourcc: Add AMD DRM modifiers.

2020-09-07 Thread Pierre-Eric Pelloux-Prayer
Hi Bas, 2 small typos you may want to fix: On 04/09/2020 18:07, Bas Nieuwenhuizen wrote: > This adds modifiers for GFX9+ AMD GPUs. > > As the modifiers need a lot of parameters I split things out in > getters and setters. > - Advantage: simplifies the code a lot > - Disadvantage: Makes it ha

Re: [PATCH 13/18] drm/amdgpu/dc: Stop dma_resv_lock inversion in commit_tail

2020-06-05 Thread Pierre-Eric Pelloux-Prayer
Hi Daniel, On 04/06/2020 10:12, Daniel Vetter wrote: [...] > @@ -6910,7 +6910,11 @@ static void amdgpu_dm_commit_planes(struct > drm_atomic_state *state, >* explicitly on fences instead >* and in general should be called for >* blocking commit to as

Re: [PATCH v5 4/4] drm/doc: document some tracepoints as uAPI

2024-07-03 Thread Pierre-Eric Pelloux-Prayer
Le 03/07/2024 à 12:46, Lucas Stach a écrit : Am Freitag, dem 14.06.2024 um 10:16 +0200 schrieb Pierre-Eric Pelloux- Prayer: This commit adds a document section in drm-uapi.rst about tracepoints, and mark the events gpu_scheduler_trace.h as stable uAPI. The goal is to explicitly state that

Re: [PATCH v5 3/4] drm/sched: trace dependencies for gpu jobs

2024-07-03 Thread Pierre-Eric Pelloux-Prayer
Le 03/07/2024 à 13:05, Lucas Stach a écrit : Am Freitag, dem 14.06.2024 um 10:16 +0200 schrieb Pierre-Eric Pelloux- Prayer: Trace the fence dependencies similarly to how we print fences: ... , dependencies:{(context:606, seqno:38006)} This allows tools to analyze the dependencies between

Re: [PATCH v5 4/4] drm/doc: document some tracepoints as uAPI

2024-07-10 Thread Pierre-Eric Pelloux-Prayer
Hi Maíra, Le 03/07/2024 à 17:41, Maíra Canal a écrit : Hi Pierre, On 6/14/24 05:16, Pierre-Eric Pelloux-Prayer wrote: This commit adds a document section in drm-uapi.rst about tracepoints, and mark the events gpu_scheduler_trace.h as stable uAPI. The goal is to explicitly state that tools

Re: [PATCH v3 6/8] drm: add drm_mode_atomic_commit event

2024-02-22 Thread Pierre-Eric Pelloux-Prayer
Le 16/02/2024 à 17:24, Ville Syrjälä a écrit : On Fri, Feb 16, 2024 at 04:09:55PM +0100, Pierre-Eric Pelloux-Prayer wrote: With this and the dma_fence_used_as_dependency event, a tool can draw the relationship between the compositing draw, the atomic commit, and vblank. An example on a 2

[PATCH v2 0/6] dma-fence, drm, amdgpu new trace events

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
/patch/20240117184329.479554-1-pierre-eric.pelloux-pra...@amd.com/ Changes from V1: * uses trace_dma_fence_sync_to from dma-fence-chain.c * new amdgpu events * new drm plane commit event Pierre-Eric Pelloux-Prayer (6): tracing, dma-buf: add a trace_dma_fence_sync_to event dma-buf/fence-chain

[PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
This new event can be used to trace where a given dma_fence is added as a dependency of some other work. I plan to use it in amdgpu. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence.c | 1 + include/trace/events/dma_fence.h | 34 2

[PATCH v2 2/6] dma-buf/fence-chain: use trace_dma_fence_sync_to

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
To inform tools about the relationship between the fences. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence-chain.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index 9663ba1bb6ac

[PATCH v2 3/6] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
ive names for each use of amdgpu_fence_sync. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 8 +++- drivers/gpu/dr

[PATCH v2 4/6] drm/amdgpu: add BO clear event

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
Useful to identify why sdma jobs are submitted. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 16 2 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 12 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 6830892383c3

[PATCH v2 6/6] drm: add drm_mode_atomic_commit event

2024-02-13 Thread Pierre-Eric Pelloux-Prayer
[018] d.h3. 2571.915968: drm_vblank_event: crtc=0, seq=153862, time=2571916377180, high-prec=true Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_atomic_uapi.c | 19 +++ drivers/gpu/drm/drm_trace.h | 28 ++-- 2 files changed, 45

Re: [PATCH v2 5/6] drm/amdgpu: add a amdgpu_cs_ioctl2 event

2024-02-14 Thread Pierre-Eric Pelloux-Prayer
Le 14/02/2024 à 13:09, Christian König a écrit : Am 13.02.24 um 16:50 schrieb Pierre-Eric Pelloux-Prayer: amdgpu_cs_ioctl already exists but serves a different purpose. amdgpu_cs_ioctl2 marks the beginning of the kernel processing of the ioctl which is useful for tools to map which events

Re: [PATCH v2 1/6] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-14 Thread Pierre-Eric Pelloux-Prayer
Le 14/02/2024 à 16:10, Steven Rostedt a écrit : On Wed, 14 Feb 2024 13:00:16 +0100 Christian König wrote: +DEFINE_EVENT(dma_fence_from, dma_fence_sync_to, For a single event you should probably use TRACE_EVENT() instead of declaring a class. A class is only used if you have multiple events w

[PATCH v3 0/8] dma-fence, drm, amdgpu new trace events

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
attribute to the trace_amdgpu_sched_run_job event * addressed review comments Pierre-Eric Pelloux-Prayer (8): tracing, dma-buf: add a trace_dma_fence_sync_to event dma-buf/fence-chain: use trace_dma_fence_sync_to amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync drm/amdgpu: add a

[PATCH v3 1/8] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
This new event can be used to trace where a given dma_fence is added as a dependency of some other work. I plan to use it in amdgpu. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence.c | 1 + include/trace/events/dma_fence.h | 27 +++ 2 files

[PATCH v3 2/8] dma-buf/fence-chain: use trace_dma_fence_sync_to

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
To inform tools about the relationship between the fences. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence-chain.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index 9663ba1bb6ac

[PATCH v3 3/8] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
sync issue I have prototype code using this in UMR, as can be see here: https://gitlab.freedesktop.org/tomstdenis/umr/-/merge_requests/37 v2: add a macro since every caller passes __func__ as the reason parameter Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_s

[PATCH v3 4/8] drm/amdgpu: add a amdgpu_bo_fill trace event

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
Useful to identify why sdma jobs are submitted. v2: moved from amdgpu_bo_create to amdgpu_bo_fill Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 18 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 ++ 2 files changed, 20 insertions

[PATCH v3 5/8] drm/amdgpu: add a amdgpu_cs_start trace event

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
to amdgpu_cs_start Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 12 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu

[PATCH v3 6/8] drm: add drm_mode_atomic_commit event

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
=2571916093743, high-prec=true -0 [018] d.h3. 2571.915968: drm_vblank_event: crtc=0, seq=153862, time=2571916377180, high-prec=true v2: fix unchecked memory allocation Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_atomic_uapi.c | 21 + drivers/gpu/drm

[PATCH v3 7/8] drm/sched: use trace_dma_fence_used_as_dependency

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
drm_sched_job_add_dependency adds dependencies so use the new trace event. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/scheduler/sched_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler

[PATCH v3 8/8] drm/amdgpu: add devname to trace_amdgpu_sched_run_job

2024-02-16 Thread Pierre-Eric Pelloux-Prayer
. With work queues, the source is now something like: "kworker/u64:0-15248" (and the PID isn't stable), so the "timeline=gfx_0.0.0" attribute isn't enough in multi-GPU setups. This commit adds a dev=devname attribute to resolve this issue. Signed-off-by: Pierre-Eri

Re: [PATCH v5 1/4] drm/sched: add device name to the drm_sched_process_job event

2024-06-17 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 14/06/2024 à 11:08, Christian König a écrit : Am 14.06.24 um 10:16 schrieb Pierre-Eric Pelloux-Prayer: Until the switch from kthread to workqueue, a userspace application could determine the source device from the pid of the thread sending the event. With workqueues this is not

Re: [PATCH 1/6] drm/amdgpu: allow ioctls to opt-out of runtime pm

2024-06-25 Thread Pierre-Eric Pelloux-Prayer
Le 20/06/2024 à 15:36, Christian König a écrit : Am 20.06.24 um 15:06 schrieb Pierre-Eric Pelloux-Prayer: Le 19/06/2024 à 11:26, Christian König a écrit : Am 18.06.24 um 17:23 schrieb Pierre-Eric Pelloux-Prayer: Waking up a device can take multiple seconds, so if it's not going to be

Re: [PATCH v5 4/4] drm/doc: document some tracepoints as uAPI

2024-07-01 Thread Pierre-Eric Pelloux-Prayer
in this series. Thanks! Pierre-Eric Le 14/06/2024 à 10:16, Pierre-Eric Pelloux-Prayer a écrit : This commit adds a document section in drm-uapi.rst about tracepoints, and mark the events gpu_scheduler_trace.h as stable uAPI. The goal is to explicitly state that tools can rely on the fiel

[PATCH 1/2] tracing, dma-buf: add a trace_dma_fence_sync_to event

2024-01-17 Thread Pierre-Eric Pelloux-Prayer
This new event can be used to trace where a given dma_fence is added as a dependency of some other work. I plan to use it in amdgpu. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/dma-buf/dma-fence.c | 1 + include/trace/events/dma_fence.h | 34 2

[PATCH 2/2] amdgpu: use trace_dma_fence_sync_to in amdgpu_fence_sync

2024-01-17 Thread Pierre-Eric Pelloux-Prayer
ive names for each use of amdgpu_fence_sync. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 8 +++- drivers/gpu/dr

[PATCH 1/3] drm: add DRM_SET_NAME ioctl

2024-09-11 Thread Pierre-Eric Pelloux-Prayer
Userspace MR to use this ioctl: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1428 Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_debugfs.c | 12 drivers/gpu/drm/drm_file.c| 5 + drivers/gpu/drm/drm_ioct

[PATCH 2/3] drm: use drm_file name in fdinfo

2024-09-11 Thread Pierre-Eric Pelloux-Prayer
Add an optional drm-client-name field to drm fdinfo's output. Signed-off-by: Pierre-Eric Pelloux-Prayer --- Documentation/gpu/drm-usage-stats.rst | 5 + drivers/gpu/drm/drm_file.c| 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/gpu/drm-usage-stats.r

[PATCH 3/3] drm/amdgpu: use drm_file name

2024-09-11 Thread Pierre-Eric Pelloux-Prayer
12255Process:glxgears/test-set-fd-name -- Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 11 -- drivers/gpu/drm/amd/a

Re: [PATCH 3/3] drm/amdgpu: use drm_file name

2024-09-13 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 12/09/2024 à 10:24, Tvrtko Ursulin a écrit : On 11/09/2024 15:58, Pierre-Eric Pelloux-Prayer wrote: In debugfs gem_info/vm_info files, timeout handler and page fault reports. This information is useful with the virtio/native-context driver: this allows the guest applications

Re: [PATCH 1/3] drm: add DRM_SET_NAME ioctl

2024-09-13 Thread Pierre-Eric Pelloux-Prayer
Hi Tvrtko, Le 12/09/2024 à 10:13, Tvrtko Ursulin a écrit : On 11/09/2024 15:58, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME

[PATCH v2 2/3] drm: use drm_file name in fdinfo

2024-09-16 Thread Pierre-Eric Pelloux-Prayer
Add an optional drm-client-name field to drm fdinfo's output. Signed-off-by: Pierre-Eric Pelloux-Prayer --- Documentation/gpu/drm-usage-stats.rst | 5 + drivers/gpu/drm/drm_file.c| 5 + 2 files changed, 10 insertions(+) diff --git a/Documentation/gpu/drm-usage-stats.r

[PATCH v2 1/3] drm: add DRM_SET_NAME ioctl

2024-09-16 Thread Pierre-Eric Pelloux-Prayer
-' * if a 0-length string is passed the name is cleared Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_debugfs.c | 12 ++ drivers/gpu/drm/drm_file.c| 5 + drivers/gpu/drm/drm_ioctl.c | 42 +++ include/drm/drm_file.h

[PATCH v2 3/3] drm/amdgpu: use drm_file name

2024-09-16 Thread Pierre-Eric Pelloux-Prayer
12255Process:glxgears/test-set-fd-name -- Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 16 +--- drivers/gpu/drm/amd/a

[PATCH v3 1/4] drm/sched: store the drm_device instead of the device

2024-06-06 Thread Pierre-Eric Pelloux-Prayer
: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_sched.c| 2 +- drivers/gpu/drm/imagination/pvr_queue.c| 2 +- drivers/gpu/drm/lima/lima_sched.c | 2 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +- drivers

[PATCH v3 2/4] drm/sched: add dev_index=xx to the drm_sched_process_job event

2024-06-06 Thread Pierre-Eric Pelloux-Prayer
e not unique). Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h b/drivers/gpu/drm/scheduler/gpu_scheduler_trace.h

[PATCH v3 3/4] drm/sched: cleanup gpu_scheduler trace events

2024-06-06 Thread Pierre-Eric Pelloux-Prayer
fence's context is already an identifier of the job owner. Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 27 ++- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler_t

[PATCH v3 0/4] Improve gpu_scheduler trace events

2024-06-06 Thread Pierre-Eric Pelloux-Prayer
ike the indentation in the last patch, because everything is vertically aligned to 'TP_fast_assign('. How to best fix it? WARNING: Statements should start on a tabstop #82: FILE: drivers/gpu/drm/scheduler/gpu_scheduler_trace.h:80: +unsigned long idx; v2: https://lists.fre

[PATCH v3 4/4] drm/sched: trace dependencies for gpu jobs

2024-06-06 Thread Pierre-Eric Pelloux-Prayer
the same base event class, the caller of trace_drm_run_job have to pass a dep_count of 0 (which is ignored because dependencies are only considered at submit time). Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 58 --- drivers/gpu/drm

Re: [PATCH v3 3/4] drm/sched: cleanup gpu_scheduler trace events

2024-06-07 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 06/06/2024 à 15:19, Steven Rostedt a écrit : On Thu, 6 Jun 2024 15:06:24 +0200 Pierre-Eric Pelloux-Prayer wrote: Print identifiers instead of pointers: * "fence=%p" is replaced by "fence=(context:%llu, seqno:%lld)" to have a coherent way to print the fence. A possi

Re: [PATCH v3 1/4] drm/sched: store the drm_device instead of the device

2024-06-07 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 06/06/2024 à 15:18, Christian König a écrit : Am 06.06.24 um 15:06 schrieb Pierre-Eric Pelloux-Prayer: When tracing is enabled, being able to identify which device is sending events is useful; for this the next commit will extend events to include drm_device::primary::index. That

[PATCH v4 0/3] Improve gpu_scheduler trace events

2024-06-10 Thread Pierre-Eric Pelloux-Prayer
v3: https://lists.freedesktop.org/archives/dri-devel/2024-June/456792.html Changes since v3: * trace device name instead of drm_device primary index * no pointer deref in the TP_printk anymore. Instead the fence context/seqno are saved in TP_fast_assign Pierre-Eric Pelloux-Prayer (3): drm

[PATCH v4 1/3] drm/sched: add device name to the drm_sched_process_job event

2024-06-10 Thread Pierre-Eric Pelloux-Prayer
Until the switch from kthread to workqueue, a userspace application could determine the source device from the pid of the thread sending the event. With workqueues this is not possible anymore, so the event needs to contain the dev_name() to identify the device. Signed-off-by: Pierre-Eric

[PATCH v4 2/3] drm/sched: cleanup gpu_scheduler trace events

2024-06-10 Thread Pierre-Eric Pelloux-Prayer
fence's context is already an identifier of the job owner. For drm_sched_job_wait_dep, we also print the hardware exec context of the fence that's initiating the wait (the scheduled fence ctx is not relevant here, since it's not traced in other events). Signed-off-by: Pierre-Er

[PATCH v4 3/3] drm/sched: trace dependencies for gpu jobs

2024-06-10 Thread Pierre-Eric Pelloux-Prayer
the same base event class, the caller of trace_drm_run_job have to pass a dep_count of 0 (which is ignored because dependencies are only considered at submit time). Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 59 --- drivers/gpu/drm

Re: [PATCH v4 0/3] Improve gpu_scheduler trace events

2024-06-12 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 10/06/2024 à 18:31, Daniel Vetter a écrit : > On Mon, Jun 10, 2024 at 03:26:53PM +0200, Pierre-Eric Pelloux-Prayer wrote: >> v3: https://lists.freedesktop.org/archives/dri-devel/2024-June/456792.html >> >> Changes since v3: >> * trace device name instead

[PATCH v5 0/4] Improve gpu_scheduler trace events + uAPI

2024-06-14 Thread Pierre-Eric Pelloux-Prayer
-Eric Pelloux-Prayer (4): drm/sched: add device name to the drm_sched_process_job event drm/sched: cleanup gpu_scheduler trace events drm/sched: trace dependencies for gpu jobs drm/doc: document some tracepoints as uAPI Documentation/gpu/drm-uapi.rst| 19 +++ .../gpu/drm

[PATCH v5 1/4] drm/sched: add device name to the drm_sched_process_job event

2024-06-14 Thread Pierre-Eric Pelloux-Prayer
Until the switch from kthread to workqueue, a userspace application could determine the source device from the pid of the thread sending the event. With workqueues this is not possible anymore, so the event needs to contain the dev_name() to identify the device. Signed-off-by: Pierre-Eric

[PATCH v5 2/4] drm/sched: cleanup gpu_scheduler trace events

2024-06-14 Thread Pierre-Eric Pelloux-Prayer
A fence uniquely identify a job, so this commits updates the places where a kernel pointer was used as an identifier by: "fence=(context:%llu, seqno:%lld)" Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 45 ++- 1 fi

[PATCH v5 3/4] drm/sched: trace dependencies for gpu jobs

2024-06-14 Thread Pierre-Eric Pelloux-Prayer
the same base event class, the caller of trace_drm_run_job have to pass a dep_count of 0 (which is ignored because dependencies are only considered at submit time). Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 59 --- drivers/gpu/drm

[PATCH v5 4/4] drm/doc: document some tracepoints as uAPI

2024-06-14 Thread Pierre-Eric Pelloux-Prayer
This commit adds a document section in drm-uapi.rst about tracepoints, and mark the events gpu_scheduler_trace.h as stable uAPI. The goal is to explicitly state that tools can rely on the fields, formats and semantics of these events. Signed-off-by: Pierre-Eric Pelloux-Prayer --- Documentation

[PATCH] r600g: remove useless call to u_upload_flush

2011-06-10 Thread Pierre-Eric Pelloux-Prayer
850) The simple attached patch removed function call + comment. Pierre-Eric From 4596e9040bde510fd974d500af69070341871b46 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 10 Jun 2011 15:45:01 +0200 Subject: [PATCH 2/2] r600g: remove useless call to u_upload_flush No regres

[PATCH] r600g: reorder LIT instructions to support src == dst

2011-06-20 Thread Pierre-Eric Pelloux-Prayer
f src == dst, input values are not overwritten before being used). I've sent the accompagnying test case to piglit ML. Pierre-Eric From f0cd600074ef0a086742a4a0932b8d5880fc87b3 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 20 Jun 2011 11:25:14 +0200 Subject: [PA

[PATCH] r600g: remove useless call to u_upload_flush

2011-06-10 Thread Pierre-Eric Pelloux-Prayer
u_upload_flush() is called each time r600_flush() is used. There is a comment specifically saying : /* XXX This shouldn't be really necessary, but removing it breaks some tests. * Needless buffer reallocations may significantly increase memory consumption, * so getting

[PATCH] r600g: reorder LIT instructions to support src == dst

2011-06-20 Thread Pierre-Eric Pelloux-Prayer
Hi, the attached patch should be an improvement over Vadim Girlin's patch fixing LIT instruction for r600g (commit 2fe39b46e73aea37152777fe11d489e0b1bc3f92). Instructions used in tgsi_lit have been reordered to always write to a dst channel after the same channel in src has been read (so if src =

Re: [PATCH v5 4/6] drm/amdgpu: alloc and init vm::task_info from first submit

2024-10-09 Thread Pierre-Eric Pelloux-Prayer
Le 08/10/2024 à 10:13, Christian König a écrit : Am 03.10.24 um 14:43 schrieb Pierre-Eric Pelloux-Prayer: This will allow to use flexible array to store the process name and other information. This also means that process name will be determined once and for all, instead of at each submit

Re: [PATCH v5 6/6] drm/amdgpu: use drm_file::name in task_info::process_desc

2024-10-09 Thread Pierre-Eric Pelloux-Prayer
Le 08/10/2024 à 10:24, Christian König a écrit : Am 03.10.24 um 14:43 schrieb Pierre-Eric Pelloux-Prayer: If a drm_file name is set append it to the process name. This information is useful with the virtio/native-context driver: this allows the guest applications identifier to visible in

Re: [PATCH] drm/amdgpu: prevent BO_HANDLES error from being overwritten

2024-10-09 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 05/10/2024 à 01:59, Mohammed Anees a écrit : Before this patch, if multiple BO_HANDLES chunks were submitted, the error -EINVAL would be correctly set but could be overwritten by the return value from amdgpu_cs_p1_bo_handles(). This patch ensures that once an error condition is detected,

Re: [PATCH v2] drm/amdgpu: prevent BO_HANDLES error from being overwritten

2024-10-09 Thread Pierre-Eric Pelloux-Prayer
Thanks for the updated patch, looks good to me. Le 09/10/2024 à 14:31, Christian König a écrit : Am 09.10.24 um 14:28 schrieb Mohammed Anees: Before this patch, if multiple BO_HANDLES chunks were submitted, the error -EINVAL would be correctly set but could be overwritten by the return value fr

Re: [bug report] drm: add DRM_SET_CLIENT_NAME ioctl

2024-10-11 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 10/10/2024 à 12:02, Dan Carpenter a écrit : Hello Pierre-Eric Pelloux-Prayer, Commit 56c594d8df64 ("drm: add DRM_SET_CLIENT_NAME ioctl") from Oct 3, 2024 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/drm_debugfs.c:104 drm_cl

Re: [PATCH v3 1/6] drm: add DRM_SET_NAME ioctl

2024-09-23 Thread Pierre-Eric Pelloux-Prayer
Hi Dmitry, Le 23/09/2024 à 12:28, Dmitry Osipenko a écrit : On 9/20/24 12:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME

Re: [PATCH v3 1/6] drm: add DRM_SET_NAME ioctl

2024-09-24 Thread Pierre-Eric Pelloux-Prayer
Le 23/09/2024 à 12:06, Tvrtko Ursulin a écrit : On 20/09/2024 10:06, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl

Re: [PATCH v3 3/6] drm/amdgpu: delay the use of amdgpu_vm_set_task_info

2024-09-24 Thread Pierre-Eric Pelloux-Prayer
Le 24/09/2024 à 10:43, Tvrtko Ursulin a écrit : On 24/09/2024 09:23, Christian König wrote: Am 23.09.24 um 12:25 schrieb Tvrtko Ursulin: On 20/09/2024 10:06, Pierre-Eric Pelloux-Prayer wrote: At this point the vm is locked so we safely modify it without risk of concurrent access. To

Re: [PATCH v3 4/6] drm/amdgpu: alloc and init vm::task_info from first submit

2024-09-24 Thread Pierre-Eric Pelloux-Prayer
Le 23/09/2024 à 12:58, Tvrtko Ursulin a écrit : On 20/09/2024 10:06, Pierre-Eric Pelloux-Prayer wrote: This will allow to use flexible array to store the process name and other information. This also means that process name will be determined once and for all, instead of at each submit

[PATCH v4 6/6] drm/amdgpu: use drm_file::name in task_info::process_desc

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
gears/test-set-fd-name -- Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 1 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH v4 4/6] drm/amdgpu: alloc and init vm::task_info from first submit

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
This will allow to use flexible array to store the process name and other information. This also means that process name will be determined once and for all, instead of at each submit. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 29

[PATCH v4 0/6] DRM_SET_CLIENT_NAME ioctl

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
ssage of commit 3/6 (Trvtko) * reworked amdgpu_vm_set_task_info a bit in 4/6 (Trvtko) v3: https://lists.freedesktop.org/archives/dri-devel/2024-September/470488.html Pierre-Eric Pelloux-Prayer (6): drm: add DRM_SET_CLIENT_NAME ioctl drm: use drm_file client_name in fdinfo drm/amdgpu: delay th

[PATCH v4 5/6] drm/amdgpu: make process_name a flexible array

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
And rename it process_desc, since it will soon contain more than just the process_name. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

[PATCH v4 3/6] drm/amdgpu: delay the use of amdgpu_vm_set_task_info

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
At the point the VM is locked (through the root PDs dma_resv object), so it's safer to call amdgpu_vm_set_task_info. The original place was not protected against concurrent access, but the risk was limited to mangled process/task name. Signed-off-by: Pierre-Eric Pelloux-Prayer --- driver

[PATCH v4 2/6] drm: use drm_file client_name in fdinfo

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
Add an optional drm-client-name field to drm fdinfo's output. Reviewed-by: Christian König Reviewed-by: Tvrtko Ursulin Signed-off-by: Pierre-Eric Pelloux-Prayer --- Documentation/gpu/drm-usage-stats.rst | 5 + drivers/gpu/drm/drm_file.c| 5 + 2 files changed, 10 inser

[PATCH v4 1/6] drm: add DRM_SET_CLIENT_NAME ioctl

2024-09-27 Thread Pierre-Eric Pelloux-Prayer
valid use, and clears the existing name. Reviewed-by: Tvrtko Ursulin Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_debugfs.c | 14 ++--- drivers/gpu/drm/drm_file.c| 5 drivers/gpu/drm/drm_ioctl.c | 55 +++ include/drm/drm_fil

[PATCH v3 0/6] DRM_SET_NAME ioctl

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
allocated on first submit - amdgpu_task_info::process_name was renamed process_desc, and includes drm_file::name when set. Like task_info allocation this is done only once. Pierre-Eric Pelloux-Prayer (6): drm: add DRM_SET_NAME ioctl drm: use drm_file name in fdinfo drm/amdgpu:

[PATCH v3 1/6] drm: add DRM_SET_NAME ioctl

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
-' * if a 0-length string is passed the name is cleared Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_debugfs.c | 12 ++--- drivers/gpu/drm/drm_file.c| 5 drivers/gpu/drm/drm_ioctl.c | 48 +++ include/drm/drm_file.h|

[PATCH v3 6/6] drm/amdgpu: use drm_file::name in task_info::process_desc

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
gears/test-set-fd-name -- Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 1 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH v3 3/6] drm/amdgpu: delay the use of amdgpu_vm_set_task_info

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
At this point the vm is locked so we safely modify it without risk of concurrent access. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b

[PATCH v3 4/6] drm/amdgpu: alloc and init vm::task_info from first submit

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
This will allow to use flexible array to store the process name and other information. This also means that process name will be determined once and for all, instead of at each submit. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 15 +-- 1

[PATCH v3 2/6] drm: use drm_file name in fdinfo

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
Add an optional drm-client-name field to drm fdinfo's output. Reviewed-by: Christian König Reviewed-by: Tvrtko Ursulin Signed-off-by: Pierre-Eric Pelloux-Prayer --- Documentation/gpu/drm-usage-stats.rst | 5 + drivers/gpu/drm/drm_file.c| 5 + 2 files changed, 10 inser

[PATCH v3 5/6] drm/amdgpu: make process_name a flexible array

2024-09-20 Thread Pierre-Eric Pelloux-Prayer
And rename it process_desc, since it will soon contain more than just the process_name. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

Re: [PATCH v2 1/3] drm: add DRM_SET_NAME ioctl

2024-09-19 Thread Pierre-Eric Pelloux-Prayer
Le 16/09/2024 à 16:35, Tvrtko Ursulin a écrit : On 16/09/2024 14:32, Pierre-Eric Pelloux-Prayer wrote: Giving the opportunity to userspace to associate a free-form name with a drm_file struct is helpful for tracking and debugging. This is similar to the existing DMA_BUF_SET_NAME ioctl

[PATCH v5 0/6] DRM_SET_CLIENT_NAME ioctl

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
tches 1, 4 and 6 were slightly reworked based on Tvrtko' suggestions. v4: https://lists.freedesktop.org/archives/dri-devel/2024-September/471695.html Pierre-Eric Pelloux-Prayer (6): drm: add DRM_SET_CLIENT_NAME ioctl drm: use drm_file client_name in fdinfo drm/amdgpu: d

[PATCH v5 1/6] drm: add DRM_SET_CLIENT_NAME ioctl

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
valid use, and clears the existing name. Reviewed-by: Tvrtko Ursulin Reviewed-by: Dmitry Osipenko Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_debugfs.c | 14 +++--- drivers/gpu/drm/drm_file.c| 5 drivers/gpu/drm/drm_ioctl.c | 51 +

[PATCH v5 2/6] drm: use drm_file client_name in fdinfo

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
Add an optional drm-client-name field to drm fdinfo's output. Reviewed-by: Christian König Reviewed-by: Tvrtko Ursulin Signed-off-by: Pierre-Eric Pelloux-Prayer --- Documentation/gpu/drm-usage-stats.rst | 5 + drivers/gpu/drm/drm_file.c| 5 + 2 files changed, 10 inser

[PATCH v5 3/6] drm/amdgpu: delay the use of amdgpu_vm_set_task_info

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
At the point the VM is locked (through the root PDs dma_resv object), so it's safer to call amdgpu_vm_set_task_info. The original place was not protected against concurrent access, but the risk was limited to mangled process/task name. Signed-off-by: Pierre-Eric Pelloux-Prayer --- driver

[PATCH v5 4/6] drm/amdgpu: alloc and init vm::task_info from first submit

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
This will allow to use flexible array to store the process name and other information. This also means that process name will be determined once and for all, instead of at each submit. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 29

[PATCH v5 5/6] drm/amdgpu: make process_name a flexible array

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
And rename it process_desc, since it will soon contain more than just the process_name. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

[PATCH v5 6/6] drm/amdgpu: use drm_file::name in task_info::process_desc

2024-10-03 Thread Pierre-Eric Pelloux-Prayer
gears/test-set-fd-name -- Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 1 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Re: [PATCH v6 2/7] drm/sched: store the drm client_id in drm_sched_fence

2024-11-19 Thread Pierre-Eric Pelloux-Prayer
Le 15/11/2024 à 13:23, Steven Price a écrit : On 14/11/2024 10:01, Pierre-Eric Pelloux-Prayer wrote: This will be used in a later commit to trace the drm client_id in some of the gpu_scheduler trace events. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH v6 2/7] drm/sched: store the drm client_id in drm_sched_fence

2024-11-19 Thread Pierre-Eric Pelloux-Prayer
Le 15/11/2024 à 15:56, Philipp Stanner a écrit : On Thu, 2024-11-14 at 11:01 +0100, Pierre-Eric Pelloux-Prayer wrote: This will be used in a later commit to trace the drm client_id in some of the gpu_scheduler trace events. I think this commit message should detail what the patch is actual

Re: [PATCH v6 2/7] drm/sched: store the drm client_id in drm_sched_fence

2024-11-19 Thread Pierre-Eric Pelloux-Prayer
Le 14/11/2024 à 13:01, Tvrtko Ursulin a écrit : On 14/11/2024 10:01, Pierre-Eric Pelloux-Prayer wrote: This will be used in a later commit to trace the drm client_id in some of the gpu_scheduler trace events. I wonder if it would be tidier to store the drm_client_id in the entity via

[PATCH v6 2/7] drm/sched: store the drm client_id in drm_sched_fence

2024-11-14 Thread Pierre-Eric Pelloux-Prayer
This will be used in a later commit to trace the drm client_id in some of the gpu_scheduler trace events. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- drivers/gpu/drm/amd/amdgpu

[PATCH v6 4/7] drm/sched: cleanup gpu_scheduler trace events

2024-11-14 Thread Pierre-Eric Pelloux-Prayer
A fence uniquely identify a job, so this commits updates the places where a kernel pointer was used as an identifier by: "fence=(context:%llu, seqno:%lld)" Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 39 +++ 1 fi

[PATCH v6 5/7] drm/sched: trace dependencies for gpu jobs

2024-11-14 Thread Pierre-Eric Pelloux-Prayer
the same base event class, the caller of trace_drm_run_job have to pass a dep_count of 0 (which is ignored because dependencies are only considered at submit time). Signed-off-by: Pierre-Eric Pelloux-Prayer --- .../gpu/drm/scheduler/gpu_scheduler_trace.h | 59 --- drivers/gpu/drm

[PATCH v6 1/7] drm/debugfs: output client_id in in drm_clients_info

2024-11-14 Thread Pierre-Eric Pelloux-Prayer
client_id is a unique id used by fdinfo. Having it listed in 'clients' output means a userspace application can correlate the fields, eg: given a fdinfo id get the fdinfo name. Signed-off-by: Pierre-Eric Pelloux-Prayer --- drivers/gpu/drm/drm_debugfs.c | 10 ++ 1 file

  1   2   >