Commit 21e33021 authored by Anusha Srivatsa's avatar Anusha Srivatsa Committed by Paulo Zanoni

drm/i915/guc: Sanitory checks for platform that dont have GuC

i915.enable_guc_loading/submission=2 forces the usage of GuC.
For platforms that do not have a GuC, asking the kernel to use a GuC
should not result in an error state. Do extra checks to see if the
platform even has a GuC or not, regardless of the kernel parameter.

v2: Based on Rodrigo's patch and Paulo's suggestion(Paulo, Rodrigo)
v3: Correct the Indentation(Jani, Paulo)
v4: Added the blank line(Jani, Paulo)
v5 (from Paulo): Remove the extra blank line.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97573
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Zanoni Paulo <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarAnusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1476488825-5673-1-git-send-email-anusha.srivatsa@intel.com
parent 910530c0
...@@ -719,11 +719,16 @@ void intel_guc_init(struct drm_device *dev) ...@@ -719,11 +719,16 @@ void intel_guc_init(struct drm_device *dev)
struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw; struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw;
const char *fw_path; const char *fw_path;
/* A negative value means "use platform default" */ if (!HAS_GUC(dev)) {
if (i915.enable_guc_loading < 0) i915.enable_guc_loading = 0;
i915.enable_guc_loading = HAS_GUC_UCODE(dev); i915.enable_guc_submission = 0;
if (i915.enable_guc_submission < 0) } else {
i915.enable_guc_submission = HAS_GUC_SCHED(dev); /* A negative value means "use platform default" */
if (i915.enable_guc_loading < 0)
i915.enable_guc_loading = HAS_GUC_UCODE(dev);
if (i915.enable_guc_submission < 0)
i915.enable_guc_submission = HAS_GUC_SCHED(dev);
}
if (!HAS_GUC_UCODE(dev)) { if (!HAS_GUC_UCODE(dev)) {
fw_path = NULL; fw_path = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment