Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Sanitize enable_guc properly on non-guc platforms
Date: Tue, 17 Jul 2018 17:22:01 +0300	[thread overview]
Message-ID: <20180717142201.GQ5565@intel.com> (raw)
In-Reply-To: <op.zmasx40txaggs7@mwajdecz-mobl1.ger.corp.intel.com>

On Tue, Jul 17, 2018 at 03:26:18PM +0200, Michal Wajdeczko wrote:
> On Tue, 17 Jul 2018 14:53:20 +0200, Ville Syrjala  
> <ville.syrjala@linux.intel.com> wrote:
> 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > If there's no guc don't try to initialize it even if the user asked for
> > it.
> >
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_uc.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_uc.c  
> > b/drivers/gpu/drm/i915/intel_uc.c
> > index 7c95697e1a35..2765808b01e0 100644
> > --- a/drivers/gpu/drm/i915/intel_uc.c
> > +++ b/drivers/gpu/drm/i915/intel_uc.c
> > @@ -106,6 +106,11 @@ static void sanitize_options_early(struct  
> > drm_i915_private *i915)
> >  	struct intel_uc_fw *guc_fw = &i915->guc.fw;
> >  	struct intel_uc_fw *huc_fw = &i915->huc.fw;
> > +	if (!HAS_GUC(i915)) {
> > +		i915_modparams.enable_guc = 0;
> > +		return;
> > +	}
> > +
> 
> This will silently switch from user requested GuC-submission to
> execlist-mode which we wanted to stop.
> 
> If user don't know what is available on given platform then auto(-1)
> mode should be used instead. If user has decided to explicitly specify
> invalid enable_guc !0 mode on non-GuC platform why do we want to ignore
> that and continue as nothing happened?

If we want to fail then we should at least fail nicer and tell the user
they're trying something that's not possible.

> 
> Michal
> 
> ps. what is your expectation if there is GuC HW but no FW was defined?

I just bury my head in the sand whenever a guc approaches.

> 
> >  	/* A negative value means "use platform default" */
> >  	if (i915_modparams.enable_guc < 0)
> >  		i915_modparams.enable_guc = __get_platform_enable_guc(i915);

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

  reply	other threads:[~2018-07-17 14:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 12:53 [PATCH 1/2] drm/i915: Stop lying about the WOPCM size Ville Syrjala
2018-07-17 12:53 ` [PATCH 2/2] drm/i915: Sanitize enable_guc properly on non-guc platforms Ville Syrjala
2018-07-17 13:09   ` Chris Wilson
2018-07-17 13:26   ` Michal Wajdeczko
2018-07-17 14:22     ` Ville Syrjälä [this message]
2018-07-17 15:30       ` Michal Wajdeczko
2018-07-17 13:06 ` [PATCH 1/2] drm/i915: Stop lying about the WOPCM size Chris Wilson
2018-07-17 13:37 ` Michal Wajdeczko
2018-07-17 13:52 ` Michał Winiarski
2018-07-17 15:44   ` Michał Winiarski
2018-07-17 15:11 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2018-07-17 17:03 ` [PATCH 1/2] " Jackie Li
2018-07-17 18:58 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " 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=20180717142201.GQ5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox