All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/uc: Consider enable_guc modparam during fw selection
Date: Wed, 31 Jul 2019 14:22:42 +0100	[thread overview]
Message-ID: <156457936296.15787.8326935385731551205@skylake-alporthouse-com> (raw)
In-Reply-To: <op.z5sm94ooxaggs7@mwajdecz-mobl1.ger.corp.intel.com>

Quoting Michal Wajdeczko (2019-07-31 14:19:06)
> On Tue, 30 Jul 2019 21:07:28 +0200, Chris Wilson  
> <chris@chris-wilson.co.uk> wrote:
> 
> >> +static const char* __override_huc_firmware_path(void)
> >> +{
> >> +       if ((i915_modparams.enable_guc < 0) ||
> >> +           (i915_modparams.enable_guc & ENABLE_GUC_LOAD_HUC))
> >> +               return i915_modparams.huc_firmware_path;
> >
> > We can even lose the <0. No negative value other than -1 is documented.
> 
> I used <0 to match existing implementation in sanitize_options_early()
> 
>         /* A negative value means "use platform default" */
>         if (i915_modparams.enable_guc < 0)
>                 i915_modparams.enable_guc = __get_platform_enable_guc(uc);
> 
> if we lose <0 condition there are questions how to treat undocumented  
> values:
> -2 is disabled(0) or auto but without submission aka huc-only(2)
> -3 is disabled(0) or auto but without huc aka submission_only(1)
> ...

I'm willing to let users shoot themselves in the foot for undocumented
values for an unsafe parameter. They already snatched hold of the
shotgun for using an unsafe parameter in the first place.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-07-31 13:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 18:19 [PATCH 0/3] Don't sanitize enable_guc Michal Wajdeczko
2019-07-30 18:19 ` [PATCH 1/3] drm/i915/uc: Consider enable_guc modparam during fw selection Michal Wajdeczko
2019-07-30 19:07   ` Chris Wilson
2019-07-31 13:19     ` Michal Wajdeczko
2019-07-31 13:22       ` Chris Wilson [this message]
2019-07-30 18:19 ` [PATCH 2/3] drm/i915/guc: Use dedicated flag to track submission mode Michal Wajdeczko
2019-07-30 19:11   ` Chris Wilson
2019-07-31 18:00   ` [PATCH v3 2/4] drm/i915/uc: Consider enable_guc modparam during fw selection Michal Wajdeczko
2019-07-31 19:13     ` Chris Wilson
2019-07-30 18:19 ` [PATCH 3/3] drm/i915/uc: Stop sanitizing enable_guc modparam Michal Wajdeczko
2019-07-30 18:23   ` Chris Wilson
2019-07-30 21:54 ` ✗ Fi.CI.CHECKPATCH: warning for Don't sanitize enable_guc Patchwork
2019-07-30 22:15 ` ✓ Fi.CI.BAT: success " 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=156457936296.15787.8326935385731551205@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michal.wajdeczko@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.