linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] panthor: print task pid and comm on gpu errors
@ 2025-07-13  3:08 Chia-I Wu
  2025-07-13  3:08 ` [PATCH v2 1/3] panthor: set owner field for driver fops Chia-I Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chia-I Wu @ 2025-07-13  3:08 UTC (permalink / raw)
  To: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-kernel

This series saves task pid and comm in panthor_group and prints task pid and
comm on gpu errors.

v2: save the task info in panthor_group on panthor_group_create, rather than
    in panthor_file on panthor_open, because, when the two differ, we are more
    interested in the task that created the group.

Chia-I Wu (3):
  panthor: set owner field for driver fops
  panthor: save task pid and comm in panthor_group
  panthor: dump task pid and comm on gpu errors

 drivers/gpu/drm/panthor/panthor_drv.c   | 14 ++------
 drivers/gpu/drm/panthor/panthor_sched.c | 43 ++++++++++++++++++++++---
 2 files changed, 41 insertions(+), 16 deletions(-)

-- 
2.50.0.727.gbf7dc18ff4-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/3] panthor: set owner field for driver fops
  2025-07-13  3:08 [PATCH v2 0/3] panthor: print task pid and comm on gpu errors Chia-I Wu
@ 2025-07-13  3:08 ` Chia-I Wu
  2025-07-13  3:08 ` [PATCH v2 2/3] panthor: save task pid and comm in panthor_group Chia-I Wu
  2025-07-13  3:08 ` [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors Chia-I Wu
  2 siblings, 0 replies; 7+ messages in thread
From: Chia-I Wu @ 2025-07-13  3:08 UTC (permalink / raw)
  To: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-kernel

It allows us to get rid of manual try_module_get / module_put.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
---
 drivers/gpu/drm/panthor/panthor_drv.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
index 1116f2d2826ee..775a66c394544 100644
--- a/drivers/gpu/drm/panthor/panthor_drv.c
+++ b/drivers/gpu/drm/panthor/panthor_drv.c
@@ -1400,14 +1400,9 @@ panthor_open(struct drm_device *ddev, struct drm_file *file)
 	struct panthor_file *pfile;
 	int ret;
 
-	if (!try_module_get(THIS_MODULE))
-		return -EINVAL;
-
 	pfile = kzalloc(sizeof(*pfile), GFP_KERNEL);
-	if (!pfile) {
-		ret = -ENOMEM;
-		goto err_put_mod;
-	}
+	if (!pfile)
+		return -ENOMEM;
 
 	pfile->ptdev = ptdev;
 	pfile->user_mmio.offset = DRM_PANTHOR_USER_MMIO_OFFSET;
@@ -1439,9 +1434,6 @@ panthor_open(struct drm_device *ddev, struct drm_file *file)
 
 err_free_file:
 	kfree(pfile);
-
-err_put_mod:
-	module_put(THIS_MODULE);
 	return ret;
 }
 
@@ -1454,7 +1446,6 @@ panthor_postclose(struct drm_device *ddev, struct drm_file *file)
 	panthor_vm_pool_destroy(pfile);
 
 	kfree(pfile);
