All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagar Arun Kamble <sagar.a.kamble@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v10 1/2] drm/i915/guc : Removing enable_guc_loading and enable_guc_submission module parameters
Date: Wed, 29 Nov 2017 19:10:05 +0530	[thread overview]
Message-ID: <3b1dde20-6bff-0207-b105-7a724a2fd2b1@intel.com> (raw)
In-Reply-To: <op.zagsaob4xaggs7@mwajdecz-mobl1.ger.corp.intel.com>



On 11/29/2017 5:44 PM, Michal Wajdeczko wrote:
> On Tue, 28 Nov 2017 11:41:57 +0100, Sagar Arun Kamble 
> <sagar.a.kamble@intel.com> wrote:
>
>>
>>
>> On 11/28/2017 1:24 AM, Sujaritha Sundaresan wrote:
>>> We currently have two module parameters that control GuC:
>>> "enable_guc_loading" and "enable_guc_submission". Whenever
>>> we need submission=1, we also need loading=1.We also need
>>> loading=1 when we want to want to verify the HuC, which
>>> is every time we have a HuC (but all platforms with HuC
>>> have a GuC and viceversa).
>>>
>
> <SNIP>
>
>>> +
>>> +    /* Making sure that our auto is well defined */
>>> +    GEM_BUG_ON(auto_enable_guc < 0);
>>> +    GEM_BUG_ON((auto_enable_guc > 0) && !HAS_GUC_FW(dev_priv));
>>> +    GEM_BUG_ON((auto_enable_guc & 2) && !HAS_HUC_FW(dev_priv));
>>> +
>>> +    if (i915_modparams.enable_guc < 0)
>>> +        i915_modparams.enable_guc = auto_enable_guc;
>>> +
>>> +    if (i915_modparams.enable_guc > 0) {
>>> +        if (!HAS_GUC(dev_priv) || !HAS_GUC_FW(dev_priv)) {
>>> +            DRM_INFO("Ignoring option enable_guc=%d - %s\n",
>>> +                     i915_modparams.enable_guc,
>>> +                     !HAS_GUC(dev_priv) ? "no GuC hardware" :
>>> +                     "no GuC firmware");
>>> +            i915_modparams.enable_guc = 0;
>>> +        }
>>>       }
>>>   -    /* A negative value means "use platform default" */
>>> -    if (i915_modparams.enable_guc_loading < 0)
>>> -        i915_modparams.enable_guc_loading = HAS_GUC_UCODE(dev_priv);
>>> -
>>> -    /* Verify firmware version */
>>> -    if (i915_modparams.enable_guc_loading) {
>>> -        if (HAS_HUC_UCODE(dev_priv))
>>> -            intel_huc_select_fw(&dev_priv->huc);
>>> -
>>> -        if (intel_guc_fw_select(&dev_priv->guc))
>>> -            i915_modparams.enable_guc_loading = 0;
>>> +    if (i915_modparams.enable_guc & 2) {
>>> +        if (!HAS_HUC_FW(dev_priv)) {
>>> +            DRM_INFO("Ignoring option enable_guc=%d - %s\n",
>>> +                i915_modparams.enable_guc, "no HuC firmware");
>>> +            i915_modparams.enable_guc = 0;
>> Clearing only HuC status from enable_guc would be proper I guess. 
>> Sorry I did not see this earlier.
>
> My understanding is that if user had specified non-zero positive value of
> 'enable_guc' then it means that he requests *all* GuC options to be 
> available
> (something like our old '2=required' mode). If any of required option 
> is not
> available then we should not try to cherry-pick/drop single option.
I think we wanted to enable HuC for some platforms but not enable GuC 
submission. Anusha can you
please confirm if such cherry-picking is needed through module parameter.
>
> Note that if user don't care about specific option, then user should 
> use -1(auto)
> mode and rely on driver decision what is available and in which 
> configuration.
> And for 'auto' mode we try to make sure to do not select broken 
> configurations.
In that case we can just have 3 values for enable_guc (if cherry-picking 
is not to be done)
-1: auto (whatever is available)
0: all disabled
1: all enabled if available else all disabled
>
> Michal

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-11-29 13:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 19:54 [PATCH 0/2] drm/i915/guc : Removing GuC loading and submission modparams Sujaritha Sundaresan
2017-11-27 19:54 ` [PATCH v10 1/2] drm/i915/guc : Removing enable_guc_loading and enable_guc_submission module parameters Sujaritha Sundaresan
2017-11-28 10:27   ` Joonas Lahtinen
2017-11-28 10:41   ` Sagar Arun Kamble
2017-11-29 12:14     ` Michal Wajdeczko
2017-11-29 13:40       ` Sagar Arun Kamble [this message]
2017-11-29 14:11         ` Michal Wajdeczko
2017-11-27 19:54 ` [PATCH v10 2/2] drm/i915/guc : Updating GuC and HuC firmware select function Sujaritha Sundaresan
2017-11-27 20:01 ` ✗ Fi.CI.BAT: failure for drm/i915/guc : Removing GuC loading and submission modparams 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=3b1dde20-6bff-0207-b105-7a724a2fd2b1@intel.com \
    --to=sagar.a.kamble@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=sujaritha.sundaresan@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.