diff mbox

[v8,5/6] drm/i915/guc : Updating GuC logs to remove enable_guc_submission parameter

Message ID 1508865685-7722-6-git-send-email-sujaritha.sundaresan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sundaresan, Sujaritha Oct. 24, 2017, 5:21 p.m. UTC
Replacing conditions to remove dependance on enable_guc_submission

Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@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 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

sagar.a.kamble@intel.com Oct. 30, 2017, 7:44 a.m. UTC | #1
On 10/24/2017 10:51 PM, Sujaritha Sundaresan wrote:
> Replacing conditions to remove dependance on enable_guc_submission
>
> Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> Cc: Anusha Srivatsa <anusha.srivatsa@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 | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
> index 76d3eb1..c9f0167 100644
> --- a/drivers/gpu/drm/i915/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/intel_guc_log.c
> @@ -505,8 +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 ||
> -	    (i915_modparams.guc_log_level < 0))
> +	if (!NEEDS_GUC_FW(dev_priv))
this will just check if GuC is loaded but we will still need check for 
log_level.
>   		return;
>   
>   	/* First disable the interrupts, will be renabled afterwards */
> @@ -646,8 +645,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 ||
> -	    (i915_modparams.guc_log_level < 0))
> +	if (!NEEDS_GUC_FW(dev_priv))
same here.
>   		return;
>   
>   	mutex_lock(&dev_priv->drm.struct_mutex);
> @@ -657,7 +655,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))
This is fine.
>   		return;
>   
>   	mutex_lock(&dev_priv->drm.struct_mutex);
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index 76d3eb1..c9f0167 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -505,8 +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 ||
-	    (i915_modparams.guc_log_level < 0))
+	if (!NEEDS_GUC_FW(dev_priv))
 		return;
 
 	/* First disable the interrupts, will be renabled afterwards */
@@ -646,8 +645,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 ||
-	    (i915_modparams.guc_log_level < 0))
+	if (!NEEDS_GUC_FW(dev_priv))
 		return;
 
 	mutex_lock(&dev_priv->drm.struct_mutex);
@@ -657,7 +655,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);