All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	siqueira@igalia.com, airlied@gmail.com, simona@ffwll.ch,
	rodrigo.vivi@intel.com, jani.nikula@linux.intel.com,
	"Xaver Hugl" <xaver.hugl@gmail.com>,
	"Krzysztof Karas" <krzysztof.karas@intel.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	kernel-dev@igalia.com, amd-gfx@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v6 1/3] drm: Create a task info option for wedge events
Date: Fri, 23 May 2025 05:45:36 +0300	[thread overview]
Message-ID: <aC_hUHyLhaY40aSl@black.fi.intel.com> (raw)
In-Reply-To: <20250521153323.935974-2-andrealmeid@igalia.com>

On Wed, May 21, 2025 at 12:33:21PM -0300, André Almeida wrote:
> When a device get wedged, it might be caused by a guilty application.
> For userspace, knowing which task was the cause can be useful for some

s/cause/involved

> situations, like for implementing a policy, logs or for giving a chance
> for the compositor to let the user know what task caused the problem.

Ditto

> This is an optional argument, when the task info is not available, the
> PID and TASK string won't appear in the event string.
> 
> Sometimes just the PID isn't enough giving that the task might be already
> dead by the time userspace will try to check what was this PID's name,
> so to make the life easier also notify what's the task's name in the user
> event.

...

> -int drm_dev_wedged_event(struct drm_device *dev, unsigned long method)
> +int drm_dev_wedged_event(struct drm_device *dev, unsigned long method,
> +			 struct drm_wedge_task_info *info)
>  {
>  	const char *recovery = NULL;
>  	unsigned int len, opt;
> -	/* Event string length up to 28+ characters with available methods */
> -	char event_string[32];
> -	char *envp[] = { event_string, NULL };
> +	char event_string[WEDGE_STR_LEN], pid_string[PID_LEN] = "", comm_string[TASK_COMM_LEN] = "";

Most likely there's no need to initialize these.

With above changes,

Reviewed-by: Raag Jadav <raag.jadav@intel.com>

  reply	other threads:[~2025-05-23  7:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 15:33 [PATCH v6 0/3] drm: Create a task info option for wedge events André Almeida
2025-05-21 15:33 ` [PATCH v6 1/3] " André Almeida
2025-05-23  2:45   ` Raag Jadav [this message]
2025-05-21 15:33 ` [PATCH v6 2/3] drm/doc: Add a section about "Task information" for the wedge API André Almeida
2025-05-21 15:33 ` [PATCH v6 3/3] drm/amdgpu: Make use of drm_wedge_task_info André Almeida
2025-05-21 15:57 ` ✓ CI.Patch_applied: success for drm: Create a task info option for wedge events Patchwork
2025-05-21 15:57 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-21 15:57 ` ✗ CI.KUnit: failure " Patchwork
2025-05-21 17:07 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2025-05-21 17:07 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-05-21 17:27 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-21 19:16 ` ✓ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aC_hUHyLhaY40aSl@black.fi.intel.com \
    --to=raag.jadav@intel.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@igalia.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=kernel-dev@igalia.com \
    --cc=krzysztof.karas@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=xaver.hugl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.