All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: intel-gfx@lists.freedesktop.org,
	Sagar Arun Kamble <sagar.a.kamble@intel.com>
Subject: Re: [PATCH v4 3/7] drm/i915/uc: Fully sanitize uC in uc_fini_hw
Date: Tue, 27 Mar 2018 19:07:03 +0200	[thread overview]
Message-ID: <op.zgjoh1tqxaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <29d27dc8-1b96-a337-131b-084c4eb6f43f@intel.com>

On Mon, 26 Mar 2018 13:23:21 +0200, Sagar Arun Kamble  
<sagar.a.kamble@intel.com> wrote:

>
>
> On 3/23/2018 8:44 PM, Michal Wajdeczko wrote:
>> Today uc_fini_hw is subset of uc_sanitize, but remaining
>> code in sanitize function is also desired for uc_fini_hw.
>> Instead of duplicating the code, just call uc_sanitize,
>> but leave as separate function to maintain symmetry with
>> uc_init_hw.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> We should drop call to uc_fini_hw from gem_fini as part of this patch as  
> GuC won't be available then.

But we will need it in gem_fini to properly finish our cleanup on unload.

Maybe to keep symmetry, we should add i915_gem_fini_hw and call it from
there ? See cleanup inside i915_gem_init_hw.

/m

>> ---
>>   drivers/gpu/drm/i915/intel_uc.c | 14 ++------------
>>   1 file changed, 2 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_uc.c  
>> b/drivers/gpu/drm/i915/intel_uc.c
>> index 2389828..9ff0c5a 100644
>> --- a/drivers/gpu/drm/i915/intel_uc.c
>> +++ b/drivers/gpu/drm/i915/intel_uc.c
>> @@ -434,19 +434,9 @@ int intel_uc_init_hw(struct drm_i915_private  
>> *dev_priv)
>>   	return ret;
>>   }
>>   -void intel_uc_fini_hw(struct drm_i915_private *dev_priv)
>> +void intel_uc_fini_hw(struct drm_i915_private *i915)
>>   {
>> -	struct intel_guc *guc = &dev_priv->guc;
>> -
>> -	if (!USES_GUC(dev_priv))
>> -		return;
>> -
>> -	GEM_BUG_ON(!HAS_GUC(dev_priv));
>> -
>> -	if (USES_GUC_SUBMISSION(dev_priv))
>> -		intel_guc_submission_disable(guc);
>> -
>> -	guc_disable_communication(guc);
>> +	intel_uc_sanitize(i915);
>>   }
>>     int intel_uc_suspend(struct drm_i915_private *i915)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-27 17:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 15:14 [PATCH v4 1/7] drm/i915: Correctly handle error path in i915_gem_init_hw Michal Wajdeczko
2018-03-23 15:14 ` [PATCH v4 2/7] drm/i915/uc: Disable GuC submission during sanitize Michal Wajdeczko
2018-03-26 10:36   ` Sagar Arun Kamble
2018-03-27 16:58     ` Michal Wajdeczko
2018-03-23 15:14 ` [PATCH v4 3/7] drm/i915/uc: Fully sanitize uC in uc_fini_hw Michal Wajdeczko
2018-03-26 11:23   ` Sagar Arun Kamble
2018-03-27 17:07     ` Michal Wajdeczko [this message]
2018-03-23 15:14 ` [PATCH v4 4/7] drm/i915/uc: Use correct error code for GuC initialization failure Michal Wajdeczko
2018-03-23 15:14 ` [PATCH v4 5/7] drm/i915/uc: Use helper functions to detect fw load status Michal Wajdeczko
2018-03-23 15:14 ` [PATCH v4 6/7] drm/i915/uc: Trivial s/dev_priv/i915 in intel_uc.c Michal Wajdeczko
2018-03-23 15:14 ` [PATCH v4 7/7] HAX: Enable GuC for CI Michal Wajdeczko
2018-03-23 17:18 ` ✓ Fi.CI.BAT: success for series starting with [v4,1/7] drm/i915: Correctly handle error path in i915_gem_init_hw Patchwork
2018-03-23 20:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-03-26 10:16 ` [PATCH v4 1/7] " Sagar Arun Kamble

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=op.zgjoh1tqxaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sagar.a.kamble@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.