All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
	Thanneeru Srinivasulu <thanneeru.srinivasulu@intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm/i915/guc: Inject probe errors for CT send
Date: Tue, 12 Oct 2021 17:12:45 +0200	[thread overview]
Message-ID: <c5db2912-bfb8-746e-2421-eb0ae0d6a29c@intel.com> (raw)
In-Reply-To: <20211011180050.GA29821@jons-linux-dev-box>



On 11.10.2021 20:00, Matthew Brost wrote:
> On Mon, Oct 11, 2021 at 08:51:06PM +0530, Thanneeru Srinivasulu wrote:
>> Inject probe errors -ENXIO, -EBUSY for CT send.
>>
>> Signed-off-by: Thanneeru Srinivasulu <thanneeru.srinivasulu@intel.com>
>> ---
>>  drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> index 83764db0fd6d..8ffef3abd3da 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> @@ -765,6 +765,14 @@ int intel_guc_ct_send(struct intel_guc_ct *ct, const u32 *action, u32 len,
>>  	u32 status = ~0; /* undefined */
>>  	int ret;
>>  
>> +	ret = i915_inject_probe_error(ct_to_i915(ct), -ENXIO);
>> +	if (ret)
>> +		return ret;
>> +
> 
> I don't see where -ENXIO is returned during an error that we handle
> unless I am missing something. If we don't return -ENXIO anywhere else I
> don't think we need to inject this error.

but the point of this exercise is not to handle such error but to
gracefully abort probe without panic or leaks. note that we are already
using -ENXIO in many other injected failure points (mostly in uc code)

thus for me above change is also fine and the whole series is:

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

-Michal

> 
> Matt 
> 
>> +	ret = i915_inject_probe_error(ct_to_i915(ct), -EBUSY);
>> +	if (ret)
>> +		return ret;
>> +
>>  	if (unlikely(!ct->enabled)) {
>>  		struct intel_guc *guc = ct_to_guc(ct);
>>  		struct intel_uc *uc = container_of(guc, struct intel_uc, guc);
>> -- 
>> 2.25.1
>>

WARNING: multiple messages have this Message-ID (diff)
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
	Thanneeru Srinivasulu <thanneeru.srinivasulu@intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915/guc: Inject probe errors for CT send
Date: Tue, 12 Oct 2021 17:12:45 +0200	[thread overview]
Message-ID: <c5db2912-bfb8-746e-2421-eb0ae0d6a29c@intel.com> (raw)
In-Reply-To: <20211011180050.GA29821@jons-linux-dev-box>



On 11.10.2021 20:00, Matthew Brost wrote:
> On Mon, Oct 11, 2021 at 08:51:06PM +0530, Thanneeru Srinivasulu wrote:
>> Inject probe errors -ENXIO, -EBUSY for CT send.
>>
>> Signed-off-by: Thanneeru Srinivasulu <thanneeru.srinivasulu@intel.com>
>> ---
>>  drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> index 83764db0fd6d..8ffef3abd3da 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
>> @@ -765,6 +765,14 @@ int intel_guc_ct_send(struct intel_guc_ct *ct, const u32 *action, u32 len,
>>  	u32 status = ~0; /* undefined */
>>  	int ret;
>>  
>> +	ret = i915_inject_probe_error(ct_to_i915(ct), -ENXIO);
>> +	if (ret)
>> +		return ret;
>> +
> 
> I don't see where -ENXIO is returned during an error that we handle
> unless I am missing something. If we don't return -ENXIO anywhere else I
> don't think we need to inject this error.

but the point of this exercise is not to handle such error but to
gracefully abort probe without panic or leaks. note that we are already
using -ENXIO in many other injected failure points (mostly in uc code)

thus for me above change is also fine and the whole series is:

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

-Michal

> 
> Matt 
> 
>> +	ret = i915_inject_probe_error(ct_to_i915(ct), -EBUSY);
>> +	if (ret)
>> +		return ret;
>> +
>>  	if (unlikely(!ct->enabled)) {
>>  		struct intel_guc *guc = ct_to_guc(ct);
>>  		struct intel_uc *uc = container_of(guc, struct intel_uc, guc);
>> -- 
>> 2.25.1
>>

  reply	other threads:[~2021-10-12 15:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 15:21 [PATCH 0/4] drm/i915/guc: Inject probe errors for MMIO send, CT send Thanneeru Srinivasulu
2021-10-11 15:21 ` [Intel-gfx] " Thanneeru Srinivasulu
2021-10-11 15:21 ` [PATCH 1/4] drm/i915/huc: Use i915_probe_error to report early CTB failures Thanneeru Srinivasulu
2021-10-11 15:21   ` [Intel-gfx] " Thanneeru Srinivasulu
2021-10-11 18:10   ` Matthew Brost
2021-10-11 18:10     ` [Intel-gfx] " Matthew Brost
2021-10-12 16:16     ` Jani Nikula
2021-10-12 16:19       ` Jani Nikula
2021-10-12 16:43       ` Michal Wajdeczko
2021-10-11 15:21 ` [PATCH 2/4] drm/i915/huc: Use i915_probe_error to report early HuC failures Thanneeru Srinivasulu
2021-10-11 15:21   ` [Intel-gfx] " Thanneeru Srinivasulu
2021-10-11 18:13   ` Matthew Brost
2021-10-11 18:13     ` [Intel-gfx] " Matthew Brost
2021-10-11 15:21 ` [PATCH 3/4] drm/i915/guc: Inject probe errors for MMIO send Thanneeru Srinivasulu
2021-10-11 15:21   ` [Intel-gfx] " Thanneeru Srinivasulu
2021-10-11 18:09   ` Matthew Brost
2021-10-11 18:09     ` [Intel-gfx] " Matthew Brost
2021-10-11 15:21 ` [PATCH 4/4] drm/i915/guc: Inject probe errors for CT send Thanneeru Srinivasulu
2021-10-11 15:21   ` [Intel-gfx] " Thanneeru Srinivasulu
2021-10-11 18:00   ` Matthew Brost
2021-10-11 18:00     ` [Intel-gfx] " Matthew Brost
2021-10-12 15:12     ` Michal Wajdeczko [this message]
2021-10-12 15:12       ` Michal Wajdeczko
2021-10-11 17:00 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/guc: Inject probe errors for MMIO send, " Patchwork
2021-10-11 20:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=c5db2912-bfb8-746e-2421-eb0ae0d6a29c@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=thanneeru.srinivasulu@intel.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.