2019-08-12 09:29:35 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2017-10-04 18:13:40 +00:00
|
|
|
/*
|
2019-08-12 09:29:35 +00:00
|
|
|
* Copyright © 2014-2019 Intel Corporation
|
2017-10-04 18:13:40 +00:00
|
|
|
*/
|
|
|
|
|
2017-11-24 08:20:50 +00:00
|
|
|
#ifndef _INTEL_GUC_SUBMISSION_H_
|
|
|
|
#define _INTEL_GUC_SUBMISSION_H_
|
2017-10-04 18:13:40 +00:00
|
|
|
|
2019-12-05 22:02:42 +00:00
|
|
|
#include <linux/types.h>
|
2017-10-04 18:13:40 +00:00
|
|
|
|
2020-02-18 22:33:24 +00:00
|
|
|
#include "intel_guc.h"
|
|
|
|
|
2019-12-05 22:02:42 +00:00
|
|
|
struct intel_engine_cs;
|
2017-10-04 18:13:40 +00:00
|
|
|
|
2019-07-31 22:33:20 +00:00
|
|
|
void intel_guc_submission_init_early(struct intel_guc *guc);
|
2017-11-16 13:32:39 +00:00
|
|
|
int intel_guc_submission_init(struct intel_guc *guc);
|
drm/i915/guc: kill doorbell code and selftests
Instead of relying on the workqueue, the upcoming reworked GuC
submission flow will offer the host driver indipendent control over
the execution status of each context submitted to GuC. As part of this,
the doorbell usage model has been reworked, with each doorbell being
paired to a single lrc and a doorbell ring representing new work
available for that specific context. This mechanism, however, limits
the number of contexts that can be registered with GuC to the number of
doorbells, which is an undesired limitation. To avoid this limitation,
we requested the GuC team to also provide a H2G that will allow the host
to notify the GuC of work available for a specified lrc, so we can use
that mechanism instead of relying on the doorbells. We can therefore drop
the doorbell code we currently have, also given the fact that in the
unlikely case we'd want to switch back to using doorbells we'd have to
heavily rework it.
The workqueue will still have a use in the new interface to pass special
commands, so that code has been retained for now.
With the doorbells gone and the GuC client becoming even simpler, the
existing GuC selftests don't give us any meaningful coverage so we can
remove them as well. Some selftests might come with the new code, but
they will look different from what we have now so if doesn't seem worth
it to keep the file around in the meantime.
v2: fix comments and commit message (John)
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191205220243.27403-3-daniele.ceraolospurio@intel.com
2019-12-05 22:02:41 +00:00
|
|
|
void intel_guc_submission_enable(struct intel_guc *guc);
|
2017-11-16 13:32:39 +00:00
|
|
|
void intel_guc_submission_disable(struct intel_guc *guc);
|
|
|
|
void intel_guc_submission_fini(struct intel_guc *guc);
|
2017-12-13 22:13:47 +00:00
|
|
|
int intel_guc_preempt_work_create(struct intel_guc *guc);
|
|
|
|
void intel_guc_preempt_work_destroy(struct intel_guc *guc);
|
2019-12-05 22:02:42 +00:00
|
|
|
bool intel_engine_in_guc_submission_mode(const struct intel_engine_cs *engine);
|
2017-10-04 18:13:40 +00:00
|
|
|
|
2020-02-18 22:33:24 +00:00
|
|
|
static inline bool intel_guc_submission_is_supported(struct intel_guc *guc)
|
|
|
|
{
|
|
|
|
/* XXX: GuC submission is unavailable for now */
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool intel_guc_submission_is_wanted(struct intel_guc *guc)
|
|
|
|
{
|
|
|
|
return guc->submission_selected;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool intel_guc_submission_is_used(struct intel_guc *guc)
|
|
|
|
{
|
|
|
|
return intel_guc_is_used(guc) && intel_guc_submission_is_wanted(guc);
|
|
|
|
}
|
|
|
|
|
2017-10-04 18:13:40 +00:00
|
|
|
#endif
|