drm/i915/guc: Improved reporting when GuC fails to load
Rather than just saying 'GuC failed to load: -110', actually print out the GuC status register and break it down into the individual fields. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201028145826.2949180-3-John.C.Harrison@Intel.com
This commit is contained in:
parent
c784e5249e
commit
164e57ca15
|
@ -76,6 +76,7 @@ static inline bool guc_ready(struct intel_uncore *uncore, u32 *status)
|
|||
|
||||
static int guc_wait_ucode(struct intel_uncore *uncore)
|
||||
{
|
||||
struct drm_device *drm = &uncore->i915->drm;
|
||||
u32 status;
|
||||
int ret;
|
||||
|
||||
|
@ -90,15 +91,27 @@ static int guc_wait_ucode(struct intel_uncore *uncore)
|
|||
ret = wait_for(guc_ready(uncore, &status), 100);
|
||||
DRM_DEBUG_DRIVER("GuC status %#x\n", status);
|
||||
|
||||
if ((status & GS_BOOTROM_MASK) == GS_BOOTROM_RSA_FAILED) {
|
||||
DRM_ERROR("GuC firmware signature verification failed\n");
|
||||
ret = -ENOEXEC;
|
||||
}
|
||||
if (ret) {
|
||||
drm_err(drm, "GuC load failed: status = 0x%08X\n", status);
|
||||
drm_err(drm, "GuC load failed: status: Reset = %d, "
|
||||
"BootROM = 0x%02X, UKernel = 0x%02X, "
|
||||
"MIA = 0x%02X, Auth = 0x%02X\n",
|
||||
REG_FIELD_GET(GS_MIA_IN_RESET, status),
|
||||
REG_FIELD_GET(GS_BOOTROM_MASK, status),
|
||||
REG_FIELD_GET(GS_UKERNEL_MASK, status),
|
||||
REG_FIELD_GET(GS_MIA_MASK, status),
|
||||
REG_FIELD_GET(GS_AUTH_STATUS_MASK, status));
|
||||
|
||||
if ((status & GS_UKERNEL_MASK) == GS_UKERNEL_EXCEPTION) {
|
||||
DRM_ERROR("GuC firmware exception. EIP: %#x\n",
|
||||
intel_uncore_read(uncore, SOFT_SCRATCH(13)));
|
||||
ret = -ENXIO;
|
||||
if ((status & GS_BOOTROM_MASK) == GS_BOOTROM_RSA_FAILED) {
|
||||
drm_err(drm, "GuC firmware signature verification failed\n");
|
||||
ret = -ENOEXEC;
|
||||
}
|
||||
|
||||
if ((status & GS_UKERNEL_MASK) == GS_UKERNEL_EXCEPTION) {
|
||||
drm_err(drm, "GuC firmware exception. EIP: %#x\n",
|
||||
intel_uncore_read(uncore, SOFT_SCRATCH(13)));
|
||||
ret = -ENXIO;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue