Message ID | 1510358798-21566-5-git-send-email-sujaritha.sundaresan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, 11 Nov 2017 01:06:34 +0100, Sujaritha Sundaresan <sujaritha.sundaresan@intel.com> wrote: > Replacing conditions to remove dependance on enable_guc_submission typo ;) > > v9: Including guc_log_level in the condition (Sagar) > > Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> > Cc: Oscar Mateo <oscar.mateo@intel.com> > Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com> > --- > drivers/gpu/drm/i915/intel_guc_log.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_guc_log.c > b/drivers/gpu/drm/i915/intel_guc_log.c > index 76d3eb1..4dbe5be 100644 > --- a/drivers/gpu/drm/i915/intel_guc_log.c > +++ b/drivers/gpu/drm/i915/intel_guc_log.c > @@ -505,7 +505,7 @@ static void guc_flush_logs(struct intel_guc *guc) > { > struct drm_i915_private *dev_priv = guc_to_i915(guc); > - if (!i915_modparams.enable_guc_submission || > + if (!NEEDS_GUC_FW(dev_priv) || Hmm, maybe in all these places we should rather check GuC firmware load status directly? We don't care here why it was loaded, we just want to verify that it is available. > (i915_modparams.guc_log_level < 0)) > return; > @@ -646,7 +646,7 @@ int i915_guc_log_control(struct drm_i915_private > *dev_priv, u64 control_val) > void i915_guc_log_register(struct drm_i915_private *dev_priv) > { > - if (!i915_modparams.enable_guc_submission || > + if (!NEEDS_GUC_FW(dev_priv) || > (i915_modparams.guc_log_level < 0)) > return; > @@ -657,7 +657,7 @@ void i915_guc_log_register(struct drm_i915_private > *dev_priv) > void i915_guc_log_unregister(struct drm_i915_private *dev_priv) > { > - if (!i915_modparams.enable_guc_submission) > + if (!NEEDS_GUC_FW(dev_priv)) > return; > mutex_lock(&dev_priv->drm.struct_mutex);
On 11/12/2017 08:29 AM, Michal Wajdeczko wrote: > On Sat, 11 Nov 2017 01:06:34 +0100, Sujaritha Sundaresan > <sujaritha.sundaresan@intel.com> wrote: > >> Replacing conditions to remove dependance on enable_guc_submission > > typo ;) > Oops. :) >> >> v9: Including guc_log_level in the condition (Sagar) >> >> Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com> >> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> >> Cc: Oscar Mateo <oscar.mateo@intel.com> >> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com> >> --- >> drivers/gpu/drm/i915/intel_guc_log.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_guc_log.c >> b/drivers/gpu/drm/i915/intel_guc_log.c >> index 76d3eb1..4dbe5be 100644 >> --- a/drivers/gpu/drm/i915/intel_guc_log.c >> +++ b/drivers/gpu/drm/i915/intel_guc_log.c >> @@ -505,7 +505,7 @@ static void guc_flush_logs(struct intel_guc *guc) >> { >> struct drm_i915_private *dev_priv = guc_to_i915(guc); >> - if (!i915_modparams.enable_guc_submission || >> + if (!NEEDS_GUC_FW(dev_priv) || > > Hmm, maybe in all these places we should rather check GuC firmware load > status directly? We don't care here why it was loaded, we just want to > verify that it is available. Will do. > >> (i915_modparams.guc_log_level < 0)) >> return; >> @@ -646,7 +646,7 @@ int i915_guc_log_control(struct drm_i915_private >> *dev_priv, u64 control_val) >> void i915_guc_log_register(struct drm_i915_private *dev_priv) >> { >> - if (!i915_modparams.enable_guc_submission || >> + if (!NEEDS_GUC_FW(dev_priv) || >> (i915_modparams.guc_log_level < 0)) >> return; >> @@ -657,7 +657,7 @@ void i915_guc_log_register(struct >> drm_i915_private *dev_priv) >> void i915_guc_log_unregister(struct drm_i915_private *dev_priv) >> { >> - if (!i915_modparams.enable_guc_submission) >> + if (!NEEDS_GUC_FW(dev_priv)) >> return; >> mutex_lock(&dev_priv->drm.struct_mutex); Thanks for the review, Regards, Sujaritha
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c index 76d3eb1..4dbe5be 100644 --- a/drivers/gpu/drm/i915/intel_guc_log.c +++ b/drivers/gpu/drm/i915/intel_guc_log.c @@ -505,7 +505,7 @@ static void guc_flush_logs(struct intel_guc *guc) { struct drm_i915_private *dev_priv = guc_to_i915(guc); - if (!i915_modparams.enable_guc_submission || + if (!NEEDS_GUC_FW(dev_priv) || (i915_modparams.guc_log_level < 0)) return; @@ -646,7 +646,7 @@ int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val) void i915_guc_log_register(struct drm_i915_private *dev_priv) { - if (!i915_modparams.enable_guc_submission || + if (!NEEDS_GUC_FW(dev_priv) || (i915_modparams.guc_log_level < 0)) return; @@ -657,7 +657,7 @@ void i915_guc_log_register(struct drm_i915_private *dev_priv) void i915_guc_log_unregister(struct drm_i915_private *dev_priv) { - if (!i915_modparams.enable_guc_submission) + if (!NEEDS_GUC_FW(dev_priv)) return; mutex_lock(&dev_priv->drm.struct_mutex);
Replacing conditions to remove dependance on enable_guc_submission v9: Including guc_log_level in the condition (Sagar) Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Oscar Mateo <oscar.mateo@intel.com> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com> --- drivers/gpu/drm/i915/intel_guc_log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)