-	module_put(THIS_MODULE);
 }
 
 static const struct drm_ioctl_desc panthor_drm_driver_ioctls[] = {
@@ -1555,6 +1546,7 @@ static void panthor_show_fdinfo(struct drm_printer *p, struct drm_file *file)
 }
 
 static const struct file_operations panthor_drm_driver_fops = {
+	.owner = THIS_MODULE,
 	.open = drm_open,
 	.release = drm_release,
 	.unlocked_ioctl = drm_ioctl,
-- 
2.50.0.727.gbf7dc18ff4-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/3] panthor: save task pid and comm in panthor_group
  2025-07-13  3:08 [PATCH v2 0/3] panthor: print task pid and comm on gpu errors Chia-I Wu
  2025-07-13  3:08 ` [PATCH v2 1/3] panthor: set owner field for driver fops Chia-I Wu
@ 2025-07-13  3:08 ` Chia-I Wu
  2025-07-13  5:10   ` kernel test robot
  2025-07-17 15:24   ` Steven Price
  2025-07-13  3:08 ` [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors Chia-I Wu
  2 siblings, 2 replies; 7+ messages in thread
From: Chia-I Wu @ 2025-07-13  3:08 UTC (permalink / raw)
  To: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-kernel

We would like to report them on gpu errors.

We choose to save the info on panthor_group_create rather than on
panthor_open because, when the two differ, we are more interested in the
task that created the group.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>

---
v2: save to panthor_group on panthor_group_create rather than to
    panthor_file on panthor_open
---
 drivers/gpu/drm/panthor/panthor_sched.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index a2248f692a030..823b0fe678ba6 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -641,6 +641,15 @@ struct panthor_group {
 		size_t kbo_sizes;
 	} fdinfo;
 
+	/** @task_info: Info of current->group_leader that created the group. */
+	struct {
+		/** @pid: pid of current->group_leader */
+		pid_t pid;
+
+		/** @comm: comm of current->group_leader */
+		char comm[TASK_COMM_LEN];
+	} task_info;
+
 	/** @state: Group state. */
 	enum panthor_group_state state;
 
@@ -3389,6 +3398,14 @@ group_create_queue(struct panthor_group *group,
 	return ERR_PTR(ret);
 }
 
+static void group_init_task_info(struct panthor_group *group)
+{
+	struct task_struct *task = current->group_leader;
+
+	group->task_info.pid = task->pid;
+	get_task_comm(group->task_info.comm, task);
+}
+
 static void add_group_kbo_sizes(struct panthor_device *ptdev,
 				struct panthor_group *group)
 {
@@ -3540,6 +3557,8 @@ int panthor_group_create(struct panthor_file *pfile,
 	add_group_kbo_sizes(group->ptdev, group);
 	spin_lock_init(&group->fdinfo.lock);
 
+	group_init_task_info(group);
+
 	return gid;
 
 err_put_group:
-- 
2.50.0.727.gbf7dc18ff4-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors
  2025-07-13  3:08 [PATCH v2 0/3] panthor: print task pid and comm on gpu errors Chia-I Wu
  2025-07-13  3:08 ` [PATCH v2 1/3] panthor: set owner field for driver fops Chia-I Wu
  2025-07-13  3:08 ` [PATCH v2 2/3] panthor: save task pid and comm in panthor_group Chia-I Wu
@ 2025-07-13  3:08 ` Chia-I Wu
  2025-07-17 15:24   ` Steven Price
  2 siblings, 1 reply; 7+ messages in thread
From: Chia-I Wu @ 2025-07-13  3:08 UTC (permalink / raw)
  To: Boris Brezillon, Steven Price, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-kernel

It is useful to know which tasks cause gpu errors.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
---
 drivers/gpu/drm/panthor/panthor_sched.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index 823b0fe678ba6..47912b06ec9d3 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -1364,8 +1364,12 @@ cs_slot_process_fatal_event_locked(struct panthor_device *ptdev,
 	fatal = cs_iface->output->fatal;
 	info = cs_iface->output->fatal_info;
 
-	if (group)
+	if (group) {
+		drm_warn(&ptdev->base, "CS_FATAL: pid=%d, comm=%s\n",
+			 group->task_info.pid, group->task_info.comm);
+
 		group->fatal_queues |= BIT(cs_id);
+	}
 
 	if (CS_EXCEPTION_TYPE(fatal) == DRM_PANTHOR_EXCEPTION_CS_UNRECOVERABLE) {
 		/* If this exception is unrecoverable, queue a reset, and make
@@ -1425,6 +1429,11 @@ cs_slot_process_fault_event_locked(struct panthor_device *ptdev,
 		spin_unlock(&queue->fence_ctx.lock);
 	}
 
+	if (group) {
+		drm_warn(&ptdev->base, "CS_FAULT: pid=%d, comm=%s\n",
+			 group->task_info.pid, group->task_info.comm);
+	}
+
 	drm_warn(&ptdev->base,
 		 "CSG slot %d CS slot: %d\n"
 		 "CS_FAULT.EXCEPTION_TYPE: 0x%x (%s)\n"
@@ -1641,11 +1650,15 @@ csg_slot_process_progress_timer_event_locked(struct panthor_device *ptdev, u32 c
 
 	lockdep_assert_held(&sched->lock);
 
-	drm_warn(&ptdev->base, "CSG slot %d progress timeout\n", csg_id);
-
 	group = csg_slot->group;
-	if (!drm_WARN_ON(&ptdev->base, !group))
+	if (!drm_WARN_ON(&ptdev->base, !group)) {
+		drm_warn(&ptdev->base, "CSG_PROGRESS_TIMER_EVENT: pid=%d, comm=%s\n",
+			 group->task_info.pid, group->task_info.comm);
+
 		group->timedout = true;
+	}
+
+	drm_warn(&ptdev->base, "CSG slot %d progress timeout\n", csg_id);
 
 	sched_queue_delayed_work(sched, tick, 0);
 }
@@ -3227,7 +3240,8 @@ queue_timedout_job(struct drm_sched_job *sched_job)
 	struct panthor_scheduler *sched = ptdev->scheduler;
 	struct panthor_queue *queue = group->queues[job->queue_idx];
 
-	drm_warn(&ptdev->base, "job timeout\n");
+	drm_warn(&ptdev->base, "job timeout: pid=%d, comm=%s, seqno=%llu\n",
+		 group->task_info.pid, group->task_info.comm, job->done_fence->seqno);
 
 	drm_WARN_ON(&ptdev->base, atomic_read(&sched->reset.in_progress));
 
-- 
2.50.0.727.gbf7dc18ff4-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/3] panthor: save task pid and comm in panthor_group
  2025-07-13  3:08 ` [PATCH v2 2/3] panthor: save task pid and comm in panthor_group Chia-I Wu
