aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uc.c
diff options
context:
space:
mode:
authorOscar Mateo <oscar.mateo@intel.com>2017-03-28 09:53:47 -0700
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2017-03-30 13:11:40 +0300
commitb8991403ea0f3e5b59e08e37a7ac0af8ef4264e3 (patch)
tree9b1f2784b334e44e1b8f077ccc3e650534eaeded /drivers/gpu/drm/i915/intel_uc.c
parentdrm/i915/opregion: debug log about invalid ACPI OpRegion VBT (diff)
downloadlinux-dev-b8991403ea0f3e5b59e08e37a7ac0af8ef4264e3.tar.xz
linux-dev-b8991403ea0f3e5b59e08e37a7ac0af8ef4264e3.zip
drm/i915/guc: Take enable_guc_loading check out of GEM core code
The should happen as soon as possible, but always within the logic that depends on it (and not interrupting the top-level driver control flow). Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1490720027-23234-1-git-send-email-oscar.mateo@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_uc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index c767dc351c63..19653224b683 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -254,6 +254,9 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv)
{
int ret, attempts;
+ if (!i915.enable_guc_loading)
+ return 0;
+
gen9_reset_guc_interrupts(dev_priv);
/* We need to notify the guc whenever we change the GGTT */
@@ -343,6 +346,9 @@ err_guc:
void intel_uc_fini_hw(struct drm_i915_private *dev_priv)
{
+ if (!i915.enable_guc_loading)
+ return;
+
if (i915.enable_guc_submission) {
i915_guc_submission_disable(dev_priv);
gen9_disable_guc_interrupts(dev_priv);