linux/drivers/gpu/drm/i915/gt/uc/intel_uc.h
Michal Wajdeczko 0075a20a6d drm/i915/uc: Never fail on uC preparation step
Let's wait with decision about importance of uC failure to
hardware initialization step.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190817131144.26884-4-michal.wajdeczko@intel.com
2019-08-17 15:04:37 +01:00

68 lines
1.7 KiB
C

/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2014-2019 Intel Corporation
*/
#ifndef _INTEL_UC_H_
#define _INTEL_UC_H_
#include "intel_guc.h"
#include "intel_huc.h"
#include "i915_params.h"
struct intel_uc {
struct intel_guc guc;
struct intel_huc huc;
/* Snapshot of GuC log from last failed load */
struct drm_i915_gem_object *load_err_log;
};
void intel_uc_init_early(struct intel_uc *uc);
void intel_uc_driver_late_release(struct intel_uc *uc);
void intel_uc_init_mmio(struct intel_uc *uc);
void intel_uc_fetch_firmwares(struct intel_uc *uc);
void intel_uc_cleanup_firmwares(struct intel_uc *uc);
void intel_uc_sanitize(struct intel_uc *uc);
void intel_uc_init(struct intel_uc *uc);
int intel_uc_init_hw(struct intel_uc *uc);
void intel_uc_fini_hw(struct intel_uc *uc);
void intel_uc_fini(struct intel_uc *uc);
void intel_uc_reset_prepare(struct intel_uc *uc);
void intel_uc_suspend(struct intel_uc *uc);
void intel_uc_runtime_suspend(struct intel_uc *uc);
int intel_uc_resume(struct intel_uc *uc);
int intel_uc_runtime_resume(struct intel_uc *uc);
static inline bool intel_uc_supports_guc(struct intel_uc *uc)
{
return intel_guc_is_supported(&uc->guc);
}
static inline bool intel_uc_uses_guc(struct intel_uc *uc)
{
return intel_guc_is_enabled(&uc->guc);
}
static inline bool intel_uc_supports_guc_submission(struct intel_uc *uc)
{
return intel_guc_is_submission_supported(&uc->guc);
}
static inline bool intel_uc_uses_guc_submission(struct intel_uc *uc)
{
return intel_guc_is_submission_supported(&uc->guc);
}
static inline bool intel_uc_supports_huc(struct intel_uc *uc)
{
return intel_uc_supports_guc(uc);
}
static inline bool intel_uc_uses_huc(struct intel_uc *uc)
{
return intel_huc_is_enabled(&uc->huc);
}
#endif