2019-08-12 09:29:35 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2015-08-12 14:43:36 +00:00
|
|
|
/*
|
2019-08-12 09:29:35 +00:00
|
|
|
* Copyright © 2014-2019 Intel Corporation
|
2015-08-12 14:43:36 +00:00
|
|
|
*/
|
2019-08-12 09:29:35 +00:00
|
|
|
|
2016-11-25 17:59:33 +00:00
|
|
|
#ifndef _INTEL_UC_H_
|
|
|
|
#define _INTEL_UC_H_
|
2015-08-12 14:43:36 +00:00
|
|
|
|
2017-10-04 18:13:41 +00:00
|
|
|
#include "intel_guc.h"
|
2017-10-04 15:33:26 +00:00
|
|
|
#include "intel_huc.h"
|
2017-12-06 13:53:15 +00:00
|
|
|
#include "i915_params.h"
|
2016-12-24 19:31:46 +00:00
|
|
|
|
2019-07-13 10:00:12 +00:00
|
|
|
struct intel_uc {
|
|
|
|
struct intel_guc guc;
|
|
|
|
struct intel_huc huc;
|
2019-08-02 18:40:53 +00:00
|
|
|
|
|
|
|
/* Snapshot of GuC log from last failed load */
|
|
|
|
struct drm_i915_gem_object *load_err_log;
|
2019-07-13 10:00:12 +00:00
|
|
|
};
|
|
|
|
|
2019-07-13 10:00:13 +00:00
|
|
|
void intel_uc_init_early(struct intel_uc *uc);
|
2019-08-01 00:57:08 +00:00
|
|
|
void intel_uc_driver_late_release(struct intel_uc *uc);
|
2019-07-13 10:00:13 +00:00
|
|
|
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);
|
|
|
|
int intel_uc_init_hw(struct intel_uc *uc);
|
|
|
|
void intel_uc_fini_hw(struct intel_uc *uc);
|
|
|
|
int intel_uc_init(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);
|
2019-07-30 23:07:39 +00:00
|
|
|
int intel_uc_runtime_resume(struct intel_uc *uc);
|
2016-12-24 19:31:46 +00:00
|
|
|
|
2019-07-31 22:33:18 +00:00
|
|
|
static inline bool intel_uc_supports_guc(struct intel_uc *uc)
|
2017-12-06 13:53:15 +00:00
|
|
|
{
|
2019-07-31 22:33:19 +00:00
|
|
|
return intel_guc_is_supported(&uc->guc);
|
2017-12-06 13:53:15 +00:00
|
|
|
}
|
|
|
|
|
2019-07-31 22:33:18 +00:00
|
|
|
static inline bool intel_uc_supports_guc_submission(struct intel_uc *uc)
|
2017-12-06 13:53:15 +00:00
|
|
|
{
|
2019-07-31 22:33:20 +00:00
|
|
|
return intel_guc_is_submission_supported(&uc->guc);
|
2017-12-06 13:53:15 +00:00
|
|
|
}
|
|
|
|
|
2019-07-31 22:33:18 +00:00
|
|
|
static inline bool intel_uc_supports_huc(struct intel_uc *uc)
|
2017-12-06 13:53:15 +00:00
|
|
|
{
|
2019-07-31 22:33:19 +00:00
|
|
|
return intel_huc_is_supported(&uc->huc);
|
2017-12-06 13:53:15 +00:00
|
|
|
}
|
|
|
|
|
2015-08-12 14:43:36 +00:00
|
|
|
#endif
|