All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagar Arun Kamble <sagar.a.kamble@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/5] drm/i915/guc: Sanitize module parameter guc_log_level
Date: Fri, 29 Sep 2017 13:53:17 +0530	[thread overview]
Message-ID: <1506673400-12716-3-git-send-email-sagar.a.kamble@intel.com> (raw)
In-Reply-To: <1506673400-12716-1-git-send-email-sagar.a.kamble@intel.com>

Parameter guc_log_level needs to be sanitized based on GuC support and
enable_guc_loading parameter since it depends on them like
enable_guc_submission. This will make GuC logging paths independent of
enable_guc_submission parameter.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_uc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index d4f679b..c8a130e 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -69,6 +69,7 @@ void intel_uc_sanitize_options(struct drm_i915_private *dev_priv)
 
 		i915_modparams.enable_guc_loading = 0;
 		i915_modparams.enable_guc_submission = 0;
+		i915_modparams.guc_log_level = -1;
 		return;
 	}
 
@@ -85,9 +86,11 @@ void intel_uc_sanitize_options(struct drm_i915_private *dev_priv)
 			i915_modparams.enable_guc_loading = 0;
 	}
 
-	/* Can't enable guc submission without guc loaded */
-	if (!i915_modparams.enable_guc_loading)
+	/* Can't enable guc submission and logging without guc loaded */
+	if (!i915_modparams.enable_guc_loading) {
 		i915_modparams.enable_guc_submission = 0;
+		i915_modparams.guc_log_level = -1;
+	}
 
 	/* A negative value means "use platform default" */
 	if (i915_modparams.enable_guc_submission < 0)
-- 
1.9.1

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

  parent reply	other threads:[~2017-09-29  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29  8:23 [PATCH 0/5] Reduce enable_guc_submission param based checks Sagar Arun Kamble
2017-09-29  8:23 ` [PATCH 1/5] drm/i915/guc: Remove enable_guc_submission dependency to invoke i915_guc_submission_fini/disable Sagar Arun Kamble
2017-09-29  8:23 ` Sagar Arun Kamble [this message]
2017-09-29  8:23 ` [PATCH 3/5] drm/i915/guc: Add status checks to enable/disable_guc_interrupts Sagar Arun Kamble
2017-09-29  8:23 ` [PATCH 4/5] drm/i915/guc: Remove enable_guc_submission dependency for invoking GuC log functions Sagar Arun Kamble
2017-09-29  8:23 ` [PATCH 5/5] drm/i915/guc: Update enable_guc_loading check in intel_uc_fini_hw Sagar Arun Kamble
2017-09-29  9:06 ` ✗ Fi.CI.BAT: warning for Reduce enable_guc_submission param based checks 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=1506673400-12716-3-git-send-email-sagar.a.kamble@intel.com \
    --to=sagar.a.kamble@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.