@ 2025-07-13  5:10   ` kernel test robot
  2025-07-17 15:24   ` Steven Price
  1 sibling, 0 replies; 7+ messages in thread
From: kernel test robot @ 2025-07-13  5:10 UTC (permalink / raw)
  To: Chia-I Wu, Boris Brezillon, Steven Price, Liviu Dudau,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, dri-devel, linux-kernel
  Cc: oe-kbuild-all

Hi Chia-I,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20250711]
[also build test WARNING on v6.16-rc5]
[cannot apply to linus/master v6.16-rc5 v6.16-rc4 v6.16-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Chia-I-Wu/panthor-set-owner-field-for-driver-fops/20250713-111248
base:   next-20250711
patch link:    https://lore.kernel.org/r/20250713030831.3227607-3-olvaffe%40gmail.com
patch subject: [PATCH v2 2/3] panthor: save task pid and comm in panthor_group
config: i386-buildonly-randconfig-003-20250713 (https://download.01.org/0day-ci/archive/20250713/202507131246.VXxAzjGd-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250713/202507131246.VXxAzjGd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507131246.VXxAzjGd-lkp@intel.com/

All warnings (new ones prefixed by >>):

   Warning: drivers/gpu/drm/panthor/panthor_sched.c:317 Excess struct member 'runnable' description in 'panthor_scheduler'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:317 Excess struct member 'idle' description in 'panthor_scheduler'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:317 Excess struct member 'waiting' description in 'panthor_scheduler'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:317 Excess struct member 'has_ref' description in 'panthor_scheduler'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:317 Excess struct member 'in_progress' description in 'panthor_scheduler'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:317 Excess struct member 'stopped_groups' description in 'panthor_scheduler'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'mem' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'input' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'output' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'input_fw_va' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'output_fw_va' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'gpu_va' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'ref' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'gt' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'sync64' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'bo' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'offset' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'kmap' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'lock' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'id' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'seqno' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'last_fence' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'in_flight_jobs' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'slots' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'slot_count' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:489 Excess struct member 'seqno' description in 'panthor_queue'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:707 Excess struct member 'data' description in 'panthor_group'
>> Warning: drivers/gpu/drm/panthor/panthor_sched.c:707 Excess struct member 'pid' description in 'panthor_group'
>> Warning: drivers/gpu/drm/panthor/panthor_sched.c:707 Excess struct member 'comm' description in 'panthor_group'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'start' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'size' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'latest_flush' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'start' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'end' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'mask' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:843 Excess struct member 'slot' description in 'panthor_job'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:1770 function parameter 'ptdev' not described in 'panthor_sched_report_fw_events'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:1770 function parameter 'events' not described in 'panthor_sched_report_fw_events'
   Warning: drivers/gpu/drm/panthor/panthor_sched.c:2663 function parameter 'ptdev' not described in 'panthor_sched_report_mmu_fault'

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/3] panthor: save task pid and comm in panthor_group
  2025-07-13  3:08 ` [PATCH v2 2/3] panthor: save task pid and comm in panthor_group Chia-I Wu
  2025-07-13  5:10   ` kernel test robot
@ 2025-07-17 15:24   ` Steven Price
  1 sibling, 0 replies; 7+ messages in thread
From: Steven Price @ 2025-07-17 15:24 UTC (permalink / raw)
  To: Chia-I Wu, Boris Brezillon, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-kernel

On 13/07/2025 04:08, Chia-I Wu wrote:
> We would like to report them on gpu errors.
> 
> We choose to save the info on panthor_group_create rather than on
> panthor_open because, when the two differ, we are more interested in the
> task that created the group.
> 
> Signed-off-by: Chia-I Wu <olvaffe@gmail.com>

One nit below, but with that fixed:

Reviewed-by: Steven Price <steven.price@arm.com>

> 
> ---
> v2: save to panthor_group on panthor_group_create rather than to
>     panthor_file on panthor_open
> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index a2248f692a030..823b0fe678ba6 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -641,6 +641,15 @@ struct panthor_group {
>  		size_t kbo_sizes;
>  	} fdinfo;
>  
> +	/** @task_info: Info of current->group_leader that created the group. */
> +	struct {
> +		/** @pid: pid of current->group_leader */
> +		pid_t pid;
> +
> +		/** @comm: comm of current->group_leader */
> +		char comm[TASK_COMM_LEN];

As the kernel test robot reports, this kerneldoc isn't quite right.
We've got other issues in this file but you need to specify the struct
name as well, i.e.:

		/** @task_info.pid: pid of current->group_leader */
		pid_t pid;

		/** @task_info.comm: comm of current->group_leader */
		char comm[TASK_COMM_LEN];

It's been on my TODO list for a while to fix the rest of the file...

Thanks,
Steve

> +	} task_info;
> +
>  	/** @state: Group state. */
>  	enum panthor_group_state state;
>  
> @@ -3389,6 +3398,14 @@ group_create_queue(struct panthor_group *group,
>  	return ERR_PTR(ret);
>  }
>  
> +static void group_init_task_info(struct panthor_group *group)
> +{
> +	struct task_struct *task = current->group_leader;
> +
> +	group->task_info.pid = task->pid;
> +	get_task_comm(group->task_info.comm, task);
> +}
> +
>  static void add_group_kbo_sizes(struct panthor_device *ptdev,
>  				struct panthor_group *group)
>  {
> @@ -3540,6 +3557,8 @@ int panthor_group_create(struct panthor_file *pfile,
>  	add_group_kbo_sizes(group->ptdev, group);
>  	spin_lock_init(&group->fdinfo.lock);
>  
> +	group_init_task_info(group);
> +
>  	return gid;
>  
>  err_put_group:


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors
  2025-07-13  3:08 ` [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors Chia-I Wu
@ 2025-07-17 15:24   ` Steven Price
  0 siblings, 0 replies; 7+ messages in thread
From: Steven Price @ 2025-07-17 15:24 UTC (permalink / raw)
  To: Chia-I Wu, Boris Brezillon, Liviu Dudau, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	dri-devel, linux-kernel

On 13/07/2025 04:08, Chia-I Wu wrote:
> It is useful to know which tasks cause gpu errors.
> 
> Signed-off-by: Chia-I Wu <olvaffe@gmail.com>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 24 +++++++++++++++++++-----
>  1 file changed, 19 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index 823b0fe678ba6..47912b06ec9d3 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -1364,8 +1364,12 @@ cs_slot_process_fatal_event_locked(struct panthor_device *ptdev,
>  	fatal = cs_iface->output->fatal;
>  	info = cs_iface->output->fatal_info;
>  
> -	if (group)
> +	if (group) {
> +		drm_warn(&ptdev->base, "CS_FATAL: pid=%d, comm=%s\n",
> +			 group->task_info.pid, group->task_info.comm);
> +
>  		group->fatal_queues |= BIT(cs_id);
> +	}
>  
>  	if (CS_EXCEPTION_TYPE(fatal) == DRM_PANTHOR_EXCEPTION_CS_UNRECOVERABLE) {
>  		/* If this exception is unrecoverable, queue a reset, and make
> @@ -1425,6 +1429,11 @@ cs_slot_process_fault_event_locked(struct panthor_device *ptdev,
>  		spin_unlock(&queue->fence_ctx.lock);
>  	}
>  
> +	if (group) {
> +		drm_warn(&ptdev->base, "CS_FAULT: pid=%d, comm=%s\n",
> +			 group->task_info.pid, group->task_info.comm);
> +	}
> +
>  	drm_warn(&ptdev->base,
>  		 "CSG slot %d CS slot: %d\n"
>  		 "CS_FAULT.EXCEPTION_TYPE: 0x%x (%s)\n"
> @@ -1641,11 +1650,15 @@ csg_slot_process_progress_timer_event_locked(struct panthor_device *ptdev, u32 c
>  
>  	lockdep_assert_held(&sched->lock);
>  
> -	drm_warn(&ptdev->base, "CSG slot %d progress timeout\n", csg_id);
> -
>  	group = csg_slot->group;
> -	if (!drm_WARN_ON(&ptdev->base, !group))
> +	if (!drm_WARN_ON(&ptdev->base, !group)) {
> +		drm_warn(&ptdev->base, "CSG_PROGRESS_TIMER_EVENT: pid=%d, comm=%s\n",
> +			 group->task_info.pid, group->task_info.comm);
> +
>  		group->timedout = true;
> +	}
> +
> +	drm_warn(&ptdev->base, "CSG slot %d progress timeout\n", csg_id);
>  
>  	sched_queue_delayed_work(sched, tick, 0);
>  }
> @@ -3227,7 +3240,8 @@ queue_timedout_job(struct drm_sched_job *sched_job)
>  	struct panthor_scheduler *sched = ptdev->scheduler;
>  	struct panthor_queue *queue = group->queues[job->queue_idx];
>  
> -	drm_warn(&ptdev->base, "job timeout\n");
> +	drm_warn(&ptdev->base, "job timeout: pid=%d, comm=%s, seqno=%llu\n",
> +		 group->task_info.pid, group->task_info.comm, job->done_fence->seqno);
>  
>  	drm_WARN_ON(&ptdev->base, atomic_read(&sched->reset.in_progress));
>  


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-07-17 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-13  3:08 [PATCH v2 0/3] panthor: print task pid and comm on gpu errors Chia-I Wu
2025-07-13  3:08 ` [PATCH v2 1/3] panthor: set owner field for driver fops Chia-I Wu
2025-07-13  3:08 ` [PATCH v2 2/3] panthor: save task pid and comm in panthor_group Chia-I Wu
2025-07-13  5:10   ` kernel test robot
2025-07-17 15:24   ` Steven Price
2025-07-13  3:08 ` [PATCH v2 3/3] panthor: dump task pid and comm on gpu errors Chia-I Wu
2025-07-17 15:24   ` Steven Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).