[Intel-gfx] [PATCH] drm/i915: Always load guc by default.
Anusha Srivatsa
anusha.srivatsa at intel.com
Thu Nov 24 00:52:38 UTC 2016
Remove the enable_guc_loading parameter. Load the GuC on
plaforms that have GuC. All issues we found so far are related
to GuC features like the command submission, but no bug is related
to the guc loading itself.
This addresses the case when we need GuC loaded even with no GuC feature
in use, like - GuC authenticating HuC loading.
If we need to debug GuC we can do so by removing the firmware from
the rootfs instead of disabling with a parameter. So besides enabling
guc by default this patch also kill the use of the parameter for
loading.
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
---
drivers/gpu/drm/i915/i915_params.c | 6 ------
drivers/gpu/drm/i915/i915_params.h | 1 -
drivers/gpu/drm/i915/intel_guc_loader.c | 19 ++++++-------------
3 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index d46ffe7..a8011f2 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -56,7 +56,6 @@ struct i915_params i915 __read_mostly = {
.verbose_state_checks = 1,
.nuclear_pageflip = 0,
.edp_vswing = 0,
- .enable_guc_loading = 0,
.enable_guc_submission = 0,
.guc_log_level = -1,
.enable_dp_mst = true,
@@ -216,11 +215,6 @@ MODULE_PARM_DESC(edp_vswing,
"(0=use value from vbt [default], 1=low power swing(200mV),"
"2=default swing(400mV))");
-module_param_named_unsafe(enable_guc_loading, i915.enable_guc_loading, int, 0400);
-MODULE_PARM_DESC(enable_guc_loading,
- "Enable GuC firmware loading "
- "(-1=auto, 0=never [default], 1=if available, 2=required)");
-
module_param_named_unsafe(enable_guc_submission, i915.enable_guc_submission, int, 0400);
MODULE_PARM_DESC(enable_guc_submission,
"Enable GuC submission "
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 817ad95..4b7529a 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -45,7 +45,6 @@ struct i915_params {
int enable_ips;
int invert_brightness;
int enable_cmd_parser;
- int enable_guc_loading;
int enable_guc_submission;
int guc_log_level;
int use_mmio_flip;
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 6946311..d48dc73 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -460,11 +460,9 @@ int intel_guc_setup(struct drm_device *dev)
fw_path,
intel_uc_fw_status_repr(guc_fw->fetch_status),
intel_uc_fw_status_repr(guc_fw->load_status));
-
- /* Loading forbidden, or no firmware to load? */
- if (!i915.enable_guc_loading) {
- err = 0;
- goto fail;
+ if (!HAS_GUC(dev_priv)) {
+ /* Platform does not have a GuC */
+ return;
} else if (fw_path == NULL) {
/* Device is known to have no uCode (e.g. no GuC) */
err = -ENXIO;
@@ -562,9 +560,8 @@ int intel_guc_setup(struct drm_device *dev)
* nonfatal error (i.e. it doesn't prevent driver load, but
* marks the GPU as wedged until reset).
*/
- if (i915.enable_guc_loading > 1) {
- ret = -EIO;
- } else if (i915.enable_guc_submission > 1) {
+
+ if (i915.enable_guc_submission > 1) {
ret = -EIO;
} else {
ret = 0;
@@ -745,12 +742,9 @@ void intel_guc_init(struct drm_device *dev)
const char *fw_path;
if (!HAS_GUC(dev_priv)) {
- i915.enable_guc_loading = 0;
i915.enable_guc_submission = 0;
} else {
/* A negative value means "use platform default" */
- if (i915.enable_guc_loading < 0)
- i915.enable_guc_loading = HAS_GUC_UCODE(dev_priv);
if (i915.enable_guc_submission < 0)
i915.enable_guc_submission = HAS_GUC_SCHED(dev_priv);
}
@@ -778,8 +772,7 @@ void intel_guc_init(struct drm_device *dev)
guc_fw->fetch_status = UC_FIRMWARE_NONE;
guc_fw->load_status = UC_FIRMWARE_NONE;
- /* Early (and silent) return if GuC loading is disabled */
- if (!i915.enable_guc_loading)
+ if(!HAS_GUC(dev_priv))
return;
if (fw_path == NULL)
return;
--
2.7.4
More information about the Intel-gfx
mailing list