[Intel-gfx] [PATCH 2/2] drm/i915: Sanitize enable_guc properly on non-guc platforms

Ville Syrjala ville.syrjala at linux.intel.com
Tue Jul 17 12:53:20 UTC 2018


From: Ville Syrjälä <ville.syrjala at 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 at intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at 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;
+	}
+
 	/* A negative value means "use platform default" */
 	if (i915_modparams.enable_guc < 0)
 		i915_modparams.enable_guc = __get_platform_enable_guc(i915);
-- 
2.16.4



More information about the Intel-gfx mailing list