Commit 9f9e539f authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: Shut up GuC errors when it's disabled

DRM_ERROR an continue without any issues aren't allowed since that
causes noise in the CI system. But we absolutely want to have the
DRM_ERROR when we want to run with GuC.

For simplicity just short-circuit all the loader code when it's not
needed.

v2: Mika&Chris complained that I shouldn't hit send on patches written
before coffee kicks in.

v3: Make it compile at least ...

Cc: Alex Dai <yu.dai@intel.com>
Cc: Dave Gordon <david.s.gordon@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445591459-4327-1-git-send-email-daniel.vetter@ffwll.chReviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent cbdc12a9
...@@ -4769,18 +4769,9 @@ i915_gem_init_hw(struct drm_device *dev) ...@@ -4769,18 +4769,9 @@ i915_gem_init_hw(struct drm_device *dev)
if (HAS_GUC_UCODE(dev)) { if (HAS_GUC_UCODE(dev)) {
ret = intel_guc_ucode_load(dev); ret = intel_guc_ucode_load(dev);
if (ret) { if (ret) {
/* DRM_ERROR("Failed to initialize GuC, error %d\n", ret);
* If we got an error and GuC submission is enabled, map ret = -EIO;
* the error to -EIO so the GPU will be declared wedged. goto out;
* OTOH, if we didn't intend to use the GuC anyway, just
* discard the error and carry on.
*/
DRM_ERROR("Failed to initialize GuC, error %d%s\n", ret,
i915.enable_guc_submission ? "" :
" (ignored)");
ret = i915.enable_guc_submission ? -EIO : 0;
if (ret)
goto out;
} }
} }
......
...@@ -364,6 +364,9 @@ int intel_guc_ucode_load(struct drm_device *dev) ...@@ -364,6 +364,9 @@ int intel_guc_ucode_load(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;
int err = 0; int err = 0;
if (!i915.enable_guc_submission)
return 0;
DRM_DEBUG_DRIVER("GuC fw status: fetch %s, load %s\n", DRM_DEBUG_DRIVER("GuC fw status: fetch %s, load %s\n",
intel_guc_fw_status_repr(guc_fw->guc_fw_fetch_status), intel_guc_fw_status_repr(guc_fw->guc_fw_fetch_status),
intel_guc_fw_status_repr(guc_fw->guc_fw_load_status)); intel_guc_fw_status_repr(guc_fw->guc_fw_load_status));
...@@ -589,6 +592,9 @@ void intel_guc_ucode_init(struct drm_device *dev) ...@@ -589,6 +592,9 @@ void intel_guc_ucode_init(struct drm_device *dev)
fw_path = ""; /* unknown device */ fw_path = ""; /* unknown device */
} }
if (!i915.enable_guc_submission)
return;
guc_fw->guc_dev = dev; guc_fw->guc_dev = dev;
guc_fw->guc_fw_path = fw_path; guc_fw->guc_fw_path = fw_path;
guc_fw->guc_fw_fetch_status = GUC_FIRMWARE_NONE; guc_fw->guc_fw_fetch_status = GUC_FIRMWARE_NONE;
......
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