mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/i915/guc: Implement banned contexts for GuC submission
When using GuC submission, if a context gets banned disable scheduling and mark all inflight requests as complete. Cc: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210727002348.97202-25-matthew.brost@intel.com
This commit is contained in:
committed by
John Harrison
parent
481d458cae
commit
ae8ac10dfd
@@ -16,6 +16,7 @@
|
||||
#include "intel_engine_types.h"
|
||||
#include "intel_ring_types.h"
|
||||
#include "intel_timeline_types.h"
|
||||
#include "i915_trace.h"
|
||||
|
||||
#define CE_TRACE(ce, fmt, ...) do { \
|
||||
const struct intel_context *ce__ = (ce); \
|
||||
@@ -243,6 +244,18 @@ static inline bool intel_context_set_banned(struct intel_context *ce)
|
||||
return test_and_set_bit(CONTEXT_BANNED, &ce->flags);
|
||||
}
|
||||
|
||||
static inline bool intel_context_ban(struct intel_context *ce,
|
||||
struct i915_request *rq)
|
||||
{
|
||||
bool ret = intel_context_set_banned(ce);
|
||||
|
||||
trace_intel_context_ban(ce);
|
||||
if (ce->ops->ban)
|
||||
ce->ops->ban(ce, rq);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
intel_context_force_single_submission(const struct intel_context *ce)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user